{"id":25770934,"url":"https://github.com/t8rin/imagetextreader","last_synced_at":"2026-04-25T21:31:35.078Z","repository":{"id":240029676,"uuid":"801252950","full_name":"T8RIN/ImageTextReader","owner":"T8RIN","description":"📸 ImageTextReader is a Library for performing OCR in fast and convenient way ","archived":false,"fork":false,"pushed_at":"2024-05-16T20:04:10.000Z","size":117,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T21:31:37.289Z","etag":null,"topics":["android","kotlin","library","ocr","ocr-recognition","tesseract","tesseract-ocr"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/T8RIN.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":"2024-05-15T21:53:51.000Z","updated_at":"2025-04-05T03:05:27.000Z","dependencies_parsed_at":"2024-05-16T10:55:36.513Z","dependency_job_id":"6bd43a35-77d2-4ce7-b878-9cbec7de0c8b","html_url":"https://github.com/T8RIN/ImageTextReader","commit_stats":null,"previous_names":["t8rin/imagetextreader"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/T8RIN/ImageTextReader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T8RIN%2FImageTextReader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T8RIN%2FImageTextReader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T8RIN%2FImageTextReader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T8RIN%2FImageTextReader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T8RIN","download_url":"https://codeload.github.com/T8RIN/ImageTextReader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T8RIN%2FImageTextReader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: 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":["android","kotlin","library","ocr","ocr-recognition","tesseract","tesseract-ocr"],"created_at":"2025-02-27T02:46:20.790Z","updated_at":"2026-04-25T21:31:35.061Z","avatar_url":"https://github.com/T8RIN.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\nImageTextReader\n\n\u003c/h1\u003e\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"API\" src=\"https://img.shields.io/badge/Api%2021+-50f270?logo=android\u0026logoColor=black\u0026style=for-the-badge\"/\u003e\u003c/a\u003e\n  \u003cimg alt=\"Kotlin\" src=\"https://img.shields.io/badge/Kotlin-a503fc?logo=kotlin\u0026logoColor=white\u0026style=for-the-badge\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://hits.sh/github.com/t8rin/imagetextreader/\"\u003e\u003cimg alt=\"Hits\" src=\"https://hits.sh/github.com/t8rin/imagetextreader.svg?style=for-the-badge\u0026label=Views\u0026extraCount=10\u0026color=54856b\"/\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/github/v/release/t8rin/imagetextreader?style=for-the-badge\"/\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n            \n📸 ImageTextReader is a Library for performing OCR in fast and convenient way\n\n\u003c/div\u003e\n\n## Features\n\n- 120+ languages\n- 3 Type of data: Fast, Standard, Best\n- Segmentation Mode Selection\n- Multiple languages at the same time\n\n## Usage\n\n### 1. Add dependencies\n\n#### Kotlin (kts)\n```kotlin\nrepositories {\n  maven { setUrl(\"https://jitpack.io\") } // Add jitpack\n}\ndependencies {\n  implementation(\"com.github.T8RIN:ImageTextReader:LATEST_VERSION\") // Replace \"LATEST_VERSION\" with preferrend version tag\n}\n```\n\n#### Groovy\n```groovy\nrepositories {\n  maven { url 'https://jitpack.io' } // Add jitpack\n}\ndependencies {\n  implementation 'com.github.T8RIN:ImageTextReader:LATEST_VERSION' // Replace \"LATEST_VERSION\" with preferrend version tag\n}\n```\n\n### 2. Get `ImageTextReader` instance\n\n```kotlin\n// Use injection through dagger\n@Inject\nlateinit var imageTextReader: ImageTextReader\u003cBitmap\u003e\n\n// Or inject in ViewModel\n@HiltViewModel\nclass ExampleViewModel @Inject constructor(\n  private val imageTextReader: ImageTextReader\u003cBitmap\u003e\n): ViewModel()\n\n// Or obtain new instance passing application context\nval imageTextReader: ImageTextReader\u003cBitmap\u003e = ImageTextReader(context)\n\n/* When you have ImageTextReader instance use it as shown below */\n\n// First get available languages list\nval recognitionType: RecognitionType = RecognitionType.Standard // Also available Best and Fast models\nval languages: List\u003cOCRLanguage\u003e = imageTextReader.getLanguages(recognitionType)\n\n// Or get OCRLanguage by code, for example `en`\nval language: OCRLanguage = imageTextReader.getLanguageForCode(\"en\")\n\n// Select needed languages\nval languageCode = selectedLanguages.joinToString(\"+\") { it.code } // selectedLanguages is your needed OCRLanguage instances\n\n// Or with single language\nval languageCode = language.code\n\n// Set some parameters\nval segmentationMode: SegmentationMode = SegmentationMode.PSM_AUTO_OSD\nval ocrEngineMode: OcrEngineMode = OcrEngineMode.DEFAULT\n\nimageTextReader.getTextFromImage(\n    type = recognitionType,\n    languageCode = languageCode,\n    segmentationMode = segmentationMode,\n    image = bitmap,\n    ocrEngineMode = ocrEngineMode,\n    onProgress = { progress -\u003e\n       // Get recognition progress in percents\n    }\n).also { result -\u003e\n    when (result) {\n        is TextRecognitionResult.Error -\u003e {\n            val throeable: Throwable = result.throwable\n        }\n\n        is TextRecognitionResult.NoData -\u003e {\n            val downloadData: List\u003cDownloadData\u003e = result.data\n        }\n\n        is TextRecognitionResult.Success -\u003e {\n            val text: String = result.data\n        }\n    }\n}\n\n// When you have downloadData you can download them as shown below\nval isDownloadSuccessfully: Boolean = imageTextReader.downloadTrainingData(\n    type = recognitionType,\n    languageCode = downloadData.joinToString(separator = \"+\") { it.languageCode },\n    onProgress = { percentage, totalContentSize -\u003e\n        // Get current download progress and total size of model\n    }\n)\n\n// Also you can check if some language model exists for selected recognition type\nfun isLanguageDataExists(\n    type: RecognitionType,\n    languageCode: String\n): Boolean\n\n// Or delete model that stored in memory\nsuspend fun deleteLanguage(\n    language: OCRLanguage,\n    types: List\u003cRecognitionType\u003e\n)\n\n```\n\n## Find this repository useful? :heart:\nSupport it by joining __[stargazers](https://github.com/T8RIN/ImageTextReader/stargazers)__ for this repository. :star: \u003cbr\u003e\nAnd __[follow](https://github.com/T8RIN)__ me for my next creations! 🤩\n\n## License\n```xml\nDesigned and developed by 2024 T8RIN\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft8rin%2Fimagetextreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft8rin%2Fimagetextreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft8rin%2Fimagetextreader/lists"}