Extracting information from captured image in android

寵の児 提交于 2019-12-21 05:14:14

问题


This is my image:

I used this link(tessaract) to capture and process the image: http://kurup87.blogspot.com/2012/03/android-ocr-tutorial-image-to-text.html

But this is the issue, if this entire area is scanned, the return values are some garbage values, not accurate. But if I scan V516990, 2653, and the date separately. results are correct.

My intention is to scan V516990 and 2653 in one go, without the user having to use the camera twice. Any comments are welcome!


回答1:


Let the user take one image only You can store it in memory and set region of interest to top portion and then extract it Use cvSetImageROI

https://github.com/mintuhouse/FinMan/blob/master/src/unix/imp.cpp

Check line 337, when you pass IplImage to tesseract set your region (top or bottom parts in your case) of interest on image Check 297 here

https://github.com/mintuhouse/FinMan/blob/master/src/unix/main.cpp

This function does main text extraction in out case use JNI java native interface

or even better use javacv OpenCV port in Java we realized it later. It make life a lot simpler



来源:https://stackoverflow.com/questions/16874949/extracting-information-from-captured-image-in-android

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