Trying to match tokens on a playfied

Hello,

I am using this tutorial https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_feature2d/py_matcher/py_matcher.html
to match a png in a camera imgage.

It’s amazing and quite simple.

However, I noticed a small issue. Here the sample code: GitHub - egandro/opencv-matcher-test

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.

  1. What are possible options to fix this?
  2. I tried several other geometric simple figures (triangle,pentagon,square) and the all fail with low keypoints.
  3. 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.

Where to start?

Thank you :slight_smile: