I am trying to read information from a driving license of USA. But I am not able to get correct text from the image.
I am trying to read image like above but I am getting some strange result. I am getting something like following:
7 WISCONSIN **i_.* 4' L. _-
DRIVER LICENSE Regular
' Q555-5555-2555-00 35533
I5 .4 ClassDMXxX Enduslmmls TPXMXX J
Sex r mnBLQ EyesBl-U 0000.501" 0.00.100
X Restrictions 0n Back MM 08484005
X E0". 00-20-2010
It JANE QUINCY
' * 1' 3913' ECIJ-SWILEKgSJVEEQIJNSRIEMREKBVAY
jilfccgbwm suns 20s
BLACK RIVER FALLS w: 54015-0000
Very few of the words are correct. What should I need do to get a more accurate information?
My Code:
Tesseract* tesseract4 = [[Tesseract alloc] initWithDataPath:@"tessdata" language:@"eng"];
[tesseract4 setVariableValue:@"*'\"-_:.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" forKey:@"tessedit_char_whitelist"];
[tesseract4 setImage:[UIImage imageNamed:@"dlWI.jpg"]];
[tesseract4 recognize];
NSLog(@"%@", [tesseract4 recognizedText]);