Daniel Bertrand | 20 Aug 2012 15:55
Gravatar

Re: incorrect libraries causing tesseract and leptonic to give errors


Something is wrong with macports install of tesseract and/or leptonica.

I did sudo port install leptonica, sudo port install tesseract, no errors.

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.

libraries linked in:

ldd /opt/local/bin/tesseract 

/opt/local/bin/tesseract:
	/opt/local/lib/libtesseract.3.dylib (compatibility version 4.0.0, current version 4.1.0)
	/opt/local/lib/liblept.3.dylib (compatibility version 4.0.0, current version 4.0.0)
	/opt/local/lib/libpng14.14.dylib (compatibility version 27.0.0, current version 27.0.0)
	/opt/local/lib/libgif.4.dylib (compatibility version 6.0.0, current version 6.7.0)
	/opt/local/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0)
	/opt/local/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0)
(Continue reading)

Ryan Schmidt | 20 Aug 2012 21:59
Favicon

Re: incorrect libraries causing tesseract and leptonic to give errors


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
(Continue reading)


Gmane