What is Best? JavaCV(OpenCV) or FaceDetector in android? - android

I'm going to implement face recognition in my android application. Which one is best to use, JavaCV or FaceDetector? Please suggest one to me.

FaceDetector may be using a C++ implementation which would be faster. I would suggest using FaceDetector for that reason as well as limiting your application size. Including the JavaCV Jar will increase application size which will make people less likely to download it and more likely to uninstall it to free up space on the phone.
If FaceDetector doesn't work as well as you want it to, use JavaCV. FaceDetector uses eyes only to detect faces so it will not detect profiles, or faces that do not have both eyes visible.
FaceDetector Note: The width of the image must be even.

Related

How many devices in percent doesn't support face detection feature?

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?

Android FaceDetertor vs FaceDetectionListener

What is the difference of this two classes? I want to implement an Application which will track the face in real time preview and then analyse each frame. Can I use the FaceDetector class for this purpose? Or is it just for the photos that are stored in the gallery?
My Devices is using the version 4.4.2 . But it does not have any support for the FaceDetectionListener class. Maybe it has support for the FaceDetector so that I can implement my application with it.
Any Ideas?
FaceDetector class is very slow. In my experience detecting camera frame have been taking hundreds of ms.
If your device not support FaceDetectionListener you can try to use OpenCV library.

how can i set the camera function that anti-shake(image Stabilizer) at android

I've made a Camera App.
I want to add the functionality of anti-shake.
But I could not find the setting for anti-shake(image Stabilizer).
Plz Help me!!
Usually Image Stabilizer is a built-in camera feature, while OIS (Optical-Image-Stabilization) is a built-in hardware feature; by now really few devices support them.
If device hasn't a built-in feature, i think you cannot do anything.
Android doesn't provide a direct API to manage image stabilization, but you may try:
if android.hardware.Camera.getParameters().getSupportedSceneModes(); contains steadyphoto keyword (see here), your device supports a kind of stabilization (usually it shots when accelerometer data indicates a "stable" situation)
check android.hardware.Camera.getParameters().flatten(); for a "OIS" or "image-stabilizer" keyword/values or similar to use in Parameters.set(key, value);. For the Samsung Galaxy Camera you should use parameters.set("image-stabilizer", "ois");//can be "ois" or "off"
if you are really boring you may try reading the accelerometer data and decide to shot when the device looks steady.
Good luck.
If you want to develop software image stabilizer, OpenCV is helpful library for you. Following is the one of the way to stabilize the image using Feature.
At first, you should extract feature from image using feature extractor like SIFT, SURF algorithm. In my case, FAST+ORB algorithm is best. If you want more information, See this paper
After you get the features in images, you should find matching features with images.there are several matcher but Bruteforce matcher is not bad. If Bruteforce is slow in your system, you should use a algorithm like KD-Tree.
Last, you should get geometric transformation matrix which is minimize error of transformed points. You can use RANSAC algorithm in this process.
You can develop all this process using OpenCV and I already developed it in mobile devices. See this repository

profile face, bad detection with glasses

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

Android/iOS OpenCV Eye Dilation Detection

Looking for opinions on if OpenCV could be or has been used to detect eye dilation on Android or iOS. I haven't found much other than eye tracking and blink detection with the app EyePhone that uses OpenCV. Under perfect conditions, I'm sure it's possible, I'm more curious of seeing a proof of concept, that it can and has been done.
Thank you for your opinion.
rd42
try template matching, it gives me best results for now. You can see my sample app:
Example app or use haar detector as its at the start of video, but haar detector is slowly and drop fps.

Categories

Resources