Search code examples
androidapiimageviewdetection

Use android face detection after loading image from gallery


Heyy, i'm trying to make an android app where the user selects an image from the gallery and after that the image appears in an ImageView and a box appears over the faces detected.

I already have the code for loading an image from the gallery and put it into the ImageView, the only problem is that i dont know how to detect the faces from the loaded image.

Any examples?? Any hlep would be grateful.


Solution

  • There are many ways of recognizing faces in Android. You'll need to implement something like OpenCV library. If you look at it you'll find a simple example!

    Also, you can look at JJIL Library

    This question has been answered here already.

    EDIT: It seems that there are built in classes like FaceDetector and you can see an example on how to use them here