Developing an application for face recognition

Asked By 15 points N/A Posted on -
qa-featured

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.

SHARE
Answered By 0 points N/A #184505

Developing an application for face recognition

qa-featured
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");
}
}
 

Related Questions