Offline Image To Text Recognition (OCR) in android

荒凉一梦 提交于 2019-12-03 08:51:44

问题


How to build the android native SDK for image to text recognition. (I have done well with some APIs from web services. But this time, I just want to make the app without any Internet Connection, no APIs, and no Web Services. Just an offline OCR app). So my question here is

  1. how to crop each and every word containing in the image?
  2. how to compare the cropped text with the alphabets and characters?

回答1:


I guess u can use Tesseract OCR Tool, an open source alternative by Google. How to integrate that in Android is simple via Tesseract Android Tools Have a look at the tess-two project on github, it's very easy to use and gives good OCR results




回答2:


You said you didn't want to use an API, however I suggest you use the recently released OCR API by Google: https://developers.google.com/vision/text-overview

Just add the following line to your dependecies:

compile 'com.google.android.gms:play-services-vision:9.2.0'

Note: Upon first use it will have to download some files from a google server for it to be able to work. Make sure to add this check .isOperational(). Afterwards you can use it without an internet connection.




回答3:


You can use ML Kit for Image to Text Recognition:

https://firebase.google.com/docs/ml-kit/android/recognize-text



来源:https://stackoverflow.com/questions/36453199/offline-image-to-text-recognition-ocr-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!