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?
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.
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.