jeudi 21 juillet 2016

Tesseract java.lang.IllegalArgumentException: Data path does not exist

public String scanText(){
    image=image.copy(Bitmap.Config.ARGB_8888,true);

    TessBaseAPI baseApi= new TessBaseAPI();

     //The DATA_PATH here is using
    // public static final String DATA_PATH =  Environment.getExternalStorageDirectory().toString()+"/EasyOR/";
    baseApi.init(DATA_PATH,"eng");

    Log.d(TAG,"After the init method");
    baseApi.setImage(image);

    String recognizedText=baseApi.getUTF8Text();
    baseApi.end();
    return recognizedText;

}

This is the code I am using to get the text in the image. @rmtheis can you tell me where I am going wrong. I have kept my tessdata folder in the C:UsersMAHEAndroidStudioProjectsEasyOR2appassests folder. Where am i supposed to keep it?

Aucun commentaire:

Enregistrer un commentaire