Normalized 2D cross correlation
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
c = normxcorr2(onion,peppers);
[ypeak, xpeak] = find(c==max(c(:)));
yoffSet = ypeak-size(onion,1);
xoffSet = xpeak-size(onion,2);
Does anyone know why the dimension of "c" is about (size(onion,1)+size(peppers,1)*)(size(onion,2)+size(peppers,2))? and what are the meanings of xoffset and yoffset? why do they need to be acquired like that?
In the example in the URL, the template is exactly croped from A. But what if my template and image are of different scales? How do I get the desired area?
thanks,
0 Kommentare
Antworten (1)
Image Analyst
am 5 Apr. 2015
When you correlate or convolve two images, the result is bigger because you will still have overlap even if only part of the images overlap, like one image is mostly outside the other image and only the right column of the left image overlap the left column of the right image.
By the way, I've attached my demo on template finding using normxcorr2.
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!