Skip to content

Using Webcam to Read one-dimensional barcodes and QR codes from Python 2 and 3

Notifications You must be signed in to change notification settings

cuicaihao/Webcam_QR_Detector

This branch is 22 commits ahead of, 102 commits behind NaturalHistoryMuseum/pyzbar:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

28831bb · Oct 16, 2018

History

92 Commits
Oct 7, 2018
May 18, 2018
May 18, 2018
May 18, 2018
May 18, 2018
Nov 8, 2016
Apr 30, 2018
Jan 18, 2017
May 18, 2018
Oct 7, 2018
Oct 7, 2018
Oct 7, 2018
Oct 16, 2018
Oct 7, 2018
Aug 25, 2018
Mar 18, 2018
Nov 8, 2016
Mar 18, 2018
Jan 18, 2017

Repository files navigation

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).

About

Using Webcam to Read one-dimensional barcodes and QR codes from Python 2 and 3

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 93.7%
  • Python 6.3%