Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read a barcode from an image [closed]

I'm seeking a library, technique or advice on how to read an EAN-13 barcode from an image (including ISBN,and ISSN encodings). The image would come from a mobile phone or webcam, so resolution may be quite poor and not well aligned.

I'm specifically interested in something that could be used from ruby on rails, but answers for other languages are welcome. Open Source solutions preferred.

Leading solutions to date:

  1. ZBar (previously known as Zebra - h/t @bgbg, @Natim) - implemented in C with interfaces for Python, Perl, and C++
  2. ZXing (h/t @codr) - implemented in Java (J2SE and Android) with other modules/ports in varying states of development (JavaME, C#, C++, JRuby, RIM, iPhone/Objective C)
like image 993
tardate Avatar asked Sep 22 '08 07:09

tardate


People also ask

Can you scan a barcode off a picture?

Your Phone's Gallery App (Android)Open the photo with the QR code in the native Gallery app. Tap on the Google Lens icon to scan the code. The results should appear immediately.


1 Answers

The zebra barcode reader (http://zebra.sourceforge.net/) is a small, layered bar code scanning and decoding library implemented in C (C++ wrappers are also provided). It supports many popular symbologies (types of barcodes), including EAN-13. However, I'm not aware about any Ruby bindings. The library is available under the GPL

like image 58
Boris Gorelik Avatar answered Sep 22 '22 14:09

Boris Gorelik