Let me briefly sing the praises of the amazing bit open source of code that is Zebra Barcode Reader. Using the zebraimg application that’s included with the source code, I can take a JPEG image of a UPC code on the back of a and get the book’s ISBN returned to me as text.
I’ve managed to assemble the pieces of a puzzle that lets me take a photo of a book’s UPC code, email it to my server, and receive back, a few seconds later, the best Amazon.com prices for new and used copies of the book. It all seems, well, rather magical when it works. And the barcode decoding part of the process seems to work very, very well — 100% so far, in fact.
This was all induced by this 43 Folders blog post about iPhone applications that don’t exist — I reasoned that, as the Nokia N95 has an excellent macro mode for taking close-ups with its 5MP camera, it would also be very good at taking barcode photos with enough resolution to easily decode. And it does.
Here’s how the process works. First, I take a photo with the N95’s camera, using the macro mode and holding the camera about 6 inches above the UPC code:
Next, I email the photo, using the N95’s built in mail application and its wifi connection, to a special email address I’ve set up on my server. There’s a script on the server that intercepts the incoming email, pulls the JPEG image’s MIME attachment out of the message, runs the image through zebraimg to get the UPC code, and then uses the Amazon.com API ItemLookup operation to find the title, author and prices for the book. These are then simply emailed back to the sending address:
