Android Face Detection using OpenCV / JavaCV

I want to know how to implement Android Face Detection using OpenCV / JavaCV. Does anyone have an idea about this or have code, comment on this or put the code. I want to get faces from the phone gallery and find them.

+6
source share
2 answers

For face detection, you can use the built-in FaceDetector in the Android SDK, it returns facial positions and angles in BMP. But it is not very fast.

You can also use javaCV face detection, but before you start, I recommend that you see this article to see the benefits and shake of some API that you can use, as well as compare performance

some

For FaceDetector you can see these links

Here 's a real-time search using FaceDetector and OpenGL (draws rectangles) that works in Android 2.2

You can also use OpenCV in Android

Better try this on Linux (I tried this on Windows but couldn't).

Finally JavaCV (highly recommended)

There is an example of a real-time face detection code using a camera. See "Javacv-src - *. Zip" on the download page.

+6
source

The temporary data in the screenshot from K_Anas is terribly slow ... my application on my HTC Desire S with the OpenCV library ( here ) makes 4+ fps ...

My demo app on the Play Store (eurgh) is here . In the menu, the first item will lead you to my web page for the application with fragments of source code. 1) install OpenCV, 2) get ready-made samples, 3) edit "OpenCVSamples Tutorial 2" and drop the code fragments into the frame processing cycle.

I do not pretend to be a loan for the application, it is just a slightly expanded and adjusted version of the sample that comes with the OpenCV library.

0
source

Source: https://habr.com/ru/post/915357/


All Articles