Ask Your Question
1

Recognize play card

asked 2013-10-04 09:49:43 -0600

MaxiPigna gravatar image

Hello, I want to implement an application for Android able to recognize play cards. In particular, my problem is that cards are arranged as here. So, I guess that the best way to recognize them is trying to read the number/letter (and symbol for the joker) on the corner, since I do not care about the suit of the cards. How can I do that? Sorry, but I am not an expert so please I need of your help.

edit retag flag offensive close merge delete

Comments

I'm not sure, but I think template matching can help you identify number/suits. http://docs.opencv.org/doc/tutorials/imgproc/histograms/template_matching/template_matching.html

GilLevi gravatar imageGilLevi ( 2013-10-04 12:29:49 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-10-04 11:03:22 -0600

Maxim Galushka gravatar image

Hi,

You can try to train Haar classifiers to recognize the suit for cards, here is article with detailed explanations how this can be done: http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html

However this is not simple task as you will require a lot of positive/negative samples for this.

To recognize the numbers - I think there should be existing solutions, here is good source on OCR: http://blog.damiles.com/2008/11/basic-ocr-in-opencv/

Also you can use findContours to separate cards from each other.

This is not a simple task, if you are really interested - post here your findings and code and I can help to get you tight direction.

edit flag offensive delete link more

Comments

Thanks for your answer. As I said I do not care about the suit of the card, so why should I implement that classifier to do that? I need only to recognize letters and numbers, because what I want to get is counting how many cards there are for each number/letter. For instance, looking the previous example the first player has six Ks, one 7, five 8s, one 9, three Js and one joker.

MaxiPigna gravatar imageMaxiPigna ( 2013-10-04 11:49:12 -0600 )edit

Question Tools

Stats

Asked: 2013-10-04 09:49:43 -0600

Seen: 4,527 times

Last updated: Oct 04 '13