1

I'm working on an camera app which uses Android.media.FaceDetectorto detect faces. I have tested the function on four smartphones Which's OS varies form Android 4.2 to 4.4. and on three phones,the function works well,which means that it can make preview through camera and detect faces normally, but in the last Android4.4 phone, it can preview normally but no faces detects.What's more,if use the preloaded camera app in this phone, faces can be detected.I'm sure that the quality and format of pictures is correct for face detection and I have checked as Android face detection MaxNumDetectedFaces,and the value in that last phone is 5. Someone knows the other possible reasons? or is there some advice for me to check the reason in android studio project using that phone? Thanks for your time and help.

Moonsin
  • 11
  • 1
  • 1
    You might try the newer Android face API which was released last year: https://developers.google.com/vision/ – pm0733464 Apr 01 '16 at 14:27
  • Thanks for your answer, and I'm trying learning the new face API as you recommended. Now someone tell me one possible reason for my problem is that the manufacturer of last phone may remove Android.media.FaceDetector from the original android operating system. Do you agree this opinion? – Moonsin Apr 05 '16 at 07:29
  • I don't think that manufacturers can remove android.media.FaceDetector. – pm0733464 Apr 05 '16 at 14:14
  • @pm0733464,well,I tried to add play-google-services.jar to the libs folder in the Android studio project since that phone don't supported google play services,and it reported error " Native face detector not yet available". – Moonsin Apr 07 '16 at 02:03
  • @pm0733464,Form the two question [(1)](http://stackoverflow.com/questions/32062803/facedetectorhandle-native-face-detector-not-yet-available-reverting-to-no-op-d) [(2)](http://stackoverflow.com/questions/30000786/replacing-com-google-android-gmsplay-services-with-google-play-services-jar) I know that the face detection library is not downloaded to my device, I want to know whether I must download the lib to native device through google play services? and whether the face detection library is open for developers? Thanks very much for your help! – Moonsin Apr 07 '16 at 02:04
  • The face detection library is open for developers. The native library is downloaded automatically. However, if you don't have enough storage space available on the device, it won't download. See this example of how to check this and present an appropriate warning to the user: https://github.com/googlesamples/android-vision/blob/master/visionSamples/multi-tracker/app/src/main/java/com/google/android/gms/samples/vision/face/multitracker/MultiTrackerActivity.java#L158 – pm0733464 Apr 11 '16 at 13:52

0 Answers0