So this iPhone walks into a bar … no, wait, it takes a picture of a bar code. And then it proceeds to do something clever with it. That’s a fairly interesting application space, yes? Well, here’s a roundup of resources to help you along with that!
First off, there’s the Zebra Crossing project at Google Code:
ZXing (pronounced “zebra crossing”) is an open-source, multi-format 1D/2D barcode image processing library implemented in Java. Our focus is on using the built-in camera on mobile phones to photograph and decode barcodes on the device, without communicating with a server. We currently have production-quality support for:
- UPC-A and UPC-E
- EAN-8 and EAN-13
- Code 39
- Code 128
- QR Code
We also have experimental support for the DataMatrix format.
Unfortunately, it’s written in Java; however, they do have an iPhone client off the ground, currently supporting QR Code, so there’s something to work with there at least.
Another option is to work from the desktop downwards; the great folks at Bruji who do a variety of ThingPedia applications have freed the source to their barcode scanning engine:
The barcode scanner project, written in Cocoa, is for scanning barcodes on books, DVDs, CDs and video games as well as most other kind of EAN or UPC barcodes. It is part of our programs – DVDpedia, Bookpedia, CDpedia and Gamepedia – and is also used by Books. The code is available for free in the hopes that it’ll be useful to other Mac developers.
And they even offer a $500 bounty if you can improve the code!
Before you get too excited with the possibilities here though, we should note that there is a body of opinion which holds that the optical properties of the iPhone camera will make it challenging to reliably decode ISBN or other 1-dimensional bar codes due to their small feature size, at least unless you attach some kind of macro lens. But hey, if it was easy, anybody could do it, right?:
h/t: iphonesdk!
UPDATE:
There is a commercially licensed SDK available at RedLaser.com – “Impossibly accurate barcode scanning”!
And another called VSBarcodeReader – “the most advanced barcode reading library for the iPhone”!
Note this Stack Overflow thread on their pricing:
… Red Laser is expensive though. They ask 10% of your sales of which an upfront fee of $2500…
… I wanted to user VSBarcodeReader, but Vision Smarts quoted me a price of $7000 USD and 10% of my sale price…
Another somewhat cheaper commercial option is Softek Barcode Reader Toolkit SDK.
And there is a free – but including ads – SDK available at freebarcodescanner.com.
And there’s the Barcode iPhone App project using the open source libdmtx.available on Google Code.
If QR Codes are good enough, check out Open Source QR Code Library; there’s a project using it here, and another here.
Or for QR Code and ECN/ISBN, there’s Zbar on Sourceforge.
BONUS:
For creating barcodes, as opposed to scanning them, check the free iOS Barcode Library!
EXTRA BONUS:
Some cool real world + iPhone barcode integration ideas here:
The iPhone as Barcode Scanner: A Huge Opportunity
OCT
Pingback: bar coding followup at Under The Bridge