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