Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

recognising playing cards that are dealt

I am a newcomer to this, but I want to be able to recognise playing cards dealt online and list them in an order. Is there any expert who can help?

0 Kudos
Message 1 of 2
(3,745 Views)

Hello,

 

not an expert, but one of possible solutions:

 

1. acquire images of all cards from online (if poker then 52 cards)

 

2. use template editor (you can also do your own programming, but for testing this will be faster) to capture all 52 reference templates. I would build the reference image so, that both the number (A to K) and the suits (clubs, hearts, spades, diamonds) are considered.

 

3. assign a number to each template. For example assign the card number "2" value 0 and card "A" value 12. If you want to order the same card with different suits (for example "king of hearts" and "king of spades") you can also use floating point datatype.

 

4. search the image of dealt hand and match the patterns (loop through all of the templates, or until the same number of reference templates are found as there are cards dealt). For 52 different templates you need to find only one match per each. Perform all image processing in grayscale space.

 

5. Through assigned values you can now sort the cards from highest to lowest (or other way round).

 

If you want to perform this while online, you could perform a screen capture and extract the apropriate region of interest before finding the matches.

 

Note: Pattern matching is not fully scale invariant (only couple of %), geometric pattern matching is (if template is trained so).

 

I hope this can help you. Maybe somone can give you better advice on a different approach.

 

Anyway, are you trying to port Rainman (the movie) to digital space? 🙂

 

Iris: So, what are you doing in Las Vegas?

Raymond: We're counting cards.

Iris: You're counting cards?

Raymond: We're counting cards.

Iris: That's interesting.

Raymond: We're counting cards.

 

Best regards,


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 2
(3,730 Views)