Ask Slashdot: Automated Tool To OCR CCGs Like Magic: the Gathering?
An anonymous reader writes I buy massive collections of trading card games, Magic:The Gathering, Yu-Gi-Oh!, Pokemon, Weiss Schwarts, Cardfight Vanguard, etc, etc. And I've gotten the process fairly streamlined as far as price checking, grading, sorting, etc. Part of my process involves using higher-quality web cams positioned over the top of the cards which are in a stack. I keep a cam window on the screen to show a larger, brighter version of the card. What I'm wondering: Is there is an OCR solution out there that will look at the same spot on the screen, capture, ocr, dump to clipboard, etc.? I've tried several open source solutions but none of them quite fit my needs. What I'd really like is to be able to hit a hotkey, and have my clipboard populated with the textual data of the graphics in a pre-set x,y window range. All this should be done via a hotkey. I may be asking for a lot, but then again, I'm sure someone out there has had need of this type of set-up before. Anyone have any recommendations?
Grab an OCR system off of https://help.ubuntu.com/community/OCR. Get ImageMagick. Get streamer (package xawtv). Create a script on the order of:
now=$(date --iso-8601=ns) /dev/video0 -b 32 -o $file
file=$now.png
outfile=$now-cropped.png
streamer -c
convert $file -crop 40x80+150+120 $outfile
gocr $outfile > $now.txt
rm $outfile
Now create a keyboard shortcut with your window manager to run this script, or open a terminal and get used to pressing up and enter a lot.
If you're not on Linux, sorry.
I use it every day. The Android app is phenomenal at picking the right card from the database based on the picture. The only real problem is that it doesn't have all the alternate art versions of cards from older MTG sets. The interface is a bit sloppy on the desktop version, but the recognition is pretty good.