chicca94 / tesseract-android-tools

Automatically exported from code.google.com/p/tesseract-android-tools
1 stars 0 forks source link

could not initialize Tesseract API with language=eng! #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

code:
private static final String TESSBASE_PATH = "/mnt/sdcard/tesseract/";
    private static final String DEFAULT_LANGUAGE = "eng";
    private static final String IMAGE_PATH = "/mnt/sdcard/test.jpg";
    private static final String EXPECTED_FILE = TESSBASE_PATH + "tessdata/" + DEFAULT_LANGUAGE

final TessBaseAPI baseApi = new TessBaseAPI();
        baseApi.init(TESSBASE_PATH, DEFAULT_LANGUAGE);
        final Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.test);
        //digits is a .jpg image I found in one of the issues here.
        ImageView img = (ImageView) findViewById(R.id.image);
        img.setImageBitmap(bmp);//I can see the ImageView. So we know that it should work if I sent it to the setImage()
        baseApi.setImage(bmp);
        Log.v("Kishore","Kishore:Working");//This statement is never reached. Futhermore, on putting some more Log.v commands in the setImage function, I found out that the native function nativeSetImagePix is never accessed. I have attached the Logcat output below to show that it is not accessed.

        String outputText = baseApi.getUTF8Text();
        Log.v("Kishore","Kishore:"+outputText);
        baseApi.end();
        bmp.recycle();
error:
could not initialize Tesseract API with language=eng!

thanks advances!!!!

Original issue reported on code.google.com by xiaowang...@gmail.com on 21 Mar 2012 at 3:03

GoogleCodeExporter commented 9 years ago
Please include logcat output for your application.

Original comment by alanv@google.com on 11 Sep 2012 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by alanv@google.com on 22 Sep 2012 at 8:08

GoogleCodeExporter commented 9 years ago
I got the same problem:
01-31 12:09:08.580: I/Tesseract(native)(31976): Attempting Init() with 
dir=/mnt/sdcard/, lang=eng
01-31 12:09:08.580: E/Tesseract(native)(31976): Could not initialize Tesseract 
API with language=eng!
01-31 12:09:08.830: A/libc(31976): Fatal signal 11 (SIGSEGV) at 0x00000000 
(code=1)

Original comment by fantao0...@gmail.com on 31 Jan 2013 at 4:27

GoogleCodeExporter commented 9 years ago
i met this problem,cant solve it,need you help
thanks lot

Original comment by cyx890...@gmail.com on 13 Mar 2014 at 9:31

GoogleCodeExporter commented 9 years ago
Please make sure that android.permission.READ_EXTERNAL_STORAGE permission 
declared on your manifest

Original comment by l...@leoganda.net on 28 Apr 2014 at 4:16

GoogleCodeExporter commented 9 years ago
I also met the same problem. Need help,
i also put the required permissions  in the manifest. But also the same problem.

Original comment by mathan.r...@gmail.com on 4 Aug 2014 at 12:38

GoogleCodeExporter commented 9 years ago
android.permission.READ_EXTERNAL_STORAGE permission  is need

Original comment by 08ysch...@gmail.com on 4 Mar 2015 at 5:57

GoogleCodeExporter commented 9 years ago
Same problem ..please provide some some solution.. but the code is working in 
samsung s4 but not on asus or nesus 4

Original comment by biplab.s...@gmail.com on 12 Mar 2015 at 4:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
try with phones with more memory ..this occurs mainly if the phone memory is 
less 

#3 #4 #6

Original comment by revoorun...@gmail.com on 30 Mar 2015 at 11:18