FaceDetector icon indicating copy to clipboard operation
FaceDetector copied to clipboard

The quantity is wrong

Open g19980115 opened this issue 8 years ago • 2 comments
trafficstars

Only one face in screen but the faces.size() is two. When two faces in screen the faces.size() is four. And the image can't recognize a

g19980115 avatar Aug 22 '17 04:08 g19980115

When the camera is front, the Rect is Left-Right reversed,My phone is OnePlus 5、HuaWei Honor 6. I've dealt with this for the time being:

if (fotoapparatSwitcher.getCurrentFotoapparat() == frontFotoapparat) {
       for (int i = 0; i < faces.size(); i++) {
             Rectangle face = faces.get(i);
             float w = face.getWidth();
             face = new Rectangle(1 - face.getX() - w, face.getY(), w, face.getHeight());
             faces.remove(i);
             faces.add(i, face);
         }
  }
 rectanglesView.setRectangles(faces);

g19980115 avatar Aug 22 '17 04:08 g19980115

Thanks for reporting. That is indeed a bug in our face detection library. Should be possible to fix.

As for mirrored image issue - I opened another ticket #6

dmitry-zaitsev avatar Aug 22 '17 20:08 dmitry-zaitsev