How can I confirm that a template image is found in the primary image using cross correlation?
3 views (last 30 days)
Show older comments
Fego Etese
on 9 Mar 2020
Answered: Satadru Mukherjee
on 27 Apr 2021
How can I really confirm that the small template image exists in another image using the cross correlation? and please which is better for template matching between normxcorr2() and xcorr2() methods?
I am working on fingerprint matching and it is required that around each minutiae point i extract a template image of a specified size. and this template image will be searched for in a different supplied fingerprint image. My understanding of correlation is that it gives the level of similarity between two signals such as images, so is there like a threshold level that if the similarity level crosses then surely the template image is in the primary image or how do I know that the template is found in the primary image?
Thanks.
2 Comments
Adam Danz
on 16 Mar 2020
@Fego Etese, I saw your msg from a different thread pointing me to this one. It looks like Image Analyst has you straightened out.
Accepted Answer
Image Analyst
on 11 Mar 2020
Threshold the correlation output image. If the signal is high enough, then you can assume the pattern is there. If there are no points above the threshold, then the pattern is not there. If you still need help, then attach your template image, an image where the template appears, and an image where the template does not appear.
5 Comments
Image Analyst
on 15 Mar 2020
It's possible to have the same correlation value with different templates. In that case, you might want to subtract the template from the image at that location, maybe with imabsdiff(), and determine which had the lower average absolute difference.
More Answers (1)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!