{"id":17254128,"url":"https://github.com/fizzday/ocrphp","last_synced_at":"2025-04-14T05:32:06.251Z","repository":{"id":62505238,"uuid":"65991814","full_name":"fizzday/OcrPHP","owner":"fizzday","description":"a simple and beautiful ocr php library which is using for recognize image to text depend on tesseract-ocr ( 一个简洁优雅的图像识别转换文字的php类库, 须安装`tesseract-ocr`)","archived":false,"fork":false,"pushed_at":"2017-02-03T08:54:49.000Z","size":97,"stargazers_count":34,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T09:47:47.118Z","etag":null,"topics":[],"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/fizzday.png","metadata":{"files":{"readme":"README-zh_cn.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":"2016-08-18T11:29:30.000Z","updated_at":"2024-12-12T06:57:15.000Z","dependencies_parsed_at":"2022-11-02T12:31:04.640Z","dependency_job_id":null,"html_url":"https://github.com/fizzday/OcrPHP","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/fizzday%2FOcrPHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FOcrPHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FOcrPHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzday%2FOcrPHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fizzday","download_url":"https://codeload.github.com/fizzday/OcrPHP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248826757,"owners_count":21167738,"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":[],"created_at":"2024-10-15T07:07:23.700Z","updated_at":"2025-04-14T05:32:05.917Z","avatar_url":"https://github.com/fizzday.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OcrPHP\n## describe\na simple and beautiful ocr php library which is using for recognize image to text depend on tesseract-ocr (\n一个简洁优雅的图像识别转换文字的php类库, 须安装`tesseract-ocr`)\n\n## 使用介绍\n[english document](https://github.com/fizzday/OcrPHP)  \n[中文文档](https://github.com/fizzday/OcrPHP/blob/master/README-zh_cn.md)\n### 使用 composer 安装\n```\n{\n    \"require\": {\n        \"fizzday/ocrphp\": \"dev-master\"\n    }\n}\n```\n或者\n```\ncomposer require fizzday/ocrphp\n```\n\u003e 注意: 使用之前必须先安装 `tesseract`, 安装方法见我的博客\n\n### 开始使用  \n```\nuse Fizzday\\OcrPHP;\n\nOcrPHP::file($file)-\u003erun();\n\n// or\n\nOcrPHP::file($file)-\u003elang($lang)-\u003epsm($psm)-\u003erun($type);\n```\n将会是这样的 :\n```\nOcrPHP::file('/var/www/img/test.jpg')-\u003elang('eng')-\u003erun();\n\n// or\n\nOcrPHP::file('/var/www/img/test.jpg')-\u003elang(['eng', 'chi_sim'])-\u003epsm(3)-\u003erun('id');\n```\n\u003e 说明  \n\n- `$file` -- 本地图片源文件\n- `$lang` -- 要识别的语言, 如 英语(eng), 汉语(chi_sim(简体) or chi_tra(繁体)) ......\n- `$psm`  -- 识别类型默认为3\n- `$type` -- 自定义识别输出的结果, 比如自定义身份证号码, 名片相关信息, 本类提供了身份证号码的输出('id'), 默认为空, 返回完全输出信息\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzday%2Focrphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffizzday%2Focrphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzday%2Focrphp/lists"}