I'm trying to get face detection working in live preview mode using the hardware-based Camera.faceDetectionListener new in ICS. I have tried with Nexus 4, Nexus 7, and a Samsung Galaxy 10.1 tablet and ALL of these devices return 0 for the front camera when I call getMaxNumDetectedFaces. All of the devices support face unlock, though, so I don't understand why none of them seem to support face detection. Has anyone got this working with one of these devices?
Supported starting with API 14 (ICS), getMaxNumDetectedFaces returns the max length of the array that contains the results of camera face detection after it is started with startFaceDetection. If the value returned is 0, it indicates that the device does not support this method of face detection. In this case, face detection must be implemented by some other means (e.g., using FaceDetector available since API 1).
I checked the value returned by getMaxNumDetectedFaces for both front and back cameras in a few devices:
In summary, OEM support for camera face detection is hit and miss.