Hi! I have a task to develop an application with face recognition. Application should be checking size, form and color of the face and pick a haircut for the face. Mostly the problem is that the application should first find face in uploaded picture. I don't know even where to start. I couldn't find that much information in internet about this subject. Please advise.
Developing an application for face recognition
HELLO
Â
I will explain that how recognize the face,
First of all, You need to use the API to identify a person that may be added to your face recognition album.
You will identify a person in order to way you have to specify the FACE_IDENTIFICATION Enum in getFaceData. You need to use the face engine to process the image for all face data.
You have to use FaceData [] faceArray = [ Â ]
May be the value is 0 and 1.
Â
Â
Â
Here, There is following code for the face recognition:-
public void identifyPerson(){
if(faceObj!=null)
{
boolean result = faceObj.setBitmap(storedBitmap);
if(result)
{
FaceData [] faceArray = faceObj.getFaceData(EnumSet.of(FP_
                       DATA.FACE_IDENTIFICATION));
if(faceArray!=null) // If the faceArray is NULL that means no faces wereÂ
                     detected in the frame.
{
int personId_face1 = faceArray[0].getPersonId();
int recog_confidence_face1 = faceArray[0].getRecognitionConfidence();
Â
int personId_face2 = faceArray[1].getPersonId();
int recog_confidence_face2 = faceArray[1].getRecognitionConfidence();
Â
// Use these values in your android application where ever necessary.
}
else
{
Log.e(TAG, "No Face Detected");
}
}
else
{
Log.e(TAG, "setBitmap failed");
}
}
else
{
Log.e(TAG, "Facial Recognition object is NULL");
}
}
Â