Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Face Detection in Android?

I am currently working on an experimental camera app. I'm looking into implementing face detection at the moment and am currently weighing up my options.

I have considered the OpenCV port available for Android and using their face detection functions, but from demos I have seen of previous implementations, the camera seems to lag a lot.

Considering the camera on the HTC Desire has face detection support, I know it must be possible to get at least a semi-decent face detection system in place. I was just wondering if anyone had an opinion on how I could get the best results... Using an available library? Implementing a particular algorithm myself?

like image 305
James Avatar asked Nov 08 '10 16:11

James


People also ask

What is face detection on Android?

Android Face detection API tracks face in photos, videos using some landmarks like eyes, nose, ears, cheeks, and mouth. Rather than detecting the individual features, the API detects the face at once and then if defined, detects the landmarks and classifications. Besides, the API can detect faces at various angles too.

What is face detection?

Face detection -- also called facial detection -- is an artificial intelligence (AI) based computer technology used to find and identify human faces in digital images.

Can Google detect faces?

Face Detection detects multiple faces within an image along with the associated key facial attributes such as emotional state or wearing headwear . Specific individual Facial Recognition is not supported. Note: The Vision API now supports offline asynchronous batch image annotation for all features.


2 Answers

  1. Try FaceDetector in the Android SDK. It returns face positions and angles in BMPs. But it's not very fast.

    Here's a realtime face detection sample using FaceDetector and OpenGL (draws rectangles) which works in Android 2.2.

  2. OpenCV in Android

    You'd better try this on Linux (I've tried it on Windows, but failed).

  3. JavaCV (strongly recommended)

    There is a sample code of realtime face detection using the camera. See "javacv-src-*.zip" on the download page.

like image 171
Alpha Avatar answered Oct 25 '22 15:10

Alpha


The Android SDK comes with a FaceDetector which can be used to find faces in a given Bitmap.

I haven't used it myself, but developers of facial distortion apps say it is not very accurate compared to OpenCV. It may fit your needs though, it's probably what the HTC Desire's camera app uses.

like image 29
Gareth Davidson Avatar answered Oct 25 '22 15:10

Gareth Davidson