This project is an implementation of a QR code and barcode scanner using OpenCV in Python. It can detect and decode QR codes and barcodes from images or real-time video streams.
- Detect and decode QR codes and barcodes from images.
- Real-time QR code and barcode scanning using a webcam.
- Supports various barcode formats.
-
Clone the repository:
git clone https://github.com/your-username/qr-barcode-scanner.git cd qr-barcode-scanner
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
- Place your image in the
images
directory. - Run the script with the image path as an argument:
python scan_image.py --image images/your-image.jpg
- Simply run the script:
python scan_realtime.py
scan_image.py
: Script to scan QR codes and barcodes from images.scan_realtime.py
: Script to scan QR codes and barcodes in real-time using a webcam.requirements.txt
: List of dependencies required to run the project.images/
: Directory to store images for scanning.
- Python 3.x
- OpenCV
- NumPy
- Pyzbar
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.
For any inquiries or issues, please open an issue on GitHub or contact the project maintainer.