In the world of trading card games, cards are traded among community members. In order to determine if the trade is fair, there is a market value determined by TCGPlayer. It is very tedious to look up a bunch of low value cards every time a trade is made so we wanted to make it easier.

What it does

Image processing and ML, determine if there are magic cards in an image, the names, and the dollar value. It takes in an image and writes text over the detected cards, displaying the name and value.

How I built it

OpenCV and a lot of math was used to try to figure out what is a card in an image. The card is then transformed to a flat plane for more consistent processing. The name of the card is isolated. There is a machine learning system that reads the text. The read text is cross-referenced with a card name database, finding the closest card name by Levenshtein distance. A request is made to the TCGPlayer pricing API, and the name and price are drawn on the card's image.

Challenges I ran into

The text reader was a pain to use/develop. There were many dead ends when trying to tackle this part.

Accomplishments that I'm proud of

Actually detecting cards! This took the majority of the time and was very touchy. Using the Levenshtein distance was a great idea that made card lookup possible too.

What I learned

A lot more about computer vision and the techniques used for "fast" object recognition.

What's next for Gitaxian Probe

An iOS app for trading Magic cards!

Built With

Share this project: