{"id":15020358,"url":"https://github.com/bensouchet/ibex-1d","last_synced_at":"2026-03-05T09:03:41.967Z","repository":{"id":65492658,"uuid":"581539993","full_name":"BenSouchet/ibex-1d","owner":"BenSouchet","description":"Image Barcode EXtractor - Detect and Extract 1D Barcode(s) in photographs","archived":false,"fork":false,"pushed_at":"2023-02-01T22:02:53.000Z","size":74,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T09:17:09.988Z","etag":null,"topics":["barcode","computer-vision","detection-algorithm","image-recognition","opencv4","python","python-3","python3","roi"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ibex-1d/","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/BenSouchet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-23T13:43:13.000Z","updated_at":"2024-01-15T01:09:01.000Z","dependencies_parsed_at":"2023-02-15T23:01:10.217Z","dependency_job_id":null,"html_url":"https://github.com/BenSouchet/ibex-1d","commit_stats":null,"previous_names":["bensouchet/ibex_1d"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenSouchet%2Fibex-1d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenSouchet%2Fibex-1d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenSouchet%2Fibex-1d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BenSouchet%2Fibex-1d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BenSouchet","download_url":"https://codeload.github.com/BenSouchet/ibex-1d/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247861219,"owners_count":21008447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","computer-vision","detection-algorithm","image-recognition","opencv4","python","python-3","python3","roi"],"created_at":"2024-09-24T19:54:57.570Z","updated_at":"2026-03-05T09:03:41.928Z","avatar_url":"https://github.com/BenSouchet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IBEX 1D : Image 1D Barcode EXtractor\n\n### Detect 1D Barcode(s) in Photographs, Extract \u0026 Straighten them!\n\nA `Python 3` command line script to detect \u0026 extract barcode(s) in images, using **OpenCV** and **NumPy**.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Example of barcode extraction\" src=\"https://user-images.githubusercontent.com/17025808/212469506-80761d45-934e-4c25-aeac-b591c0607fa3.png\" width=\"600\"\u003e\n\u003c/p\u003e\n\n## Install\n\n### Via PIP\n\n```sh\npip3 install ibex-1d\n```\nAnd for update to latest version use:\n```sh\npip3 install --upgrade ibex-1d\n```\n\n### Via Source Code\n\nDownload the [latest release](https://github.com/BenSouchet/ibex-1d/releases) or clone/download this repository.\n\n## Usage\nIf you installed the package (via `pip3`) you can either import the package in your project:\n```python\nimport ibex_1d\n\nimage_path = \"/Users/bensouchet/Desktop/IMG_3212.png\"\nsettings = ibex_1d.Settings()\nsettings.use_adaptive_threshold = True\n\nbarcode_extract = ibex_1d.ImageBarcodeExtract1D(settings)\nresults = barcode_extract.find_barcodes([image_path])\n```\nOr use it as a script directly in you terminal:\n```sh\nibex_1d -i ~/Desktop/IMG_3212.png\n```\n\nIf you download a release or clone the repository, to use it as a script:\n```sh\npython3 ibex_1d.py -i ~/Desktop/IMG_3212.png\n```\n\n## Results\n\nIf you called **IBEX 1D** via your terminal (as a script), the barcode images extracted will be saved into a newly created folder inside a folder `./results/`, if nothing has been generated please check the log(s) in your terminal.\n\nOtherwise if you called the function `find_barcodes` you will received a python list of `ibex_1d.Result` instances, this class store info about the execution (like execution status, message, debug steps) and the barcode(s) image(s) extracted for each image path passed to the function.\n\n## Multiple images\n\nYou can pass one or more images/photographs to the script like this:\n```sh\nibex_1d -i ~/Desktop/IMG_3205.png ./object_12.jpg ~/Documents/photo_0345.jpeg\n```\nInside the corresponding result sub-folder, extracted barcodes will be named `barcode_001.png`, `barcode_002.png`, `barcode_003.png`, ...\n\n## Incorrect result ?\nIf the barcode hasn't been extracted (or the resulting barcode image isn't good) this can be due to the OTSU threshold method.\nYou can try using the script with the argument `-a` (or `--adaptive-threshold`):\n```sh\nibex_1d -i ~/Desktop/IMG_3205.png -a\n```\nThis threshold method isn't set as default because it's slower than OTSU.\n\n## Debug\n\nYou can visualize some steps of the sheet detection.\nFor the script call you need to add the argument `-d` or `--debug` to the command:\n```sh\nibex_1d -i ~/Documents/product_03.jpeg -d\n```\nif you imported the package, you need to enable the `save_detection_steps` in the settings instance like this:\n```python\nsettings = Settings()\nsettings.save_detection_steps = True\n\nbarcode_extract = ImageBarcodeExtract1D(settings)\nresults = barcode_extract.find_barcodes(images_paths)\n```\nThis will add debug/steps images into the result sub-folders.\n\n## Errors / Warnings\n\nIn case of an error you should see a formatted log message in your terminal telling you exactly what is the issue.\nIf the script crash or something don't work you can open an issue [here](https://github.com/BenSouchet/ibex-1d/issues).\n\n## Author / Maintainer\n\n**IBEX 1D** has been created and is currently maintained by [Ben Souchet](https://github.com/BenSouchet).\n\n## Licenses\n\nThe code present in this repository is under [MIT license](https://github.com/BenSouchet/ibex-1d/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensouchet%2Fibex-1d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbensouchet%2Fibex-1d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensouchet%2Fibex-1d/lists"}