3

How to use the this for tesseract I found here? I am following the readme in that file, but I don't know how to build the project. Specially I am confused where to type this:

cd tess
cd tess-two
ndk-build
android update project --path .
ant release

I'm not sure if it's gonna work on cmd or do I need something else to build this.

peterh
  • 11,875
  • 18
  • 85
  • 108
lolliloop
  • 389
  • 8
  • 23
  • 1
    Type those commands in Terminal(Command prompt). You can refer this tutorial for more info http://gaut.am/making-an-ocr-android-app-using-tesseract/ – Abhishek V Nov 15 '13 at 03:56
  • i tried to, I was able to reach the directory E:\OCR\tess-two> but when I was about to enter the ndk-build, an error occur saying that 'ndk-build' is not recognized as an internal or external command – lolliloop Nov 15 '13 at 05:29
  • Well you need to install `ndk` first..http://developer.android.com/tools/sdk/ndk/index.html – Abhishek V Nov 15 '13 at 05:57
  • can anybody please help me with building a tesserct project in android studio – Bubunyo Nyavor Jul 21 '14 at 12:52
  • You can use Android Studio to do the build, as described here: http://stackoverflow.com/questions/41154462/building-tess-two-into-a-project-using-android-studios-gradle-build – Dale Dec 17 '16 at 19:09

3 Answers3

3

Here are the steps to build:

  • Download the NDK from the Android Development site and extract it to any folder.
  • Go to Preferences-->Android -->NDK and select the path for Android-Ndk directory ex-->D:\Work\Android\Android Tools\android-ndk-r9
  • Import tess-two project. File -> Import -> Existing Projects into workspace -> tess-two directory.
  • Right Click on Tess-two--> Properties-->Builders then give any name for Builder like Ndk tess Builder And add location for ndk-build.cmd ex-->:D:\Work\Android\Android Tools\android-ndk-r9\ndk-build.cmd. select working directory as ${Workspace/tess-two}
  • Refresh tess-two, It will take time to build
  • After complete build Add it as library:Right click the project, Android Tools -> Fix Project Properties. Right click -> Properties -> Android -> Check Is Library.
Bhagwat K
  • 2,982
  • 2
  • 23
  • 33
2

You can follow these steps to build tess-two library. In case you face any problem, refer http://mindtherobot.com/blog/452/android-beginners-ndk-setup-step-by-step/

  • Download and extract android-ndk.

  • Download cygwin with devel/gcc-core, devel/gcc-c++, devel/gnu, devel/make packages included.

  • Open cygwin command line and open your tess-two lib path in cygwin using cd command eg. cd /cygwin/c/tess-two-master/tess-two .Then use ndk-build command eg. /cygwin/c/android_ndk-09r/ndk-build. The process of building will start. Note that it will take time to build.

  • Lastly just import the tess-two libs in eclipse and use it as a library in your project.

Thank you.

Vikas Mane
  • 789
  • 1
  • 6
  • 14
1

If you don't want to build tess-two. You can do all this stuff without downloading android ndk, cygwin and ant. Just follow this blog all things are done already for us we just need to download built files.

Vijay Vankhede
  • 3,018
  • 1
  • 26
  • 46