简体   繁体   English

Android OCR使用tess-two分叉的tesseract

[英]Android OCR using tess-two a fork of tesseract

Am using OCR as a module in a project that am doing. 我正在使用OCR作为正在进行的项目中的模块。 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. 深入挖掘一周之后,我认为我应该在eclipse上运行一个测试应用程序,看看它的运行准确程度。 i found tess-two a fork of tesseract as a support to my OCR. 我发现tess-two是一个tesseract的分支,作为我的OCR的支持。 i downloaded tess-two from: 我从以下网站下载了tess-two:

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

I was all set i imported tess-two into my eclipse. 我完全被设置为我的日食进口tess-two。 I did set my eclipse for handling and building projects involving native code. 我确实设置了我的eclipse来处理和构建涉及本机代码的项目。 I did build tess-two successfully after solving 1 or 2 build path errors. 在解决了1或2个构建路径错误后,我确实成功构建了tess-two。 DONE! DONE!

Then i found a simple OCR application which was using the same tess-two. 然后我找到了一个简单的OCR应用程序,它使用相同的tess-two。 i download it from: 我从下载:

https://github.com/GautamGupta/Simple-Android-OCR 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. 更正了构建路径,我将tess-two作为构建路径中的支持项目。 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: 当我用按钮运行相机时相机打开但是当我保存图片以便ocr在它上面运行时我得到一个例外:

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. 这是eclipse上logcat生成的异常。 Any idea how can i deal and remove this exception?? 知道如何处理和删除此异常? Tess-two was android target-8 and simple ocr application was target-10. Tess-two是android target-8,简单的ocr应用程序是target-10。

  1. open the project properties 打开项目属性
  2. add tess-two in required projects 在所需项目中添加tess-two
  3. tick the checkbox for tess-two in order & export 勾选tess-two的复选框,然后按顺序导出
  4. now clean & build your Simple-Android-OCR 现在清理并构建您的Simple-Android-OCR

Hope this helps 希望这可以帮助

确保在属性中将tess-two标记为库然后右键单击您的简单ocr并在属性中添加tess两个库并应用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM