So basically, i have this code,
if(mCamera.getParameters().getMaxNumDetectedFaces()==0)
{
System.out.println("Face detection not avaliable");
}
else
{
System.out.println("Max faces: " + Integer.toString(mCamera.getParameters().getMaxNumDetectedFaces()));
}
mCamera.setFaceDetectionListener(new FaceDetectionListener() {
@Override
public void onFaceDetection(Face[] faces, Camera camera) {
// TODO Auto-generated method stub
System.out.println("Face detection callback called." + Integer.toString(faces.length));
}
});
After calling mCamera.startFaceDetection();
, the callback is called, everything works as normal. However, if I change cameras, the same code results in the callback never being called. The getMaxNumDetectedFaces
, returns 35 for both cameras, so I assume its supported on the front camera. I can change the camera back and forth, calling this code each time, and it will work for the back camera but not the front one.
Is there anything else I might be doing wrong?
Software Update In many instances, if your operating software is not updated to the latest version, it might cause issues with your Face ID. Usually, new software updates help fix bugs, system errors, and minor problems in your current operating software and could fix your issue instantly.
Make sure that your face isn't blocked By default, Face ID doesn't work if anything is covering your mouth and nose. If you're wearing a face mask and have already set up Face ID with a mask,* make sure that your eyes aren't blocked. You might need to hold your iPhone higher if you're wearing a face mask.
Note: Instagram doesn't use facial recognition, and we don't use it in video selfies. We use video selfies to ensure you are a real person and may confirm with human review that you are authorized to access your account.
One of the biggest reasons that Face ID may have stopped working on your iPhone 12/ iPhone 12 Pro is that users unknowingly cover the Face ID sensors. It might be the screen protector you are using, a screen replacement, or the sensors might be dirty and covered with dust.
Is it possible that the quality of the camera that's not working (the front one, right?) Isn't accurate enough for the face detection to work? The camera's image may be too noisy for the face detector to work. There are lot of other variables that could be hindering this.
Also doing a search for front camera, it looks like the front camera's points may be mirrored. This is described in: http://developer.android.com/reference/android/hardware/Camera.Face.html
I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With