Невозможно обработать GIF с помощью Tesseract в OSX

2212
Sherzod

Получение следующей ошибки:

Tesseract Open Source OCR Engine v3.02.02 with Leptonica Error in pixReadStreamGif: function not present Error in pixReadStream: gif: no pix returned Error in pixRead: pix not read Unsupported image type. 

Есть идеи почему?

0

2 ответа на вопрос

1
Sada

Please refer Issue 35 of Leptotica: http://code.google.com/p/leptonica/issues/detail?id=35

pixRead for gif have a potential problem related to closing file stream (fclose) that depends on OS. The problem has been fixed for windows (win32) as shown in Issue 35, but I guess the same problem still exists for OSX. I also meet the same problem when building .NET (not win32) application with Leptotica.

0
user495470

Was leptonica built without support for gif? Homebrew doesn't seem to include support for gif:

$ brew info leptonica leptonica: stable 1.69 http://www.leptonica.org/ Depends on: libpng, jpeg, libtiff /usr/local/Cellar/leptonica/1.69 (240 files, 7.5M) * https://github.com/mxcl/homebrew/commits/master/Library/Formula/leptonica.rb ==> Options --with-libtiff Build with libtiff support --without-jpeg Build without jpeg support --without-libpng Build without libpng support 

You could try building leptonica from source, or just convert images to some other format first:

convert file.gif temp.png; tesseract temp.png output 

Похожие вопросы