Tuesday, June 16, 2015

Android Face detection using FaceDetector


FaceDetector is a class provided by the android sdk.
It identifies the faces of people in a Bitmap graphic object.
For reference view Android Devloper.

Here I will be showing how to use this using the below code snippet.

/* img_btmp is the bitmap with or without faces. Note the width of the img_btmp should be even*/
FaceDetector detector = new FaceDetector(img_btmp.getWidth(), img_btmp.getHeight(), 10);

Face[] faces =  new Face[10];

// faces is the array where the detected faces will be stores
int face_detected_count=detector.findFaces(img_btmp, faces);

This doesn't seems to work well but still it can be used .It still needs further more development


No comments:

Post a Comment

.htaccess display error pages on http errors

In your htaccess file add the below lines and save to show error pages on Http errors (404, 403 etc) ErrorDocument 403 /errors/404.html ...