gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

Images Upside Down #275

Closed BSEBAT1 closed 8 years ago

BSEBAT1 commented 8 years ago

Iphone 5 camera running on IOS 9.3. For some reason every image taken with the camera is rendered upside down. The results are completely nonsensical. Turning a phone upside down and taking a photo results in the correct output and the image being displayed correctly. I do not understand why this is happening.

ForeverTangent commented 8 years ago

I have to second this issue. I can't tell if Tesseract is doing the flipping of the image data or if the iOS is doing it.

ForeverTangent commented 8 years ago

A quick workaround for the issue can be done by changing line 69 in the G8ViewController.m from

    // Set the image on which Tesseract should perform recognition
    operation.tesseract.image = image;

to

    // Set the image on which Tesseract should perform recognition
    operation.tesseract.image = [UIImage imageWithCGImage:image.CGImage scale:1.0 orientation: UIImageOrientationLeft ];

Not Ideal

But it will get the example to work properly.