Search code examples
phpjavascriptimage-processingbarcode

Identify EAN / UPC barcode numbers from image in PHP / JS?


I'm looking for a way to identify EAN / UPC (primarily EAN) barcode numerals from a camera-captured image in PHP or Javascript. I've found a few libraries for Java but ideally would like one of PHP or JS to manage it. Not sure if feasible, but any advice appreciated!

Edit: tried http://zxing.org/w/decode.jspx with some sample images from iPod Touch camera, with mixed success.


Solution

  • I did a project where this was a requirement so we ended up using this library. http://sourceforge.net/projects/zbar/

    A fellow consultant working with me wrote up an image crop tool that allowed a user to crop an uploaded image down to just the barcode, this was then shoved into a ghetto MQ using sqlite, where a resident agent running on the machine polled sqlite and processing pending records ( transaction_id, path2file, date of trx ) reported back to the application via a web service call the result.

    I was the one that did the R&D for this feature request and I don't remember any bar scanning libraries for PHP plus Python isn't so painful to learn, just got to master daemonizing a python script to run as a service then read up on urllib2 for sending the response back to the PHP app. We did it in 48 man hours between two people, add another 15-20 hours to learn enough about Python and it should be doable.