{"id":24762042,"url":"https://github.com/pranavh-2004/bardecode","last_synced_at":"2026-04-29T11:03:01.540Z","repository":{"id":270994283,"uuid":"911637809","full_name":"Pranavh-2004/BarDecode","owner":"Pranavh-2004","description":"Barcode reader using Python and pyzbar to decode barcodes from images or live camera feed.","archived":false,"fork":false,"pushed_at":"2025-01-05T13:56:43.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T13:17:05.791Z","etag":null,"topics":["barcode-decoder","barcode-scanner","computer-vision","image-processing","opencv","python-project","pyzbar","zbar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pranavh-2004.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-03T13:44:41.000Z","updated_at":"2025-01-05T13:56:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"01bcd452-a2b6-4576-85c4-4e28044a8b6e","html_url":"https://github.com/Pranavh-2004/BarDecode","commit_stats":null,"previous_names":["pranavh-2004/bardecode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pranavh-2004/BarDecode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pranavh-2004%2FBarDecode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pranavh-2004%2FBarDecode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pranavh-2004%2FBarDecode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pranavh-2004%2FBarDecode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pranavh-2004","download_url":"https://codeload.github.com/Pranavh-2004/BarDecode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pranavh-2004%2FBarDecode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32422533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode-decoder","barcode-scanner","computer-vision","image-processing","opencv","python-project","pyzbar","zbar"],"created_at":"2025-01-28T19:20:15.230Z","updated_at":"2026-04-29T11:03:01.502Z","avatar_url":"https://github.com/Pranavh-2004.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BarDecode\n\nBarDecode is a simple barcode reader project that can read barcodes from both images and webcam video streams. It uses Python's `opencv-python` for image processing and `pyzbar` for barcode decoding. The project demonstrates two modes: reading barcodes from an image file or live from a webcam.\n\n## Features\n\n- **Barcode Detection**: Detects and decodes barcodes from images and live camera feeds.\n- **Image Processing**: Displays the decoded barcode with a rectangle drawn around it for easy identification.\n- **Support for Various Barcode Types**: Can read various barcode types such as EAN13, QR code, UPC, etc.\n\n## Installation\n\n### 1. **Install Zbar Library**\n\n`pyzbar` depends on the `zbar` library to decode barcodes. You need to install `zbar` on your macOS machine.\n\nTo install `zbar`, you can use Homebrew with the following command:\n\n```bash\nbrew install zbar\n```\n\nThis will install the zbar library, which is required by pyzbar to function correctly.\n\n### 2. **Clone the repository**\n\n```bash\ngit clone https://github.com/yourusername/BarDecode.git\ncd BarDecode\n```\n\n### 3. **Set up a virtual environment (optional but recommended):**\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n### 4. **Install the dependencies:**\n\nInstall the necessary Python libraries with:\n\n```bash\npip install -r requirements.txt\n```\n\nThe required packages are:\n\n- opencv-python - For image processing and displaying the barcode in images.\n- pyzbar - For decoding barcodes from images.\n\n## Usage\n\nYou can run the project in two modes:\n\n### 1. **Reading from an Image**\n\nTo read barcodes from an image, call the read_barcode_from_image() function and provide the image path.\n\n```bash\nread_barcode_from_image('path_to_image_file.png')\n```\n\nIt will display the image with a rectangle drawn around the barcode and output the decoded barcode data to the console.\n\n### 2. **Reading from the Webcam**\n\nTo read barcodes in real-time using your webcam, call the read_barcode_from_camera() function.\n\n```bash\nread_barcode_from_camera()\n```\n\nPress ‘q’ to exit the webcam feed.\n\n## Example\n\n### Reading Barcode from an Image:\n\n```bash\npython main.py\n```\n\nThe output will look like:\n\n```plaintext\nDecoded Barcode: 1234567890128 (Type: EAN13)\n```\n\n### Reading Barcode from Webcam:\n\nRun the following command:\n\n```bash\npython main.py\n```\n\nThe webcam will start, and you can scan barcodes in real time. Press ‘q’ to stop the webcam feed.\n\n## Contributing\n\nFeel free to fork the repository, create a branch, make changes, and create a pull request. All contributions are welcome!\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpranavh-2004%2Fbardecode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpranavh-2004%2Fbardecode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpranavh-2004%2Fbardecode/lists"}