I am using Vision framework for iOS 11 to detect text on image.
The texts are getting detected successfully, but how we can get the detected text?
I am using Vision framework for iOS 11 to detect text on image.
The texts are getting detected successfully, but how we can get the detected text?
Not exactly a dupe but similar to: Converting a Vision VNTextObservation to a String
You need to either use CoreML or another library to perform OCR (SwiftOCR, etc.)
VNRecognizeTextRequest
works starting from iOS 13.0 and macOS 10.15.Here's a code snippet showing you how to do it:
Then you have to assign a value for
recognitionLevel
instance property:This will return a overlay image with rectangle box on detected text
Here is the full xcode project https://github.com/cyruslok/iOS11-Vision-Framework-Demo
Hope it is helpful