2

I am using ML Kit to do face detection on live frames from camera. When i tried to Log the Rect() from the Face().boundingBox it returns negative coordinates if the face is in the right side of the picture.

Face detected on left side will return something like Rect(319, 83 - 558, 266)
Face detected on right side will return something like Rect(-73, 81 - 175, 241)

Rect is drawn from top-left to bottom-right, right? Then why are Rect().left and Rect().right become lower in value?

Selmeny
  • 220
  • 3
  • 11
  • Could you provide an example image and your facedetector options? so that we could take a close look. – Shiyu Aug 12 '20 at 17:28
  • Oh, hello. I have fixed this problem, i need to transform the image according to my display screen size. – Selmeny Aug 27 '20 at 00:59
  • @Shiyu Oh, anyway, is it possible to use USB camera with cameraX API? – Selmeny Aug 27 '20 at 01:00
  • @PaulBrugman can you explain how did you resolve this issue? I've faced it too. – Navid Eivazzadeh Sep 15 '20 at 22:48
  • @NavidEivazzadeh Check this one: https://github.com/googlesamples/mlkit/blob/79903e6a756d3d7473b6aefc5b34829b662e57a3/android/vision-quickstart/app/src/main/java/com/google/mlkit/vision/demo/GraphicOverlay.java – Selmeny Sep 23 '20 at 04:01

0 Answers0