Closed GoogleCodeExporter closed 9 years ago
Forgot the code :
public class OCR {
public static void main(String[] args) {
File arquivo = new File("/home/gsouza/Desktop/imagemocr.jpg");
Tesseract tesseract = Tesseract.getInstance();
tesseract.setDatapath("/usr/share/tesseract-ocr/");
try {
String result = tesseract.doOCR(arquivo);
System.out.println(result);
} catch(TesseractException e) {
e.printStackTrace();
}
}
}
Original comment by gso...@reglare.com.br
on 29 Apr 2015 at 8:20
https://code.google.com/p/tesseract-ocr/wiki/FAQ#Rules_and_advices
Original comment by zde...@gmail.com
on 30 Apr 2015 at 6:23
I have already set the LC_NUMERIC=C through the terminal. But the error pesists.
Original comment by gso...@reglare.com.br
on 30 Apr 2015 at 12:26
I have tried setting the LC_NUMERIC using setTessVariable but it isn't working
either :
public class OCR {
public static void main(String[] args) {
File arquivo = new File("/home/gsouza/Desktop/imagemocr.jpg");
Tesseract tesseract = Tesseract.getInstance();
tesseract.setDatapath("/usr/share/tesseract-ocr/");
tesseract.setTessVariable("LC_NUMERIC", "C");
try {
String result = tesseract.doOCR(arquivo);
System.out.println(result);
} catch(TesseractException e) {
e.printStackTrace();
}
}
}
Original comment by gso...@reglare.com.br
on 30 Apr 2015 at 12:32
Issue 1469 has been merged into this issue.
Original comment by zde...@gmail.com
on 1 May 2015 at 7:21
I confirm this issue. It recently crashes Java VM on my Mac (OS X 10.7) in just
the same way.
What's really annoying about this is the fact we've been discussing this issue
several times for a very long period of time (> 1 year IIRC), see here:
https://code.google.com/p/tesseract-ocr/issues/detail?id=910
Finally, a fix has been provided, see here:
https://code.google.com/p/tesseract-ocr/source/detail?r=3a5f69901310e26a958c6cb6
395174368b44c99c
IIRC, the above mentioned fix replaces fscanf with another version that ignores
locale settings.
Moreover, I remember that Tesseract 3.03 RC1 has been already worked fine with
this fix in my Ubuntu for 2-3 months. Therefore, I have no idea what does
trigger the issue this time.
BTW, you cannot change your locale from inside Java. You HAVE to run the whole
JVM with a proper locale from the command line...
Best regards
Max
Original comment by maximums...@googlemail.com
on 25 Jun 2015 at 11:30
First of all - we do not provide support for java wrapper.
Next: you need to provide test case with tesseract executable[1] (or simple cpp
example that use tesseract library) so we can try to reproduce problem.
Otherwise your confirmation of issue is useless.
And you forget to specified what tesseract version you use... This is more
important than you version of Mac OS
[1] https://code.google.com/p/tesseract-ocr/wiki/FAQ#Rules_and_advices
Original comment by zde...@gmail.com
on 26 Jun 2015 at 9:12
Original issue reported on code.google.com by
gso...@reglare.com.br
on 29 Apr 2015 at 8:17