Open hikmert opened 2 years ago
I find out that by modifying this line for Android :
val image = InputImage.fromMediaImage(mediaImage, frame.imageInfo.rotationDegrees) // frame.imageInfo.rotationDegrees = 90
To :
val image = InputImage.fromMediaImage(mediaImage, 0) // or 180
The OCR can recognize text vertically.
I haven’t been able to test but I think it's the same for iOS, if you change .up
to .left
or .right
it should work. As mentioned in the documentation : https://developers.google.com/ml-kit/vision/text-recognition/ios
I am also looking forward to changing the orientation by passing a param. I don't know if that's something that could be added to this package.
Hey @Nazort, thanks for your reply.
I'm working on iOS at the moment, so as a workaround I removed the lines ` // TODO: Get camera orientation state visionImage.orientation = .up`` and I passed the orientation of the device through listening to the device acceloremeter.
Hey @Nazort, thanks for your reply.
I'm working on iOS at the moment, so as a workaround I removed the lines ` // TODO: Get camera orientation state visionImage.orientation = .up`` and I passed the orientation of the device through listening to the device acceloremeter.
Hi, can you share the code? I'm having the issue, almost 2 years later
I've installed the plugin correctly and it works pretty well if the orientation of the device is 'portrait'. However, when I either turn the text or device, it doesn't recognise the texts. Although I played a bit with the orientation property of the camera, no improvements achieved so far. When I looked into the pod of VisionCameraOCR, I came across with a todo as: ` @objc public static func callback( frame: Frame!, withArgs : [Any]!) -> Any! {
I'd highly appreciate any advices or hints. Thanks in advance!