Reputation: 95
For OCR project, I am trying to use MLKit Text Recognition API. No text extracted when image is rotated, only when it is in the up-right position. Modifying the sample provided here https://github.com/googlesamples/mlkit/blob/master/android/vision-quickstart/app/src/main/java/com/google/mlkit/vision/demo/kotlin/VisionProcessorBase.kt
When requesting detection, I am using this if that matters
InputImage.fromByteArray(frame.imageBytes, frame.imageSize.width, frame.imageSize.height, frame.rotationDegrees, frame.imageFormat)
Any insight how to force the TextProcessor to use the image text orientation.
Upvotes: 2
Views: 507
Reputation: 41
Have you considered using Google Vision API? It is able to extract text even in inverted position.
I find it odd that both MLKit and Google Vision are from the same parent company yet have different performance.
Upvotes: 0