필터 지우기
필터 지우기

How to check if there is a shift in the images, and output the shift in terms of values

조회 수: 2 (최근 30일)
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개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by