Ask Your Question
0

Eliminating false positives while using the matchTemplate() function?

asked 2015-03-06 08:05:13 -0500

Denson gravatar image

The matchTemplate() function in opencv seems to giving positives even when the desired Template is not there in the Scene image.On searching,found out that it always gives a detection/match even if the template is not there.The detection being the closest match. Since my application requires that the template not necessarily be in the scene image. This brings me to my question. Is there a way to minimize or even eliminate these false positives.Any approach towards this problem is appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-06 08:23:43 -0500

thdrksdfthmn gravatar image

updated 2015-03-09 03:03:18 -0500

If you watch the doc, you'll see that the result is the map of comparisons, so depending on the method, you'll get an error of matching. You can filter the result by a threshold (you do not want a match that has an error larger than X).

You can filter the result with threshold and you shall test the X value for finding a good one. Good luck!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-03-06 08:05:13 -0500

Seen: 656 times

Last updated: Mar 09 '15