{"id":19082916,"url":"https://github.com/floscha/2d-barcode-reader","last_synced_at":"2025-04-30T08:24:45.669Z","repository":{"id":35674828,"uuid":"116580365","full_name":"floscha/2d-barcode-reader","owner":"floscha","description":"A Python/OpenCV-based barcode reader for 2D barcode markers","archived":false,"fork":false,"pushed_at":"2024-08-31T00:00:11.000Z","size":70,"stargazers_count":9,"open_issues_count":7,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T14:23:33.727Z","etag":null,"topics":["barcode","opencv","python"],"latest_commit_sha":null,"homepage":null,"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/floscha.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}},"created_at":"2018-01-07T16:20:24.000Z","updated_at":"2024-04-21T23:58:55.000Z","dependencies_parsed_at":"2022-09-20T19:27:03.646Z","dependency_job_id":null,"html_url":"https://github.com/floscha/2d-barcode-reader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscha%2F2d-barcode-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscha%2F2d-barcode-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscha%2F2d-barcode-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floscha%2F2d-barcode-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floscha","download_url":"https://codeload.github.com/floscha/2d-barcode-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251667549,"owners_count":21624520,"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","opencv","python"],"created_at":"2024-11-09T02:45:01.209Z","updated_at":"2025-04-30T08:24:45.620Z","avatar_url":"https://github.com/floscha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![barcode reader logo](logo.png)\n\n# 2D Barcode Reader\n\n[![Build Status](https://travis-ci.org/floscha/2d-barcode-reader.svg?branch=master)](https://travis-ci.org/floscha/2d-barcode-reader)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d85fb6267312422baa08c6c8385da846)](https://www.codacy.com/app/floscha/2d-barcode-reader?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=floscha/2d-barcode-reader\u0026amp;utm_campaign=Badge_Grade)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA Python/OpenCV-based barcode reader for 2D barcode markers.\n\n\n## Example\n\nAssume we have an image containing one or several markers like the one below:\n\n![clean marker](example/clean_marker.png)\n\nTo extract the marker(s) we can use the following script similar to the [example reader](example/example_reader.py):\n\n\n```python\nimport cv2\n\nfrom barcode_reader import MarkerDetector\n\nimage_path = 'clean_marker.png'\nframe = cv2.imread(image_path, cv2.IMREAD_COLOR)\n\nif frame is None:\n    raise ValueError(\"Image could not be read\")\n\ndetector = MarkerDetector(min_contour_length_allowed=10000)\ndetected_markers = detector.process_frame(frame)\n\nprint(\"%d markers detected:\" % len(detected_markers))\nfor marker in detected_markers:\n    print(marker.points)\n```\n\nThis outputs the detected contour(s).\n\n```\n2 markers detected:\n[[119.43042755 120.34486389]\n [380.50708008 120.37145233]\n [380.46075439 379.82989502]\n [119.41880798 379.66653442]]\n[[119.43190002 120.3412323 ]\n [380.51220703 120.37619019]\n [380.45599365 379.8331604 ]\n [119.41361237 379.66433716]]\n```\n\nAlso, when debugging is enabled, it draws-in the contours like shown below:\n![marker with contours](example/debug.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloscha%2F2d-barcode-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloscha%2F2d-barcode-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloscha%2F2d-barcode-reader/lists"}