Closed DmLam closed 7 years ago
It looks like Tesseract internally fails to load trained data. Please make sure that you are using latest LSTM model (https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata) and the file is not corrupted. If it doesn't help try changing Tesseract initialization line to this:
uses
System.SysUtils,
tesseractocr in '..\..\tesseractocr.pas';
(...)
if Tesseract.Initialize(ExtractFilePath(ParamStr(0)) + 'tessdata\', 'eng') then
or
if Tesseract.Initialize(ExtractFilePath(ParamStr(0)) + 'tessdata\', 'eng', oemTesseractOnly) then
Yes, the problem was in corrupted eng.traineddata. Redownloaded it and now everything works fine. Thank you!
I try to run delphi_console_simple example and get AV in TTesseractOCR4.Initialize on the TessBaseAPIInit2 call.
I use Tokyo 10.2.1, tesseract binaries is downloaded from r1me.pl, eng.traineddata is in tessdata folder