为什么我在Tesseract中收到“tiff page 1 not found”Lebtonica警告?

时间:2015-10-22 10:56:58

标签: ocr tesseract tiff

我刚开始使用Tesseract

我按照here所述的说明进行操作。

我创建了一个像这样的测试图像:

training/text2image --text=test.txt --outputbase=eng.Arial.exp0 --font='Arial' --fonts_dir=/usr/share/fonts

现在我想训练Tesseract如下:

tesseract eng.Arial.exp0.tif eng.Arial.exp0 box.train

这是我的输出:

Tesseract Open Source OCR Engine v3.04.00 with Leptonica
Page 1
APPLY_BOXES:
   Boxes read from boxfile:     112
   Found 112 good blobs.
Generated training data for 21 words
Warning in pixReadMemTiff: tiff page 1 not found

这可以防止创建fontfile.tr文件。我已经尝试继续忽略警告,但在创建字符集时,我得到了一个令人满意的内容:

unicharset_extractor lang.fontname.exp0.box

"58
NULL 0 NULL 0
Joined 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0     # Joined [4a 6f 69 6e 65 64 ]
|Broken|0|1 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0    # Broken
T 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0  # T [54 ]
h 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0  # h [68 ]
e 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0  # e [65 ]
( 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0  # ( [28 ]
q 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0  # q [71 ]
u 0 0,255,0,255,0,0,0,0,0,0 NULL 0 0 0  # u [75 ]
..."

这是我正在使用的版本:

tesseract 3.04.00
 leptonica-1.72
  libjpeg 8d (libjpeg-turbo 1.3.0) : libpng 1.2.50 : libtiff 4.0.3 : zlib 1.2.8

知道为什么会这样吗?

1 个答案:

答案 0 :(得分:0)

这可能是一个错误,我正在使用v4.00.00alpha而我

Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica
Page 1
APPLY_BOXES:
   Boxes read from boxfile:     100
   Found 100 good blobs.
Generated training data for 21 words