I am also seeing same kind of issue. If I embed the image inside iOS
application and pass on black & white version of the image duly scaled to
640 px then tesseract works with quite a good accuracy. On the other hand
same code failed to extract any text when capturing the same image using
IOS camera. Can anybody tell what is causing tesseract to get failed while
using camera?
On Monday, February 24, 2014 at 7:03:40 AM UTC+5:30, Nick Porter wrote:
>
> 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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/6fec61c2-8b00-4c9c-ac81-79a86aa8a480%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.