incorrect libraries causing tesseract and leptonic to give errors

Ryan Schmidt ryandesign at macports.org
Mon Aug 20 12:59:24 PDT 2012


On Aug 20, 2012, at 08:55, Daniel Bertrand wrote:

> Then, when trying to run
> 
> tesseract training-text.tiff da
> 
> I get:
> 
> Tesseract Open Source OCR Engine v3.01 with Leptonica
> TIFFstream: Sorry, can not handle image.
> Error in pixReadFromTiffStream: failed to read tiffdata
> Error in pixReadStreamTiff: pix not read
> Error in pixReadStream: tiff: no pix returned
> Error in pixRead: pix not read
> Unsupported image type.

I tried running this command on my system and of course got:

Error opening data file /opt/local/share/tessdata/eng.traineddata
Tesseract Open Source OCR Engine v3.01 with Leptonica
Cannot open input file: training-text.tiff

Where can I get this file? The only hit for that filename on Google is this mailing list thread.


I tried using a different tiff I already had, and got this message:

Error opening data file /opt/local/share/tessdata/eng.traineddata
Tesseract Open Source OCR Engine v3.01 with Leptonica
Page 0
Segmentation fault: 11

So I installed the port tesseract-eng to get the English trained data. Then I ran the command again, and it properly OCR'd the file.

Do you have tesseract-eng installed as well? If not, try installing that.



More information about the macports-users mailing list