Translate a picture to text on Android?
I know that google goggles will translate a picture to text. What I want to do is allow the user to take a picture (no problem), translate that picture to text(?) and then do some processing on the text (no problem).
Is there any API on android that allows this? or is there any way to programtically communicate with google goggles? I would 开发者_运维知识库hate to have the user use goggles then select the saved file with my app.....
Take a look at Is there any free OCR library for Android? and What kind of OCR Java library should I use in Android? if you want libraries that do the translation on the phone itself.
However, Google also provides a WebAPI that does this. http://googlesystem.blogspot.com/2009/09/google-docs-ocr.html
Just remember that OCR (optical character recognition) is, as of now, an inexact science and you won't get flawless transcription in all cases...
check this example it's used in google translate to get text from image it's use google services
https://github.com/googlesamples/android-vision/tree/master/visionSamples/ocr-codelab
精彩评论