【问题标题】:How to recognise the accurate text from an image using Tesseract OCR Library in iOS?如何在 iOS 中使用 Tesseract OCR 库从图像中识别准确的文本?
【发布时间】:2016-10-09 17:16:29
【问题描述】:

我正在 Objective C 中创建一个 iPhone 应用程序。我正在尝试从图像(从相机拍摄)中识别文本。为此,我在我的应用程序 Tesseract OCR Library 中使用。它对某些文本工作正常,但无法从捕获的图像中获得准确的结果。还有来自 Google 代码的最新 tessdata 文件。

我从this link 添加了tesseract 库。

下面是我尝试识别的图像:

我的代码如下:

    G8Tesseract *tesseract = [[G8Tesseract alloc] initWithLanguage:@"eng+fra" engineMode:G8OCREngineModeTesseractCubeCombined];
    [tesseract setVariableValue:@"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:;,.!-()#&÷" forKey:@"tessedit_char_whitelist"];
    tesseract.pageSegmentationMode = G8PageSegmentationModeAuto;
    tesseract.maximumRecognitionTime = 60.0;
    tesseract.image = [selectedImage g8_blackAndWhite];
    [tesseract recognize];

    NSLog(@"%@", [tesseract recognizedText]);

但我得到这样的结果:

BAZAAR

mm; l Savees l smmamm l mm; l Accessories

commemw Street ' _ . «mm. me o snwapnagay

www minabazaav.cum

我已经通过这个链接浏览了:

有没有人遇到同样的问题?

【问题讨论】:

    标签: ios objective-c iphone ocr tesseract


    【解决方案1】:

    就我而言,Tesseract 库大部分时间都不准确。相反Abby 还可以。但是艾比没有离线

    Abby Stackoverflow Channel

    【讨论】:

    • 非常感谢@iDev 的回复,我使用 ABBYY 从捕获的图像中获得了准确的文本。您能否建议我是否可以使用此功能将每个文本与姓名、地址、电子邮件、电话号码等分开?
    • http://cloud.ocrsdk.com/processBusinessCard 使用此 api,您将获得您期望的单独值
    • 再次感谢您的宝贵时间..!
    猜你喜欢
    • 1970-01-01
    • 2018-05-07
    • 2012-11-10
    • 1970-01-01
    • 1970-01-01
    • 2013-06-14
    • 1970-01-01
    • 1970-01-01
    • 2014-06-15
    相关资源
    最近更新 更多