[Bug report] MLKit Face recognition returns incorrect coordinates when use fun fromMediaImage() set imageRotate
Describe the bug Isn't the processing wrong when setting 90 ° or 270 ° with fun fromMediaImage ()?
To Reproduce Regarding face recognition, when I sent an image with the face rotated 90 ° to 270 °, it did not recognize the face. Therefore, if you pass the tilt of the device with fromMediaImage () and rotate the received coordinates from the central axis of canvas so that the angle passed by frommediaImage is restored, the fromMediaImage coordinate position will shift. (It is fixed vertically so that the screen does not rotate.)
-
Get device tilt
-
Converted to pass with fromMediaImage () considering the tilt of the device 45 until 135-> 180 ° 135 until 225-> 90 ° 225 until 315-> 0 ° 315 until 360-> 270 °
-
In class FaceGraphic fun draw (), rotate from the central axis of the canvas by the amount rotated by 2, and return the coordinate position.
it is device tilt 270° image

Hi jun
I wonder you might changed mlkit sample app to show previous image. If so, please share the code change so I can take a further look.
Basically current behavior is that we will first rotate the image and return the coordination in the rotated image. It might be a sample app view issue when convert the coordination back to original image.
Close because of inactivity. Feel free to open if you still have issue.