不使用leptonica构建tesseract [英] Building tesseract without leptonica

查看:363
本文介绍了不使用leptonica构建tesseract的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要构建没有leptonica依赖的tesseract,以完成某些工作(使用emscripten进行移植). 我查看了make文件,看来tesseract需要leptonica头文件和lib文件才能进行构建.

I need to build tesseract without leptonica dependency for some work(to porting using emscripten). I looked into the make files and it seems tesseract requires leptonica header files and lib files in order to build.

提供头文件不是问题,但是由于某些原因我不能提供lib文件(emscripten不会生成leptonica的lib文件).而且我试图通过编辑make文件来阻止tesseract要求leptonica,但看来我走错了路.

Providing header files is not an issue but i can't provide lib files because of some reason(emscripten doesn't generate lib files of leptonica). and i tried to stop tesseract asking for leptonica by editing make files but it seems i'm heading in wrong way.

我对制作/使用自动工具非常陌生,我所做的是从整个脚本中的"ac_link"变量中删除了$LIB标志,并且在其他几个我以为是在调用的地方.

I'm very new to make/autotools stuff and what i did was removing $LIB flag from "ac_link" variable throughout the script and also in more few places i thought it was calling.

但是我想这些构建系统可能有一种更简洁的方式来删除依赖项,而无需编辑configure脚本中的任意位置(可能是诸如makefile.am之类的地方,或某个地方).或者有没有其他方法可以在没有leptonica的情况下构建tesseract,我该怎么做呢?

But i guess these build system might have a way to remove dependencies in a cleaner way without editing the arbitrary places in configure script(may be some places like makefile.am, or somewhere). Or is there any other way i can build tesseract without leptonica and how can i exactly do it ?.

很抱歉,如果我使用了错误的术语,例如我说我对上述构建系统不太熟悉.

Sorry if i have used wrong terminologies like i said i'm not much familiar with above build systems.

推荐答案

除非您为所需的功能提供了一些替代,否则恐怕无法省略Leptonica.

I'm afraid there is no way to omit Leptonica unless you provide some replacement for required functionality.

我对此事进行了一些研究. Leptonica当时有2481个功能,但Tesseract仅使用其中的一小部分-总共163个功能.

I did some research regarding this matter. At the time being, Leptonica counts 2481 functions but Tesseract uses a small subset of them - 163 functions in total.

因此,您必须提供非平凡的163个功能的替代品,这些功能通常需要进行复杂的图像处理,例如数学形态,通过对彩色图像进行剪切和二值化来旋转.

So you have to provide a replacement for non-trivial 163 functions, mostly doing complex image manipulation like mathematical morphology, rotation by shearing and binarization of color images.

事实上不可能将Leptonica重新编译为Javascript投票,以实现Leptonica更好的模块化.目前,它是一个庞大的整体库,几乎不依赖于jpeg,gif,tiff,webp等几种图像格式.因此,您必须将适当的库(如libtiff,libgiff,libz,libwebp等)重新编译为Javascript,如下所示:出色地.这可以更好地实现为插件.

The fact it isn't possible to recompile Leptonica to Javascript votes for a better modularization of Leptonica. At the moment being, it's a huge monolithic library depending toughly on several image formats like jpeg, gif, tiff, webp etc. Therefore, you'll have to recompile the appropriate libraries like libtiff, libgiff, libz, libwebp etc. into Javascript as well. This is what could be better implemented as plugins.

我只有两美分...

这篇关于不使用leptonica构建tesseract的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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