[Image registration] Image registration based on matlab sift algorithm [Include Matlab source code 082]

1. Introduction

1. The essence of the SIFT algorithm is to find key points (feature points) in different scale spaces and calculate the direction of the key points. The key points found by SIFT are some very prominent points that will not change due to factors such as illumination, affine transformation and noise, such as corner points, edge points, bright points in dark areas, and dark points in bright areas.
a. Invariance: ——Invariance
to image rotation and scale changes; ——Strong
adaptability to three-dimensional viewing angle changes and illumination changes;
——Local features, which remain invariant when occlusion and scene clutter;
b. Strong discrimination : ——The
ability to distinguish between features is strong, which is conducive to matching;
c, the number is large:
——Lowe's original words: Generally 500*500 images can extract about 2000 feature points (this number depends on The choice of image content and several parameters).
Extract extreme points in the Difference of Gaussian (DOG) scale space and optimize them to obtain feature points.
Insert picture description here
2, the specific point detection step SIFT Algorithm:
- Construction of scale space;
- Difference of Gaussian scale space configuration;
--DoG point detecting scale-space extrema;
- precise positioning feature points;
- removing unstable points;

Second, the source code

close all;clear all;clc;
 
im1=imread('testdata\x1.jpg');
im2=imread('testdata\x2.jpg');
 
gray1=zoo_x2gray(im1);
gray2=zoo_x2gray(im2);
 
[des1,loc1]=zoo_sift(gray1);
[des2,loc2]=zoo_sift(gray2);
 
figure;zoo_drawPoints(im1,loc1,im2,loc2);
 
Num=3;
Thresh=0.85;
 
match=zoo_BidirectionalMatch(des1,des2,Num,Thresh);
 
clear des1 des2
loc1=loc1(match(:,1),:);
loc2=loc2(match(:,2),:);
 
figure;zoo_linePoints(im1,loc1,im2,loc2);
 
agl=zoo_getRotAgl(loc1,loc2);
 
figure;zoo_drawRotAglHist(agl);
 
opt=zoo_optIndex(agl);
loc1=loc1(opt,:);
loc2=loc2(opt,:);
 
figure;zoo_linePoints(im1,loc1,im2,loc2);
 
T=zoo_getTransMat(gray1,loc1,gray2,loc2);
im=zoo_imRegist(im1,im2,T);
 
figure,imshow(im);

Three, running results

Insert picture description here
Insert picture description here

Four, remarks

Complete code or writing add QQ2449341593 past review
>>>>>>
[Matlab 024] [Image processing 1] Image compression of Matlab image processing tutorial series
[Matlab 025] [Image processing 2] Matlab image processing tutorial series Image segmentation (1)
[Matlab 026 issue] [Image processing 3] Image segmentation of Matlab image processing tutorial series (2)
[Matlab 029] [Image processing 4] Matlab fingerprint recognition
[Matlab 030] [Image processing 5] Bank Card number recognition matlab source code
[Matlab 074] [Image processing 6] [Image clustering] Based on FCM and improved FCM brain CT image clustering processing
[Matlab 075] [Image processing 7] [Image evaluation] Based on CCF algorithm Image quality evaluation
[Matlab 076] [Image processing 8] [Image enhancement] CLAHE algorithm based on local contrast enhancement-histogram enhancement
[Matlab 077] [Image processing 9] [Image fusion] Image fusion based on Frequency Partition
[ Matlab Issue 078] [Image Processing 10] [Image Evaluation] Image quality evaluation based on svm without reference
[Image Edge Detection] Matlab source code of ellipse edge detection based on least square method [Matlab Issue 079] [Image Processing 11]
[Image Encryption] Image encryption and decryption based on chaotic system matlab source code with GUI [Matlab 080 period] [Image processing 12]
[Image processing] Based on DWT+DCT+PBFO to improve image watermark hiding and extraction matlab source code with GUI [Matlab 081 period] [Image processing 13]
[Image fusion] Image fusion matlab source code based on CBF algorithm [Matlab 083] [Image processing 15]
[Image segmentation] Image segmentation matlab source code based on random walk algorithm [Matlab 084] [Image processing 16]
[Image filtering] Image two-dimensional bilateral Gaussian filtering [Matlab 085] [Image processing 17]
[Image denoising] Image denoising based on adaptive morphology [Matlab 086] [Image processing 18]
[Image enhancement] Water based on DEHAZENET and HWD Down-scattering image enhancement [Matlab 087] [Image processing 19]
[Image enhancement] PSO optimization ACE image enhancement matlab source code [Matlab 088] [Image processing 20]
[Image enhancement] Based on region similarity transformation function and dragonfly algorithm Gray image enhancement [Matlab 089] [Image processing 21]

Guess you like

Origin blog.csdn.net/TIQCmatlab/article/details/112986660