Real time Barcode and QR Code scanner Edit
Project description
zbarcam
Real time Barcode and QR Code scanner using the camera. It's built on top of Kivy and pyzbar.
How to use
Simply import and instanciate ZBarCam
in your kvlang file and access its symbols
property.
#:import ZBarCam kivy_garden.zbarcam.ZBarCam
#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
BoxLayout:
orientation: 'vertical'
ZBarCam:
id: zbarcam
# optional, by default checks all types
code_types: ZBarSymbol.QRCODE, ZBarSymbol.EAN13
Label:
size_hint: None, None
size: self.texture_size[0], 50
text: ', '.join([str(symbol.data) for symbol in zbarcam.symbols])
A full working demo is available in src/main.py.
Install
Ubuntu
Install system requirements (Ubuntu 18.04):
make system_dependencies
Install zbarcam:
pip install --upgrade zbarcam
Then import it in your Python code via:
from kivy_garden.zbarcam import ZBarCam
Android
Build for Android via buildozer, see buildozer.spec.
Contribute
To play with the project, install system dependencies and Python requirements using the Makefile.
make
Then verify everything is OK by running tests.
make test
make uitest
Troubleshooting
Android ValueError: Empty module name
More likely an import issue in your .kv
file.
Try to from zbarcam import ZBarCam
in your main.py
to see the exact error.
It's common to forget Pillow
in buildozer.spec
requirements
section.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for kivy_garden.zbarcam-2019.910.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5fde1767196c0161d2b119b66ac0e975fb370aa97d56b9b72428c47743b914 |
|
MD5 | 45055b64745d4e97a695c53d46159717 |
|
BLAKE2b-256 | e1833fdf3cfa012710b8266a2b3d65e6f491451c5858b8b236e6742a03a11ddf |
Hashes for kivy_garden.zbarcam-2019.910-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4747a16f88a51abafc9d3661a018e08e4109f28e7c503cf81c26ffa82c3bcc0 |
|
MD5 | 532f5434fac85a5520ca6f48a37d3311 |
|
BLAKE2b-256 | 9f4dfcd70388721abfbc03728095c9ee305c416a30a768ef4cca823e5695b8da |