On I map I have a circle shaped green token. I want to match this. The detectAndCompute functions give me either 0 or 6 keypoints to the template.
That are almost no edges/corners and the whole matching fails.
What are possible options to fix this?
I tried several other geometric simple figures (triangle,pentagon,square) and the all fail with low keypoints.
Template matching is no option, because the tokens are rotated.
What worked very well, adding a Letter “A” or an emticon to the template. I have existing “tokens” e.g. player figures that have that round shape with a white dot.
I am willing to have different detector shape, as I can do a prerun.
As always, posting an example image helps a lot. It’s difficult to have an idea about your exact problem without it.
TemplateMatching is a simple function, so it’s often recommended in tutorials, as it’s easy to explain. However it gives good results only for cases that are very similar: objects of same size, angle, same color (and illumination)…
For more complex cases you might need to use more robust matching functions: SIFT, SURF, ORB… (also part of OpenCV)