简体   繁体   English

Tess-Two,Tesseract Windows,结果不同

[英]Tess-Two, Tesseract Windows, different results

I use tess-two for my android app. 我将tess-two用于我的Android应用程序。 The recognition is bad but sometimes i works. 识别不好,但有时我会工作。 I also use tesseract on my windows 7 pc and the same pictures get recognized 100% here. 我还在Windows 7 pc上使用tesseract,在这里100%识别出相同的图片。 I tried different Options. 我尝试了其他选项。

On windows i use: 在Windows上,我使用:

    tesseract test.png output -eng -psm6

On android: 在android上:

    Bitmap bMap = btm;
    final TessBaseAPI baseApi = new TessBaseAPI();
    baseApi.init(dpath, lang);
    baseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_BLOCK);
    baseApi.setImage(bMap);
    outputText = baseApi.getUTF8Text();

I also tried different PageSegMode's but do not get better recognitions. 我也尝试了不同的PageSegMode,但是没有获得更好的识别。

Why is Windows tesseract working better? 为什么Windows tesseract可以更好地工作? Do i make any mistakes? 我会犯任何错误吗?

I noticed that in Windows tesseract recognizes the numbers from top to bottom and in Tess-Two from left to right. 我注意到,在Windows中,tesseract可以识别从上到下的数字,而在Tess-Two中可以识别从左到右的数字。 Don't know if this helps any. 不知道这是否有帮助。

PS: here the picture I trie to recognize: http://pbrd.co/1q4DClR PS:这是我想要识别的图片: http//pbrd.co/1q4DClR

I managed to recognize the same answers like on windows. 我设法识别出与Windows相同的答案。 I made a new testcase in witch i didnt set any options. 我在女巫中做了一个新的测试用例,但没有设置任何选项。 I used 我用了

Bitmap bMap = btm;
final TessBaseAPI baseApi = new TessBaseAPI();
baseApi.init(dpath, lang);
baseApi.setImage(bMap);
outputText = baseApi.getUTF8Text();

Thats all. 就这样。 And it worked. 而且有效。 Needet two weeks to figure that out. 用针两个星期弄清楚。 I dont't know why there is a difference between 我不知道为什么两者之间有区别

baseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_BLOCK); baseApi.setPageSegMode(TessBaseAPI.PageSegMode.PSM_SINGLE_BLOCK);

and no option, as this PageSegMode is the default mode. 并且没有选项,因为此PageSegMode是默认模式。 Hope i could help anybody. 希望我能帮助任何人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM