Tesseract OCR Android in Windows

2019-02-19 03:55发布

I've read all of questions forums and blogs about it but i still have a problem. Firstly, i ticked tess-two as a library also my project's using tess-two as a library. I downloaded Android-NDK and from my project's properties i clicked Builders and then new -> Program then i choose ndk's ndk-build file. By the way my project is Gautam Gupta's project. He'd given project. Link: https://github.com/GautamGupta/Simple-Android-OCR. When i run that project in my phone, application starts and captures photo but when i press save then application gives error below. http://t1307.hizliresim.com/1c/l/qg0rl.png

1条回答
聊天终结者
2楼-- · 2019-02-19 04:14

Looks like you need to download only TessTwo, make sure you have properly setup the environments variables (ANT_HOME, ANDROID_HOME and ANDROID_NDK) so these point to where you have Ant and Android SDKs.

Then it's a matter of building the project by following TessTwo guidance. That you set up the library-project that can be imported.

Don't forget that the line commands must be performed in CygWin. Once the library project is built you should have correct .so files in libs/*. In order to actually use these, you could start with this link.


@Burak: I have solved my problem. For Windows; Write the codes below to Cygwin

a.cd <project-path'i>/tess-two
b.export TESSERACT_PATH=${PWD}/external/tesseract-3.01
c.export  LEPTONICA_PATH=${PWD}/external/leptonica-1.68
d.export LIBJPEG_PATH=${PWD}/external/libjpeg
e./cygdrive/<ndk-directory>/ndk-build

Write the codes below to CMD

f.android update project --target 1 --path .
g. ant release 

Don't forget the "." at step f.

查看更多
登录 后发表回答