0

I am a newbie to AR and Mobile Face detetcion API. Want to explore these fields.

I have an idea which will impose an animating sticker on left cheek or right cheek once face detection is done through google mobile vision API- Face detection

There are few thing i need to know from the community:-

  1. Is it possible using mobile face vision api?. If possible then, can I assume that AR can be used to impose a animating sticker image on face/cheek by processing the frame/bitmap of the face that we get from face detection API?

  2. I know there is openCV too, which is good for image processing, but would like to know about mobile vision API (face detection) in achieving this idea

  3. Moreover, any AR SDKs, libs, tool kits with which super imposing image on face can be done ?

  4. The Road Map for Google mobile face API ?

Help Appreciated!

user755499
  • 2,241
  • 4
  • 25
  • 34
  • 1
    Is this you are looking for https://hackernoon.com/machine-learning-for-android-developers-with-the-mobile-vision-api-part-1-face-detection-e7e24a3e472f#.26wi0s4u5 ? – Jitesh Oct 14 '16 at 12:40
  • @Jitesh Thanks for the reply. Yes some what similar to it. Also, can we detect teeth ? I did not found any landmark represent number for teeth similar to cheek e.g.7 – user755499 Oct 17 '16 at 08:37

1 Answers1

1

Yes, this is possible through the Mobile Vision API.

All you have to do is to detect the landmarks on the faces in your image through the Face Detection API and superimpose your bitmap on the specific landmarks for both cheeks.

The left cheek is represented by 1 while the right cheek is represented by 7.

for (Landmark landmark : face.getLandmarks()) {

        int cx = (int) (landmark.getPosition().x);
        int cy = (int) (landmark.getPosition().y);

        if (landmark.getType() == 1 || landmark.getType() == 7) {
            canvas.drawBitmap(stickerBitmap, cx, cy, null);
        }
    }

You can read more about it in my article here.

moyheen
  • 702
  • 7
  • 10
  • Great. Thanks for the reply. Also, can we detect teeth ? I did not found any landmark represent number for teeth similar to cheek e.g.7 ? – user755499 Oct 17 '16 at 08:35
  • You can't detect teeth for now, but you can detect if a face is smiling or not and I think you can calculate the position of the teeth based on that. – moyheen Oct 17 '16 at 09:09