So I know that android Ice Cream Sandwich supports face detection. So i recently upgraded my asus transformer to a tablet that has face detection unlock enabled and that works great. Now when i go to write a program using face detection, when i try to find the max number of faces supported I always get 0 and my app always crashes when i try to begin tracking faces. Why is this if my tablet clearly supports face detection? Am i doing something wrong? The code I'm using to check if face detection is supported is posted below:
Camera.Parameters params = mCamera.getParameters();
System.out.println("Max num faces is!!!! :" + params.getMaxNumDetectedFaces());
And the full code I'm using can be found here:
https://docs.google.com/file/d/0B2Nu5U2Cz81qZExGQ25sWVdRd21IOExUUTZsZzFoZw/edit
Face detection is not face recognition. Face detection is done via something like Haar cascade and determines presence of faces in picture. This feature can be contained in android camera application, but must not - API is there but it says that it supports max 0 faces ( means, nothing, go away, we just satisfied inteface)
Face unlock works differently - it does not need to locate face, so it can use some pattern matching techniques to recognize it.
Here is reading pointer for face detection:
http://www.richardnichols.net/2011/01/java-facial-recognition-haar-cascade-with-jjil-guide/
And you can implement it yourself via camera preview feature even if you camera software sdoes not support this
Related
In my application, I use OpenCV for face detection throw ImageReader and jni.
It works ok, but performance of that solution isn't so good as I wanted, also I want to reduce size of my app.
I read some information about face detection in camera 2 API, and I have some questions about it.
1) Why the function below can return STATISTICS_FACE_DETECT_MODE_OFF?
Not all devices support face detection feature? What type of devices doesn't support it and why? Do you know any examples of unsupported devices? In my project, I use only front facing camera, does it matter to me?
characteristics.get(CameraCharacteristics.STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES);
2) What about performance? Is there any performance difference between STATISTICS_FACE_DETECT_MODE_FULL and STATISTICS_FACE_DETECT_MODE_SIMPLE?
Is it possible to use the device's front facing camera with ARCore? I see no references in Google's docs.
I can't find any reference in the docs. It would also make the whole AR process much more complicated. You have to invert the logic for moving the camera etc. And it's much harder to recognize planes as the user is always in the way. Right now, ARCore only recognizes planes so you can't detect feature points, e.g. in the face of a user.
The answer is: Yes.
With a front-facing camera (without a depth sensor) on any supported Android device you can track users' face since ARCore 1.7 SDK release. The API allowing you to work with a front-facing camera was named Augmented Faces. So, from now you can create a high quality 468-point 3D mesh that your Android app can overlay on a user’s face to bring fun animated effects.
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.
I am making an Android application which is based in OpenCV. I have implemented a profile face detector and I use lbpcascade_profileface.xml file. The detector runs correctly but when I put on glasses the detection is worse.
Is it a limitation of file or not? Someone know a solution?
There's also an xml for glasses. You can run it as well to detect glasses, but it won't give you the face bounding box, just the glasses bounding box.
You can of course train a new cascade with images of people wearing glasses, or if you're willing to consider face detectors outside of OpenCV, you can try one of this API's for face detection:
http://blog.mashape.com/post/53379410412/list-of-40-face-detection-recognition-apis
is there any library for detecting an eye in a given rectangle (and the eye's size) , while the camera preview is still showing its content (non stop) ?
i need to find an easy way to acheive this . i've found out that there is an API for face detection , and that on android 4 they also added eyes detection , but only if it found a face , yet i need to find an eye even without any face.
You could always ook at the source code for Android and see how they do Eye detection.
Otherwise check out this question: OpenCV eye tracking on Android
If you want to see an example of opencv on android, click on this open source code.
opencv is best lib for working with face and eye Detection Using opencv you can do:
http://opencv-code.com/tutorials/eye-detection-and-tracking/
Example Code:
http://romanhosek.cz/android-eye-detection-and-tracking-with-opencv/