A bar code reader which detects and read barcode and Qr codes from the live streaming webcam, laptop cam and mobile phones (back and front both) camera.
getUserMedia
API call to get live camera feed./bar/static/js/main.js
/bar/views.py
/bar/barcode.py
To run locally:
First fork this repository and then follow these steps:
git clone https://github.com/your-name/Zbar-barcode-reader-python-javascript.git
cd Zbar-barcode-reader-python-javascript
pip install -r requirements.txt
python manage.py runserver
Now open 127.0.0.1:8000 locally on your browser.
Note: Starting with Chrome 47, getUserMedia()
requests are only allowed from secure origins: HTTPS or localhost.
Solution: For development use django-sslserver
for testing on different mobile devices and IP other than localhosts. Find this out here
For best results use mobile back camera
Sequence Diagram
Feel free to add an issue if you are facing any problem related to this project.