Face Detection - Open CV - android

I used opencv face-detection sample android project to detect faces. Can I focus on detected face area in camera preview and focus that region using Android APIs?
Is there some other way to do it?

get the face area and show it in imageview in android. opencv gives the area of the face detected.

Related

Camera2 face detection without mlkit

we were using camerax with mlkit for face detection. but now we need to move our face detection module to the dynamic feature module and mlkit is currently not supported. it is crashing at run time.
now I'm looking for a solution where I don't want to use firebase mlkit. is it possible to use camera2 API to detect faces and draw face rectangle on preview?.

Face detection, Face Recognition

Hi I am using google face detection API, it detects the face and draws a rectangle over the face, I want to crop the face part only and save it as image.
Is there any API available to crop the detected face.
You have a lot of libraries here:
https://android-arsenal.com/tag/45

Face focus using Front camera

I want to develop an app where the face is detected using the front camera. However the image is not taken. The front camera should only detect the face and check whether it is within the correct dimensions. These dimensions will then help me to detect the distance between the face and front camera. I also want to check whether the phone is held at a distance of 20 inches or about 1 feet or not. If this is possible.. please help me with it. The app is basically for testing vision. I want to add the above feature in it.
You can achieve this without Unity or OpenCV or any other library. Please refer this and this links. They detect faces with help of android.hardware.Camera.Face class. Alo you will need to implement the listener android.hardware.Camera.FaceDetectionListener to grab the event of face detection. On being detected, you will get the face[] that will give you all the information related to the face that was detected. Hope this in what you wanted.

android - eye detection even without face detection during camera preview

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/

Android Face detection support

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

Categories

Resources