无法使用 Tesseract 3.0.2.02 存档为 WIndows 编译 Tesseract API 示例 [英] Can't Compile Tesseract API example for WIndows using Tesseract 3.0.2.02 archive

查看:31
本文介绍了无法使用 Tesseract 3.0.2.02 存档为 WIndows 编译 Tesseract API 示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用 Tesseract 来处理 PDF 文件,因此我想使用该库而不是外部可执行文件.

I'm looking at using Tesseract to do some work with PDF files, and so I want to use the library rather than an external executable.

我首先下载了完整的 Tesseract 源代码并考虑构建它.遗憾的是,标准源没有任何方法可以在非 Linux 平台上构建,在我的情况下是 Windows.有这样做的方法,我看了那些.

I started by downloading the full Tesseract source and looking at building that. Sadly the standard sources don't have any means to build on a non-Linux platform, in my case Windows. There are methods for doing so, and I looked at those.

首先,VS2008 版本没有.我知道它需要 Leptonica,但我想我会在之后解决这个问题并尝试构建现有代码.因致命错误 C1083:无法打开包含文件:‘allheaders.h’:没有此类文件或目录"而失败.在这个阶段与 Leptonica 无关,它根本不起作用.

Firstly the VS2008 build doesn't. I'm aware that it need Leptonica, but I figured I'd tackle that afterwards and just tried to build the existing code. Fails with "fatal error C1083: Cannot open include file: 'allheaders.h': No such file or directory". Nothing to do with Leptonica at this stage, it simply doesn't work.

即使我能够解决这个问题,我也必须构建 Leptonica,这需要使用 GNU 工具,因此需要安装 Cygwin,所以我放弃了.我有一个 MingW 安装,(我从来没有设法让 Cygwin 以可用的方式工作)但我不太热衷于搞乱这样一个复杂和脆弱的构建.

Even if I were able to get past that, I'd have to build Leptonica, and that requires using GNU tools and therefore an installation of Cygwin, so I gave up. I Have a MingW instatllation, (I've never managed to get Cygwin to work in a usable fashion) but I'm not keen enough to mess with such a complicated and fragile build.

所以我决定只使用某种灵魂创建的预构建二进制文件.从 code.google.com 下载.现在我需要研究使用代码,所以下一个明显的步骤是 Tesseract API 示例,它指出它需要tesseract-ocr-3.02.02-win32-lib-include-dirs.zip",没问题,因为我现在已经有了.

So I decided I'd just use the pre-built binaries which some kind soul creates. Downloaded that from code.google.com. Now I need to look into using the code, so the next obvious step is the Tesseract API example, which states it requires "tesseract-ocr-3.02.02-win32-lib-include-dirs.zip", no problem, because I already have that now.

没有关于 API 示例希望将文件放置在何处的真正线索,但有点混乱将它们放在适当的位置.按构建和致命错误 C1083:无法打开包含文件:'allheaders.h':没有这样的文件或目录",就像尝试从源代码构建 Tesseract.....

No real clue as to where the API example wants the files to be placed, but a little messing about gets them in appropriate locations. Press build and "fatal error C1083: Cannot open include file: 'allheaders.h': No such file or directory", just like trying to build Tesseract from source.....

确实没有这样的文件.

那么,这个文件在哪里?

So, where is this file ?

推荐答案

我前段时间也努力让它在 windows 下工作,然后我找到了这个 git 存储库:https://github.com/charlesw/tesseract-vs2012

I also struggled some time ago to make it works under windows and then I found this git repository : https://github.com/charlesw/tesseract-vs2012

它包括所有需要的外部库(因为 Tesseract 需要 Leptonica,但 Leptonica 也需要外部库来处理不同的图像格式)并且与 2013 相比也很好用.

It includes all needed extern library (because Tesseract need Leptonica, but Leptonica also need extern library to handle the different image format) and is also working great with vs 2013.

这篇关于无法使用 Tesseract 3.0.2.02 存档为 WIndows 编译 Tesseract API 示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆