Ponies and Computer Vision

Wooty

Well-Known Member
Staff member
As you may know, I enjoy taking up random challenging projects in my spare time. As a result, I've recently begun development on a card game visual recognition system, capable of picking trading / game cards out of any image, and identifying them. The project began because I wanted to play card cages online via webcam, but it's difficult to read the text on a card when the webcam image is so grainy.

At the moment, the system can find and identify any one of the 211 cards in the Premiere mlp ccg deck. However, with proper deck scans, the system should be able to work with any card game.

http://imgur.com/a/BnJEi
 
So, I had an idea for an app like this previously. The idea is that stores often list magic the gathering cards online for sale, but it takes forever, as you have to type in the card name and the set of each individual card. This would probably be even more challenging, since there are thousands upon thousands of magic cards (there is a program called decked builder that implements something like this for android, but due to the sheer number of cards you need to select the set a card is from.

Basically you would scan a card, it would recognize it, you'd enter the grade, and then add it to a text file. The text file could then be batch loaded to TCG player or the like. You could probably skip some of the median steps once you get access to TCGPlayer's API, however TCGplayer is kind of annoying about getting API access.
 
How does the program recognize cards? Does it compare pixels with a library of "registered" cards and make a best-fit guess?
 
How does the program recognize cards? Does it compare pixels with a library of "registered" cards and make a best-fit guess?

Yes. Downscale, blur, edge detect, merge features, detect contours, discard invalids, transform for perspective, rotate, blur, blur, blur, equalize, diff against reference card, make binary, merge features, crop, count pixels.
 
Yes. Downscale, blur, edge detect, merge features, detect contours, discard invalids, transform for perspective, rotate, blur, blur, blur, equalize, diff against reference card, make binary, merge features, crop, count pixels.

Have you explored the limitations of your program yet? How far away can a card get from the camera before the system makes mistakes? How much can a card be tilted?
 
How do you transform for perspective? That's always bugged me.

It's some pretty complicated matrix math that I honestly don't fully understand. In Team9000 the game, we actually do the exact reverse -- calculating the matrix to make the movie screen transform from flat screen space into 3d world space.
 
Do you plan to take this anywhere? Release it as freeware somewhere? Work on it further to improve it in your spare time? Perhaps even sell it once it's reached an excellent standard of use?
 
Back
Top