Android OCR using tess-two a fork of tesseract

馋奶兔 提交于 2019-12-21 02:54:20

问题


Am using OCR as a module in a project that am doing. After digging in deep for a week i thought that i should run a test application on eclipse just to see how accurately it works. i found tess-two a fork of tesseract as a support to my OCR. i downloaded tess-two from:

https://github.com/rmtheis/tess-two/downloads

I was all set i imported tess-two into my eclipse. I did set my eclipse for handling and building projects involving native code. I did build tess-two successfully after solving 1 or 2 build path errors. DONE!

Then i found a simple OCR application which was using the same tess-two. i download it from:

https://github.com/GautamGupta/Simple-Android-OCR

I imported this project into my workspace. Corrected the build path i included tess-two as a supporting project in the build path. When i successfully build the two projects and run it on my target device the application runs successfully. when i run the camera with the button the camera opens but when i save the picture so that the ocr runs on it i get an exception:

could not find class 'com.googlecode.tesseract.android.TessBaseAPI' referenced from     method com.datumdroid.android.ocr.simple.SimpleAndroidOCRActicity.picturetaken'

This was the exception generated by the logcat on eclipse. Any idea how can i deal and remove this exception?? Tess-two was android target-8 and simple ocr application was target-10.


回答1:


  1. open the project properties
  2. add tess-two in required projects
  3. tick the checkbox for tess-two in order & export
  4. now clean & build your Simple-Android-OCR

Hope this helps




回答2:


make sure you marked tess-two as a library in the properties then right click your simple ocr and in the properties add tess two library and apply



来源:https://stackoverflow.com/questions/14525004/android-ocr-using-tess-two-a-fork-of-tesseract

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