When maker Michael Portera rediscovered his collection of childhood Magic: The Gathering cards, he decided to make a machine to catalogue how many of them he had found, and what they’re worth.

To do this he made a small feeding mechanism out of LEGO. A hopper holds the cards with small, motorised tires pushing the next one onto a tray.

Here a picture of the card’s name is taken by a camera connected to a Raspberry Pi 3 Model B.

Amazon Rekognition is used to turn the picture into a string of text which is then fed into the TCGplayer API to find its price.

Of the 920 cards scanned, 619 were perfect matches. 201 cards were off by one letter, and the final 100 had more than one error.

Portera adds that, by using his machine, he found out that the cards he had were worth around $275.

While $275 isn’t a huge sum of money for the effort put into the project, he does note that he already removed the obviously pricey cards he was familiar with, so this amount is from the less desirable cards.

While this project was designed to go through old cards for someone returning to the hobby, it could be invaluable for someone running a card resale shop.

After opening up a booster box the cards could be loaded into this machine and scanned into an inventory.

If someone has plans to do that they’ll need to make some massive revisions to the hardware. While LEGO can be an okay material to build this kind of machine out of, this version is very barebones and used only the pieces from one set.

We have to imagine that those rubber wheels – intended for small toy cars – are not made for delicate work.

If you’d like to have a try at making your own, Portera has provided a full guide complete with the Python code used.