Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Having a defined set of just 52 database images isn't a big problem. And OpenCV will offer you the right tools to accomplish your task.

In my opinion, your biggest challenge will be to avoid false classifications, as your database images are very similar one to each other. If, for example, you are using SURF features, and trying to recognize an 8 of heart, it might be classified as a 7 or 9 of heart, because the set of extracted features will be very similar.

For a good overall classification result, you could consider some intelligent combination of one or more following classificators:

  • finding the card contours and mapping it to a rectangle
  • detect the card's color (red or black)
  • find contours within the card's rectangle and classify them as club, spades, heart or diamond using for example matchShapes()
  • count the occurences of a shape with using for example matchTemplate()
  • feature extraction and matching (e.g. with SURF and FlannBasedMatcher or BFMatcher)
  • ....