Android OCR using tess-two a fork of tesseract

2020-06-06 02:27发布

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.

2条回答
戒情不戒烟
2楼-- · 2020-06-06 02:38
  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

查看更多
成全新的幸福
3楼-- · 2020-06-06 02:48

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

查看更多
登录 后发表回答