{"id":24435340,"url":"https://github.com/baraveli/bml-ocr","last_synced_at":"2026-03-05T19:59:29.733Z","repository":{"id":62491788,"uuid":"285442080","full_name":"baraveli/bml-ocr","owner":"baraveli","description":"BML Transaction Receipt OCR","archived":false,"fork":false,"pushed_at":"2020-08-07T09:41:09.000Z","size":127,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T10:02:16.027Z","etag":null,"topics":["bml","ocr","tesseract-ocr"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baraveli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-06T01:20:40.000Z","updated_at":"2023-10-15T12:46:36.000Z","dependencies_parsed_at":"2022-11-02T11:16:42.287Z","dependency_job_id":null,"html_url":"https://github.com/baraveli/bml-ocr","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraveli%2Fbml-ocr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraveli%2Fbml-ocr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraveli%2Fbml-ocr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baraveli%2Fbml-ocr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baraveli","download_url":"https://codeload.github.com/baraveli/bml-ocr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589363,"owners_count":21129597,"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":["bml","ocr","tesseract-ocr"],"created_at":"2025-01-20T17:19:22.224Z","updated_at":"2025-10-24T02:28:39.409Z","avatar_url":"https://github.com/baraveli.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BML OCR:camera: (Experimental)\n\n[![StyleCI](https://github.styleci.io/repos/285442080/shield?branch=master)](https://github.styleci.io/repos/285442080?branch=master)\n[![Build Status](https://travis-ci.org/baraveli/bml-ocr.svg?branch=master)](https://travis-ci.org/baraveli/bml-ocr)\n\nBML Transaction Receipt OCR based on Tesseract OCR.\nAt the moment this returns the result as an array. We will be switching to an Receipt object with regex matching for a later release.\n\nWould not recommend to use in production.\n\n## Installation\n\nVia [Composer][]:\n\n```\ncomposer require baraveli/bml-ocr\n```\n\n:bangbang: **This library depends on [Tesseract OCR][], version _3.02_ or later.**\n\n\u003cbr/\u003e\n\n### Note for Linux users\n\nIt is pretty simple to install tesseract, run the following commands:\n\n```\nsudo apt install tesseract-ocr\n```\n\nIf the default installation doesn't include english language pack. You have to pull that one seperately, run the following command:\n\n```\nsudo apt-get install tesseract-ocr-eng\n```\n\n### ![][windows_icon] Note for Windows users\n\nThere are [many ways][tesseract_installation_on_windows] to install\n[Tesseract OCR][] on your system, but if you just want something quick to\nget up and running, I recommend installing the [Capture2Text][] package with\n[Chocolatey][].\n\n    choco install capture2text --version 3.9\n\n:warning: Recent versions of [Capture2Text][] stopped shipping the `tesseract` binary.\n\n\u003cbr/\u003e\n\n### ![][macos_icon] Note for macOS users\n\nWith [MacPorts][] you can install support for individual languages, like so:\n\n    $ sudo port install tesseract-\u003clangcode\u003e\n\nBut that is not possible with [Homebrew][]. It comes only with **English** support\nby default, so if you intend to use it for other language, the quickest solution\nis to install them all:\n\n    $ brew install tesseract --with-all-languages\n\n\u003cbr/\u003e\n\n## Usage\n\n```php\nuse Baraveli\\BmlOcr\\BmlOcr;\n\nBmlOcr::make(\"/home/image/imagename.jpg\", __DIR__)\n        -\u003edetect();\n```\n\nThe first argument of the make method is the path to the receipt you want to do OCR on. and the second argument is the temporary directory path. When the image path is first given it creates a temporary image with higher sharpness because the original BML receipt uses grey color for typography. It is really hard to detect by using just the default image. It deletes after finishing the detection.\n\nWhen you call the detect method it will return the result as an array.\n\n```php\n\n$receipt = BmlOcr::make(\"/home/image/imagename.jpg\", __DIR__)\n        -\u003edetect();\n\nvar_dump($receipt);\n```\n\nResult:\n\n```\narray:9 [\n  0 =\u003e \"Transaction Receipt\"\n  1 =\u003e \"Status SUCCESS\"\n  2 =\u003e \"Message Transfer transaction is successful.\"\n  3 =\u003e \"Ref # BLAZ418696504822\"\n  4 =\u003e \"Date 30/07/2020 21:46\"\n  5 =\u003e \"From SHIHAM A.RAHMAN\"\n  6 =\u003e \"To Mohamed Jinas\"\n  7 =\u003e \"7730000151614\"\n  8 =\u003e \"Amount MVR 750\"\n]\n```\n\n[tesseract ocr]: https://github.com/tesseract-ocr/tesseract\n[composer]: http://getcomposer.org/\n[windows_icon]: https://thiagoalessio.github.io/tesseract-ocr-for-php/images/windows-18.svg\n[macos_icon]: https://thiagoalessio.github.io/tesseract-ocr-for-php/images/apple-18.svg\n[tesseract_installation_on_windows]: https://github.com/tesseract-ocr/tesseract/wiki#windows\n[capture2text]: https://chocolatey.org/packages/capture2text\n[chocolatey]: https://chocolatey.org\n[macports]: https://www.macports.org\n[homebrew]: https://brew.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraveli%2Fbml-ocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaraveli%2Fbml-ocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaraveli%2Fbml-ocr/lists"}