hi, I build this on Windows 7 and it working fine.
but when a create a android app and copy the code:

1-File myDir = getExternalFilesDir(Environment.MEDIA_MOUNTED);
2-TessBaseAPI baseApi = new TessBaseAPI();
3-baseApi.init(myDir, "eng"); // myDir + "/tessdata/eng.traineddata"
4-must be present
5-baseApi.setImage(myImage);
6-String recognizedText = baseApi.getUTF8Text(); // Log or otherwise

I'm having problems on line 3, it ask for 2 string and myDir is not a
string
and what exactly do you mean on the first line?

tnks!


On 7 ago, 04:09, Robert T <[email protected]> wrote:
> What you need to do is to set up the tesseract-android-tools project
> as a library project in Eclipse, and tell your project to refer to the
> library project. So you'll need two projects in Eclipse, whereas for
> an ordinary app you would have just one.
>
> Step-by-step:
>
> Make sure ndk-build completes and says "BUILD SUCCESSFUL."
>
> Import the tesseract-android-tools project into Eclipse:
> File->Import->Existing Projects Into Workspace->Choose 
> tesseract-android-tools->Finish
>
> Add tesseract-android-tools as a library project:
> Right-click tesseract-android-tools project name->Properties->Android-
>
> >check "Is Library”.
>
> Create your new app as a new project.
>
> Configure your project to use the tesseract-android-tools project as a
> library project: Right click your new project name, do Properties-
>
> >Android->Library->Add, and choose tesseract-android-tools.
>
> Create an AVD runningAndroid2.2, and with an SD card.
>
> You can now create a TessBaseAPI object in your app:
>
> File myDir = getExternalFilesDir(Environment.MEDIA_MOUNTED);
> TessBaseAPI baseApi = new TessBaseAPI();
> baseApi.init(myDir, "eng"); // myDir + "/tessdata/eng.traineddata"
> must be present
> baseApi.setImage(myImage);
> String recognizedText = baseApi.getUTF8Text(); // Log or otherwise
> display this string
>
> Let me know what's missing or needs to be changed. I'll post updated
> instructions 
> tohttp://rmtheis.wordpress.com/2011/08/06/using-tesseract-tools-for-and...
> .
>
> On Aug 5, 5:35 am, Mert Alptekin <[email protected]> wrote:
>
>
>
>
>
>
>
> > Ok I managed to build the library. so files are created. Could you help me
> > for creating a simple tesseract project onandroid? I'll use emulator. How I
> > can use the library? methods etc.? I wanna make an app that reads a image
> > file and show the characters that are recognized on phone's screen. Thx
> > foryuor help..
>
> > On Fri, Aug 5, 2011 at 9:26 AM, Mert Alptekin <[email protected]> wrote:
> > > Could you tell me the steps for building on vbox running ubuntu? I get 
> > > thıs
> > > error after I write ndk-build:
> > > Compile thumb  : lept <= fopencookie.c
> > > /bin/sh:
> > > /mnt/share/android-ndk-r6/toolchains/arm-linux-androideabi-4.4.3/prebuilt/l
> > >  inux-x86/bin/arm-linux-androideabi-gcc:
> > > not found
> > > make: ***
> > > [/mnt/share/tesseract-android-tools-1.00/obj/local/armeabi/objs/lept//mnt/s
> > >  
> > > hare/tesseract-android-tools-1.00/jni/com_googlecode_leptonica_android/stdi
> > >  o/fopencookie.o]
> > > Error 127
>
> > >   On Thu, Aug 4, 2011 at 10:20 PM, Robert T 
> > > <[email protected]>wrote:
>
> > >> I'm not sure, but try the workaround forAndroidbug #13024 by adding
> > >> the following lines immediately before the ending </project> tag in
> > >> your build.xml:
>
> > >> <!-- beginning of modification -->
> > >> <path id="android.libraries.src"><path refid="project.libraries.src" /
> > >> ></path>
> > >> <path id="android.libraries.jars"><path
> > >> refid="project.libraries.jars" /></path>
> > >> <!-- end of modification -->
>
> > >> On Aug 4, 3:09 am, Mert Alptekin <[email protected]> wrote:
> > >> > I gives no rule to make target for JPEGPATH/Android.mk. I do have the
> > >> >androidmakefile in libjpeg path. Maybe there's a problem with the file.
> > >> I
> > >> > always get no rule to make target errrors. For set up a shared folder 
> > >> > on
> > >> > vbox I think guest addition sohuld be installed. Is thtere an another
> > >> way
> > >> > for that?
>
> > >> > On Thu, Aug 4, 2011 at 12:01 PM, Robert T <[email protected]>
> > >> wrote:
> > >> > > Try the instructions at
>
> > >> > >http://code.google.com/p/tesseract-android-tools/source/browse/trunk/.<http://code.google.com/p/tesseract-android-tools/source/browse/trunk/>
> > >> ..
> > >>  > > .
> > >> > > I don't recall needing to run "make"--but you do need to run "ndk-
> > >> > > build."
>
> > >> > > It worked for me running on Ubuntu using VirtualBox. I don't think 
> > >> > > you
> > >> > > need to install the guest additions, but I found it helpful to set up
> > >> > > a Shared Folder on VirtualBox.
>
> > >> > > On Aug 4, 12:52 am, Mert Alptekin <[email protected]> wrote:
> > >> > > > I'm using cygwin on windows 7. I get the same error in issue 4 
> > >> > > > which
> > >> is:
>
> > >> > > > make: *** No rule to make target
> > >> > > > `//cygdrive/c/android-ndk/tesseract-android-too
>
> > >> ls-1.00/jni/com_googlecode_leptonica_android/stdio/open_memstream.c',
> > >> > > needed
> > >> > > > by
>
> > >> `/cygdrive/c/android-ndk/tesseract-android-tools-1.00/obj/local/armeabi/obj
> > >> > > s/lep
>
> > >> t//cygdrive/c/android-ndk/tesseract-android-tools-1.00/jni/com_googlecode_l
> > >> > > epton
> > >> > > > ica_android/stdio/open_memstream.o'.  Stop
>
> > >> > > > Do I have to use vbox on ubuntu? is there way to build it on
> > >> windows? I
> > >> > > dont
> > >> > > > know much about vbox on ubuntu 11.04 I couldn't install guest
> > >> additions,
> > >> > > the
> > >> > > > screen shows a weird image. Thx for your help.
>
> > >> > >  > On Thu, Aug 4, 2011 at 10:14 AM, Robert T <
> > >> [email protected]>
> > >> > > wrote:
> > >> > > > > I think tesseract-android-tools is the best approach. It's 
> > >> > > > > easier,
> > >> > > > > because you only need to code in Java--there's no need to learn
> > >> the
> > >> > > > > JNI part. Do you have some specifics on which step of the
> > >> instructions
> > >> > > > > in the readme for that project is the problem?
>
> > >> > > > > On Aug 2, 10:57 pm, Mert Alptekin <[email protected]> wrote:
> > >> > > > > > Hello, I want to make anAndroidproject which make use of
> > >> tesseract-
> > >> > > > > > ocr library. Could someone help me how to do it? Everybody 
> > >> > > > > > gives
> > >> the
> > >> > > > > > same website which i cannot managed to build tesseract
> > >> forandroid by
> > >> > > > > > doing the steps in that site (
> > >>http://www.itwizard.ro/interfacing-cc-
> > >> > > > > > libraries-via-jni-example-tesseract-163.html). The problem is i
> > >> > > cannot
> > >> > > > > > find anAndroid.mk file for building tesseract. The ones that I
> > >> > > founnd
> > >> > > > > > gives errors because source files are not matched or reports
> > >> errors
> > >> > > in
> > >> > > > > > cpp files of tesseract. Is there an easy way to build tesseract
> > >> for
> > >> > > > > >android? And even if I managed to build will I create the java
> > >> files
> > >> > > > > > for my project?How can I access the methods in tesseract? I'm
> > >> new to
> > >> > > > > > makefilesand stuff. Or can someone send me a makefile? btw I
> > >> couldnt
> > >> > > > > > use the tesjeract and tesseract-android-tools either. Please
> > >> help
> > >> > > > > > guys. Thx
> > >> > > > > > Note: I'm building on windows 7 32-bit with cygwin
>
> > >> > > > > --
> > >> > > > > You received this message because you are subscribed to the 
> > >> > > > > Google
> > >> > > > > Groups "tesseract-ocr" group.
> > >> > > > > To post to this group, send email to
> > >> [email protected]
> > >> > > > > To unsubscribe from this group, send email to
> > >> > > > > [email protected]
> > >> > > > > For more options, visit this group at
> > >> > > > >http://groups.google.com/group/tesseract-ocr?hl=en
>
> > >> > > --
> > >> > >  You received this message because you are subscribed to the Google
> > >> > > Groups "tesseract-ocr" group.
> > >> > > To post to this group, send email to [email protected]
> > >> > > To unsubscribe from this group, send email to
> > >> > > [email protected]
> > >> > > For more options, visit this group at
> > >> > >http://groups.google.com/group/tesseract-ocr?hl=en
>
> > >> --
> > >>  You received this message because you are subscribed to the Google
> > >> Groups "tesseract-ocr" group.
> > >> To post to this group, send email to [email protected]
> > >> To unsubscribe from this group, send email to
> > >> [email protected]
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/tesseract-ocr?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

Reply via email to