Image Matching always returns a location
Why does image matching always return a found match location? Shouldn't just return 0,0 if the image isn't found?
Why does image matching always return a found match location? Shouldn't just return 0,0 if the image isn't found?
matchTemplate isn't returning a result each time. It computes the overlapping of the template to the image, with the specified method. Therefore, there is always a results (for all pixels, the square difference, or the correlation, ...). When you use MinMaxLocation to find the "most probable position of the template on the image", I insist on the "most probable", you have a score, that you can threshold if it's too low. It's up to you and depend on your context.
Asked: 2013-08-19 20:40:43 -0600
Seen: 344 times
Last updated: Aug 21 '13
What is the price of 3D face dataset? Can anyone suggest a good 3D face dataset?
How to compile OpenCV 2.4.4 with MS-VS2010 and Cmake
template matching in multiple images
Need help about extracting a circular portion from image
How to display a raw image using Opencv
A question about registration function in Opencv2.4.2
What did you call "image matching"? matchTemplate? DescriptorMatcher (FLANN, BF)?
Just a remark. In the future, try using tags without hashtags to it. It creates unneccesary doubles in the tags list, which makes it harder to perform good filtering on this forum. Thanks in advance! I have adapted your tags for this topic.