1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
==========================================
zbar -- read barcodes from images or video
==========================================
ZBar Bar Code Reader is an open source software suite for reading bar
codes from various sources, such as video streams, image files and raw
intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128,
Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. These are
the Python bindings for the library.
Check the ZBar project home page for the latest release, mailing
lists, etc.
* https://github.com/mchehab/zbar
Installation
------------
To install this module type the following::
python setup.py install
Dependencies
------------
This module requires the ZBar Bar Code Reader, which may be obtained
from:
* https://github.com/mchehab/zbar
Windows users please note: the module *will NOT load* unless the ZBar
library DLL (currently libzbar-0.dll) is available in your Windows system
PATH!
Examples
--------
To scan an image, wrap the raw image data in a ``zbar.Image`` and feed
it to a ``zbar.ImageScanner``::
import zbar
scanner = zbar.ImageScanner()
image = zbar.Image(width, height, 'Y800', raw_data)
scanner.scan(image)
for symbol in image:
print 'decoded', symbol.type, 'symbol', '"%s"' % symbol.data
Complete, runnable examples may be found in the source distribution,
under the ``examples/`` directory. A couple of HOWTOs_ that cover
programming with the library may be found on the project wiki.
.. _HOWTOs: http://sourceforge.net/apps/mediawiki/zbar/index.php?title=Category:HOWTOs
Copyright and License
---------------------
Licensed under the GNU Lesser General Public License, version 2.1.
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
Copyright 2008-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
|