A real-time QR Code scanning program using webcam and Python 3
There are 3 dependencies for this project:
- ZBar
- pyzbar
- OpenCV
- imutils
Before installing anything I would prefer you to make virtual env using your favourite tool like conda, pipenv etc.
Installing ZBar for Ubuntu can be accomplished with the following command:
foo@bar:~$ sudo apt-get install libzbar0
You can simply use pip to install pyzbar
foo@bar:~$ pip install pyzbar
Here is a step by tutorial showing you how to install OpenCV 3 on Python 3. Just follow the tutorial.
Only after installing OpenCV install imutils as it depends on it.
foo@bar:~$ pip install imutils
Check whether you webcam is accessible by running the webcam.py program.
foo@bar:~$ python webcam.py
Run the program by using python
foo@bar:~$ python custom_qr.py
Results,
You can find a complete tutorial on this here.