Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tesseract error. Illegal min or max specification

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.

like image 953
wawek Avatar asked May 10 '14 09:05

wawek


1 Answers

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

– nguyenq

like image 148
ManyQuestions Avatar answered Oct 19 '22 01:10

ManyQuestions