Tesseract error. Illegal min or max specification

这一生的挚爱 提交于 2019-12-07 04:05:32

问题


Trying to run sample code from here http://tess4j.sourceforge.net/codesample.html I got an error saying

Error: Illegal min or max specification!
signal_termination_handler:Error:Signal_termination_handler called:Code 5002

I found solution e.g. here https://code.google.com/p/tesseract-ocr/issues/detail?id=228 ppl say that setting locale is enough to get rid of error. My problem is that I write it in Java not C++ and I cannot find anywhere how I can set locale in my code as they did it like that

 #include <locale.h>
 setlocale (LC_NUMERIC, "C");

I was trying to use setTessVariable(String, String) method but it didn't work. I will mention that my pdf files, which are on input, are in polish language so if someone know how I should set these locale I would be grateful. I try to run it on linux x64 platform.


回答1:


'Can you export LC_NUMERIC="C" at the command line when you launch your program?'

– nguyenq




回答2:


Open a terminal, export LC_NUMERIC="C" and launch Eclipse or NetBeans from there also (important!).



来源:https://stackoverflow.com/questions/23579290/tesseract-error-illegal-min-or-max-specification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!