When I use an image taken with the camera on the iPhone and send it to 
tesseract the accuracy is horrible it is all garbage text, but when I 
choose the same image from the photo library I get great accuracy.

How can I improve tesseracts accuracy from a picture take with the camera? 
Here is what I am doing to the image before sending


- (void)imagePickerController:(UIImagePickerController *)picker 
didFinishPickingMediaWithInfo:(NSDictionary *)info {






    UIImage *image = info[UIImagePickerControllerOriginalImage];

    CGFloat newWidth = 1200;

    CGSize newSize = CGSizeMake(newWidth, newWidth);

    image = [image resizedImage:newSize interpolationQuality:
kCGInterpolationHigh];




    Tesseract* tesseract = [[Tesseract alloc]initWithLanguage:@"eng"];

    [tesseract setVariableValue:@
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@#&*()-_:."forKey
:@"tessedit_char_whitelist"];

    [tesseract setVariableValue:@"`~!%^*[]{}<>?|" forKey:@
"tessedit_char_blacklist"];

    [tesseract setImage:image];

    [tesseract recognize];

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




    [picker dismissViewControllerAnimated:YES completion:NULL];




}


-- 
-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to