Created
June 15, 2018 17:19
-
-
Save onmyway133/e530d1d65b8287f47cc4a591b43cae79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tesseract = G8Tesseract(language: "eng")! | |
tesseract.engineMode = .tesseractCubeCombined | |
tesseract.pageSegmentationMode = .singleBlock | |
private func handleWithTesseract(image: UIImage) { | |
tesseract.image = image.g8_blackAndWhite() | |
tesseract.recognize() | |
let text = tesseract.recognizedText ?? "" | |
delegate?.ocrService(self, didDetect: text) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment