How to check if there is a shift in the images, and output the shift in terms of values
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi , I have 2 gray images having very slight differences, I want to check if there is shift or change in between those 2 images. How can I do that.I used normx2corr command and get the corr_offset, but its always 0 0 , where as there is a difference in the images.Any help or advice would be appreciated.
im1 = imread('image1.png');
im2 = imread('image2.png');
im1a=rgb2gray(im1);
im2a=rgb2gray(im2);
cc = normxcorr2(im1a,im2a);
[max_cc, imax] = max(abs(cc(:)));
[ypeak, xpeak] = ind2sub(size(cc),imax(1));
corr_offset_1 = [ (ypeak-size(im1a,1)) (xpeak-size(im1a,2)) ]
output -->corr_offset =
0 0
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!