Magic Decoding of UPC Codes on Books

Peter Rukavina

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:

07172008016 - Share on Ovi

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:

Results of my Email an UPC Script

Comments

Submitted by Roland Tanglao on

Permalink

are you going to offer this as a public web service?
i’d love to try this, email me roland@rolandtanglao.com, and i can be user#2! (i’d be emailing from ShoZu coz the Nokia email client is horrid!)

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search