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?
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.
Face detection -- also called facial detection -- is an artificial intelligence (AI) based computer technology used to find and identify human faces in digital images.
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.
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.
OpenCV in Android
You'd better try this on Linux (I've tried it on Windows, but failed).
JavaCV (strongly recommended)
There is a sample code of realtime face detection using the camera. See "javacv-src-*.zip" on the download page.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With