user446366
user446366

Reputation: 1011

How to detect Face and Smile & Face matching in Android?

I want to know following things is possible on Android or not.

  1. Pick a photo and detects faces and show rectangle, and detect smile of each face and show smile percentage of each.
  2. Pick a photo from photo library and show faces. if you click faces, it search all photo library and show list of possible same person.

Upvotes: 2

Views: 7538

Answers (3)

ashishdhiman2007
ashishdhiman2007

Reputation: 817

There is a google example for detecting smile. Please check:

FaceTracker

It is Android Vision API and requires Android Play Services SDK level 26 or greater.

Upvotes: 0

Valentin Rocher
Valentin Rocher

Reputation: 11669

Let's take thing in order :

  • Detecting the face : Android seems to be able to do that, through the FaceDetector class. Read the doc to know how to do that.
  • Detecting smiles and/or similar people : such a function is not integrated in FaceDetector. However, this is a matter of face recognition, and many work has been done in research on this subject. A Google research should point you to the theoric papers relative to that, but I'm not sure they will all have an implementation.

EDIT : the main image processing library used by researchers for this kind of subjects is OpenCV. You can find a Java wrapper for it here.

Upvotes: 6

TheCottonSilk
TheCottonSilk

Reputation: 8822

Extending Valentin Rocher's answer: I think in a limited way you can achieve it by doing following:

  1. Get array of FaceDetector.Face objects in the photo using findFaces()
  2. Iterate through the array of FaceDetector.Face objects, you can use following APIs and compare (i.e. fix one face as a reference and compare it with other in the array to find similarity/closeness)

    confidence()
    eyesDistance()
    getMidPoint()
    pose()

Upvotes: 1

Related Questions