Posts

Post not yet marked as solved
0 Replies
835 Views
Hello everyone, I am new to iOS development and currently working on an iOS app for a project where I want to detect and recognize text in an image. I am taking the image from the AVFoundation framework and getting a UIImage. For the text detection and recognition I decided to use the Google MLToolkit, therefore I simply put the UIImage into the specific MLKit function: func runTextRecognition(with image: UIImage) { let visionImage = VisionImage(image: image) textRecognizer.process(visionImage) { features, error in self.processResult(from: features, error: error) } } Now I have the problem, that when I am taking a picture having the iPhone in portrait mode I do not get any results out of the MLKit. Whereas, when I am holding the phone in landscape mode (homebutton to the right) I get the text which is shown on the image as my result. Is there any parameter I have to set to make Google MLKit work for portrait mode pictures? Probably I would suggest the error to be in the CameraController.swift file where I define my capture output. You can find the repository under: https://gitlab.com/lukas.kl/TextScan. I hope you can help me, thank you in advance! Kind regards, Lukas
Posted
by luk_as.
Last updated
.