Search code examples
androidandroid-4.0-ice-cream-sandwichface-detection

is Android 4's face detection API dependant on specific phones?


I'm trying to develop a face recognition system for Android, and I opted to use Android 4 as it has the built in face detection API. I'm using a Samsung nexus s and despite being as up to date as possible and a really new model phone the .getMaxNumDetectedFaces() method returns 0.

Am I doing something wrong or can this phone actually just not detect faces? I thought the face detection would be included in the Android software and not the phone specific software.


Solution

  • There are two different face detection APIs in Android. FaceDetectorListener which depends on getMaxNumDetectedFaces() is hardware dependent so it might not be enabled on phones even if they run the latest version of Android. FaceDetector on the other hand runs in software and is supported since Android 1 so you might try that. Another option is to install OpenCV for Android.

    See also, the answers on this question: Android face detection MaxNumDetectedFaces