Tess-two + "tessdata_fast" : crashes

522 views Asked by At

I am using tess-two for OCR.

The version I use is : https://github.com/alexcohn/tess-two

Code:

        TessBaseAPI baseApi = new TessBaseAPI();
        baseApi.setDebug(true);
        baseApi.init(pathfiles, language);
        baseApi.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "0123456789");
        baseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_AUTO);
        baseApi.setImage(bmp);
        result= baseApi.getUTF8Text();
        baseApi.end();

The code run perfectly when I use this tessdata :https://github.com/tesseract-ocr/tessdata

But when I use tessdata_fast (https://github.com/tesseract-ocr/tessdata_fast), The code crashes on baseApi.init.

There is no error message since the init method calls native C++. As far as I can trace, the init method crashes on this line:

boolean success = nativeInitOem(mNativeData, datapath, language, ocrEngineMode);

Is it possible to use tessdata_fast in tess-two?

0

There are 0 answers