问题描述
如何在Iphone的单点触控应用程序中实现Tesseract OCR?
How do I implement the Tesseract OCR in a monotouch application for Iphone?
推荐答案
首先,您需要将库 port 移植到iOS并作为 static 库使用. Vikas的答案( Pocket-PCR )可能会派上用场(但我还没有尝试过)
First you need to have the library ported to iOS and available as a static library. That where Vikas' answer (Pocket-PCR) might comes handy (but I have not tried it).
接下来,您需要创建到库的C#绑定.
Next you'll need to create C# bindings to the library.
当API导出C函数时,您可以使用 normal .NET pinvokes,即使用 DllImport 属性.
When the API is exports C functions you can use normal .NET pinvokes, i.e. using DllImport attributes.
如果提供了Objective-C API,则可以使用btouch
工具创建绑定. 说明可在MonoTouch网站上找到.
When an Objective-C API is provided then you can create bindings using the btouch
tool. Instructions are available on the MonoTouch web site.
但是(有点像 Tesseract 的情况)对于C ++库而言更为复杂.您要么首先需要创建一个C(或Objective-C)库,即可导出所需的功能,然后它们会绑定您自己的API.
However (and this looks to be the case for Tesseract) it's a bit more complex for C++ libraries. You'll either need to first create a C (or Objective-C) library that export the feature you need and them bind your own API.
这篇关于Tesseract OCR在单点触控中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!