This project implements a barcode detection and reading system using Python. It processes single images, multiple images from a folder, or videos to detect barcodes, crop the detected regions, and read the barcode values. The results are saved in an output directory with the detected barcodes annotated in the images.
- Python 3.x
Steps to install all the dependencies:
git clone https://github.com/Sk-bishnoi/barcode_detection.git
cd barcode_detection
pip install -r requirements.txt
sudo apt-get update
sudo apt-get install libzbar0
This project has been tested on the following environment:
- Ubuntu 20.04
You can run the script with the following commands based on the type of media you want to process:
-
For a Single Image:
python main.py --type image --path /path/to/image.jpg
-
For Multiple Images:
python main.py --type images --path /path/to/images/folder
-
For a Video:
python main.py --type video --path /path/to/video.mp4
barcode_detection/
├── main.py
├── Readme.md
├── requirements.txt
└── src
└── app
└── python
├── commons
│ ├── barcode_detector.py
│ └── barcode_reader.py
└── constants
└── constant.py