Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.57 KB

README.md

File metadata and controls

49 lines (37 loc) · 1.57 KB

Bar and QR code detector

Life is short, use Python

This project is forked from zbar library, I added few modifications, so webcam can be used as an image reader to detect QR and Bar codes.

  • Pure python
  • Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
  • Decodes locations of barcodes
  • No dependencies, other than the zbar library itself
  • Tested on Python 2.7, and Python 3.4 to 3.6

Here is a quick look of the final output:

webcam QR detection

Installation

Mac OS X: Install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install zbar lib:

brew install zbar

Linux:

sudo apt-get install libzbar0

Install this Python wrapper; use the second form to install dependencies of the command-line scripts:

pip install pyzbar
pip install pyzbar[scripts]

Jupyter Notebook:

Go to see the Jupyter Notebook for more details.

  1. QR_Bar_Code_Detector_Basic
  2. QR_Bar_Code_Detector_Webcam

License

pyzbar is distributed under the MIT license (see LICENCE.txt). The zbar shared library is distributed under the GNU Lesser General Public License, version 2.1 (see zbar-LICENCE.txt).