Cross-Correlation between two images
How can I select a random point on one image, then find its corresponding point on another image using cross-correlation?
So basically I have image1, I want to select a point on it (automatically) then find its corresponding/similar point on image2.
Here are some example images:
Full image:
Patch:
Result of cross correlation:
NOTE:-
Answer:
Well, xcorr2
can essentially be seen as analyzing all possible shifts in both positive and negative direction and giving a measure for how well they fit with each shift. Therefore for images of size N x N
the result must have size (2*N-1) x (2*N-1)
, where the correlation at index [N, N]
would be maximal if the two images where equal or not shifted. If they were shifted by 10 pixels, the maximum correlation would be at [N-10, N]
and so on. Therefore you will need to subtract N
to get the absolute shift.
With your actual code it would probably be easier to help. But let's look at an example
SEE COMPLETE ANSWER CLICK THE LINK
https://matlabhelpers.com/questions/cross-correlation-between-two-images.php
Comments
Post a Comment