【问题标题】:How to install leptonica+tesseract on Windows without Visual Studio to use in Anaconda?如何在没有 Visual Studio 的情况下在 Windows 上安装 leptonica+tesseract 以在 Anaconda 中使用?
【发布时间】:2016-02-08 13:09:20
【问题描述】:

我想从图像中执行文本识别,并且我想使用 Python。我安装了蟒蛇。现在我想安装 Tesseract,但我还需要安装 Leptonica。我没有找到任何明确的说明如何在 Windows 中执行此操作。对于 Leptonica,我不想安装 Visual Studio。 那么任何人都可以提供明确的说明如何在没有 Visual Studio 的情况下在 Windows 上安装 leptonica 和 tesseract 以在 anaconda 中使用? 谢谢。

【问题讨论】:

    标签: python windows tesseract anaconda leptonica


    【解决方案1】:

    以下是让 tesseract 3.05 开发版(截至 2016 年 4 月 22 日)在 Windows 7 和 Windows 8 机器上运行的简单步骤:

    1- 从官方 tesseract-ocr 页面的可执行文件安装 tesseract(windoes 版本 3.02 就足够了)

    2-从http://domasofan.spdns.eu/tesseract/下载tesseract 3.05开发版的以下两个文件

    有2个exe文件:

    • tesseract-core-yyyymmdd.exe 没有语言数据的 Tesseract 核心应用程序
    • tesseract-langs-yyyymmdd.exe 可用于 Tesseract 的所有语言数据。

    (yyyymmdd表示年4位,月2位,日2位。)

    该应用是便携式的,因此您可以将其安装在 U 盘或其他位置。

    安装这些的子步骤:

    1. 下载 tesseract-core 和 tesseract-langs 包。
    2. 双击 tesseract-core 包并将其解压缩到您想要的目录(一个名为“Tess_temp”的临时新文件夹)。
    3. 双击 tesseract-langs 包并将其解压缩到同一目录,但将 \tessdata 添加到上述“Tess_temp”文件夹中。 例如,如果我将 tesseract-core 提取到 c:\Tess_temp,则 tesseract-langs 需要转到 c:\Tess_temp\tessdata。

    4. 现在将“Tess_temp”中的所有内容复制到上述步骤 1 中安装 tesseract 3.02 的位置(通常在 C:\Program Files (x86)\Tesseract-OCR 中)(将 3.02 材料替换为 3.05 )

    5. 它现在应该可以在 Windows 上与 3.05 版本一起使用。 将示例图像 test.png(带文本)复制到此 tesseract-ocr 文件夹并打开 cmd 并输入以下命令:

      转到 tesseract 文件夹:cd C:\Program Files <x86>\Tesseract-OCR

      在 test.png 上运行 tesseract:tesseract -l eng test.png test_text -psm 6

    它会告诉你

    Tesseract Open Source OCR Engine v3.05.00dev with Leptonica
    

    恭喜! (检查 test_txt.txt 以获取提取的文本)

    【讨论】:

    • 你在回答中提到的链接根本打不开
    • 抱歉链接现在已被删除,我设法在 Windows 10 机器上使用 tesseract 使用 4.0 没有任何问题。我认为以前的错误现在已修复。
    猜你喜欢
    • 2015-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多