Card recognition, how to get started?

Hi,

I’m a new commer in OpenCV’s world and my project would be to detect some Magic the Gathering (MTG) cards in order to sort and count them.

I watched many videos that does object recognition, I followed a tutorial that sets up an object detection with ORB/SIFT, its decently working but I don’t know how to make some match score. Also its quite slow (OpenCV + Project in release mode recognizes the card in 30~50ms), given that MTG has more than 30k cards (some are identical but with different editions), it may take too much time to process all the database.

So I’d like to know where to start with ? My input will be from a camera with poor to high quality, and the common case should be 1 card at a time (so I could automate the card sorting with a raspberry).

Here’s what I though to do in the first place:

  1. Detect the card in the frame to have a tight region of interest (front side of the card and not rotated)
  2. Detection the card’s edition (if it has one) + detection and reading name to reduce matches.
  3. Picture recognition (illustration will (should?) be the same for all languages where the text will obviously not)

What would be the best approach ?

I can do Python/C++, thats not a problem, I’ll will translate the code in another language depending on my needs.

If the card object would not change its size in the inspection image, you can try NCC-based method.

Effect is as followed:

Whole version of this project