2

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.

Alma
  • 75
  • 1
  • 6

1 Answers1

0

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.

enter image description here

Lekster
  • 41
  • 1
  • 3
  • One of them might be preforming worse at the task you assigned them here, however there can be many various sets of application requirements and use cases befitting one of the APIs or the other. – JustSightseeing Aug 10 '22 at 17:54