Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 888 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 888 Bytes

Python bindings for zxing-cpp

Build + Deploy PyPI

Installation

pip install zxing-cpp

or

python setup.py install

Note: To install via setup.py, you need a suitable build environment including a c++ compiler.

Usage

import cv2
import zxingcpp

img = cv2.imread('myimage.png')
results = zxingcpp.read_barcodes(img)
for result in results:
	print("Found barcode:\n Text:    '{}'\n Format:   {}\n Position: {}"
		.format(result.text, result.format, result.position))
if len(results) == 0:
	print("Could not find any barcode.")