mmoghimi / tesseract-ocr

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

The result of the simple image is wrong when using version 3.0.4 on Android #1460

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The steps reproduced the problem:
1.Init
 TessBaseAPI mBaseAPI;
 mBaseAPI = new TessBaseAPI();
 mBaseAPI.setDebug(true);
 mBaseAPI.init(Define.DATA_PATH, Define.lang);

    public void setCharMode() {
        mBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST,
                "abcdefghijklmnopqrstuvwxyz");
    }

2. Set char white list
 mBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST,
                "abcdefghijklmnopqrstuvwxyz");
3. Load image "IMG_1095.JPG" into Bitmap "bm" and set image to TessBaseApi
 mBaseAPI.setImage(bm);

4. Convert image to text
 mBaseAPI.getUTF8Text();

The expected output is "yxqk"
I see instead "quk"

I am using version 3.0.4 on Android which is download from 
https://github.com/rmtheis/tess-two

If I cut image "IMG_1095.JPG" into 2 image "IMG_1095_1.JPG" & "IMG_1095_2.JPG" 
then the results are "yx" & "qk"
If I use version 3.0.2 on Windows 7 then the output that I see is "yxqk"

Please show me what should I do to have the result "yxqk" on Android when 
converting image "IMG_1095.JPG"

Original issue reported on code.google.com by nhung...@anlab.info on 23 Apr 2015 at 6:54

Attachments: