【问题标题】:tesseract not seeing makebox and batch.nochop filestesseract 没有看到 makebox 和 batch.nochop 文件
【发布时间】:2017-06-29 10:13:11
【问题描述】:

第一次使用 tesseract。我安装了 tesseract 并试图生成一些训练图像。使用说明,我在 tif 文件上运行第一个命令。

# tesseract img.tif img makebox batch.nochop

当我运行上述程序时,我收到以下错误-

read_params_file: Can't open batch.nochop
read_params_file: Can't open makebox

然后我尝试像这样给出这些文件的完整路径 -

# tesseract img.tif img /usr/local/share/tessdata/tessconfigs/batch.nochop  /usr/local/share/tessdata/configs/makebox

然后我得到这个错误--

Error in findTiffCompression: function not present
Error in pixReadStreamTiff: function not present
Error in pixReadStream: tiff: no pix returned
Error in pixRead: pix not read
Error in pixGetInputFormat: pix not defined
Reading start.tif as a list of filenames...
Error in fopenReadStream: file not found
Error in pixRead: image file not found: II*
Image file II* cannot be read!
Error during processing.

我很确定我缺少一些环境变量或类似的东西。有人能指出我正确的方向吗?

顺便说一句

# tesseract -v
tesseract 3.03
 leptonica-1.72
   libpng 1.2.51 : zlib 1.2.8

【问题讨论】:

    标签: ocr tesseract


    【解决方案1】:

    我有同样的问题。如果有人正在寻找解决方案,它可能会有所帮助。

    根据旧文档,需要手动设置 TESSDATA_PRIFIX。 对于 Macos Yosemite,我做了同样的事情并在 hocr 和 makebox 中引起了问题。

    我更改了 TESSDATA_PREFIX

    export TESSDATA_PREFIX=/usr/local/Cellar/tesseract/3.04.01_2/share/tessdata
    

    版本号可能因您而异; 3.04.01_2

    【讨论】:

      【解决方案2】:

      我遇到了同样的问题,并为我找到了解决方案。 问题来了

      [root@bogon aa]# tesseract num.font.exp0.tif num.font.exp0 batch.nochop makebox
      read_params_file:无法打开 batch.nochop
      read_params_file: 无法打开 makebox
      Tesseract 开源 OCR 引擎 v3.04.02dev 与 Leptonica

      我在 /usr/local/share/tessdata 下的 config 和 tessconfigs 中分别找到了“batch.nochop”和“makebox”。所以解决方案是检查您的 TESSDATA_PREFIX,并确保路径包含 tessconfigs 和 config。

      可能写的不是很清楚,你可以发邮件给我“li_daozhang@163.com”。希望对你有帮助

      【讨论】:

        【解决方案3】:

        发现问题。原来我需要 jpeg 和 tiff 的开发库,然后重新安装 leptonica。

        【讨论】:

          【解决方案4】:
          I found the solution:
          
              which tesseract
          
              /usr/local/bin/tesseract
          
              cd /usr/local/bin
          
              ll tesseract
          
              lrwxr-xr-x  1 wangchuande  admin  43  6 12 16:46 tesseract -> ../Cellar/tesseract/3.04.01_1/bin/tesseract
          
              cd ../Cellar/tesseract/3.04.01_1/share/tessdata/
          
              pwd
          
              /usr/local/Cellar/tesseract/3.04.01_1/share/tessdata
          
              export TESSDATA_PREFIX=/usr/local/Cellar/tesseract/3.04.01_1/share/tessdata
          
              tesseract new.test.exp0.tif new.test.exp0 batch.nochop makebox
          
          that's work!
          

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2013-09-19
            • 1970-01-01
            • 2012-09-01
            • 2017-02-06
            • 2018-06-30
            • 2023-03-17
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多