0
我在Objective C中创建iPhone应用程序。我试图从图像中识别文本(从相机拍摄)。为此,我在我的应用程序Tesseract OCR库中使用。它对一些文本的工作正常,但没有从捕获的图像中获得准确的结果。还有谷歌代码的最新tessdata文件。如何使用iOS中的Tesseract OCR库识别图像中的准确文字?
我从this link添加了tesseract库。
下面是我的形象,我想认识:
我的代码如下:
G8Tesseract *tesseract = [[G8Tesseract alloc] initWithLanguage:@"eng+fra" engineMode:G8OCREngineModeTesseractCubeCombined];
[tesseract setVariableValue:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:;,.!-()#&÷" 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
我已经通过这个链接:
- How do I get accurate text using Tesseract OCR in iOS?
- Why Tesseract OCR library (iOS) cannot recognize text at all?
- http://www.scriptscoop2.com/t/42247286510f/c-3.5-why-i-am-not-able-to-recognize-text-in-image-using-tesseract.html。
其他人遇到同样的问题吗?
非常感谢您的回复@iDev,使用ABBYY我从我拍摄的图像的准确的文本。你能否请我建议我是否可以使用这个名称,地址,电子邮件,电话号码等单独的每个文本? –
'http:// cloud.ocrsdk.com/processBusinessCard' with this api you will get separate values that you expect – Rajesh
this is proper看看这个http://ocrsdk.com/documentation/apireference/processBusinessCard/ – Rajesh