Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numbers not properly recognised #200

Closed
Swiftology opened this issue Jul 21, 2015 · 6 comments
Closed

numbers not properly recognised #200

Swiftology opened this issue Jul 21, 2015 · 6 comments

Comments

@Swiftology
Copy link

Tesseract works fine (especially for word recognition) till I try to test it on a string of 14 or more digits. The result is inconsistent, getting only a few numbers right.
I used the code below:

                var tesseract:G8Tesseract = G8Tesseract(language:"eng")
                tesseract.engineMode = .TesseractCubeCombined
                tesseract.pageSegmentationMode = .Auto
                tesseract.maximumRecognitionTime = 60.0
                tesseract.image = newImage.g8_blackAndWhite()
                tesseract.recognize()
                let scannedText = tesseract.recognizedText

I am mainly using Calibri font. Could this be the reason?

@kevincon
Copy link
Collaborator

Unfortunately Tesseract alone is often not sufficient to consistently achieve high recognition accuracy. You can try some of the tips in our wiki: https://github.com/gali8/Tesseract-OCR-iOS/wiki/Tips-for-Improving-OCR-Results. In particular, try using GPUImage to preprocess the image before you give it to Tesseract.

@ws233
Copy link
Collaborator

ws233 commented Jul 21, 2015

@Swiftology, Tesseract doesn't support cube mode anymore.
pls, refer to #140
and tesseract-ocr/tesseract#40 for details.
Try default mode instead.

@Swiftology
Copy link
Author

@kevincon I tried using GPUImage preprocessing but the results seem to be no better.

@Swiftology
Copy link
Author

@ws233, I tried the default mode but the results are still the same, no improvements.

@ws233
Copy link
Collaborator

ws233 commented Jul 23, 2015

Your next step is training tesseract specifically to your font/fonts. Pls, refer to the documentation for more details.

@kevincon kevincon closed this as completed Aug 9, 2015
@AndreaIOSDeveloper
Copy link

Is it possible to recognize only the numbers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants