0

Is Google Vision API capable of detecting faces and landmarks every frame of the camera preview when the preview is showing?

If yes, could you please point me to a code snippet on how to do this? I already have the camera2 interface set up. Thanks!

Bardia B
  • 33
  • 6
  • Not familiar with Google Vision API, but that is how OPenCv does it - you can see example code here: https://github.com/opencv/opencv/blob/master/samples/android/face-detection/src/org/opencv/samples/facedetect/FdActivity.java – Mick Feb 08 '17 at 10:41

1 Answers1

0

It depends. The API detects faces and landmarks, but the amount of time required for each frame depends upon things like resolution and face size as well as hardware speed. When tracking faces in a real time preview, the API may need to skip some frames in order to keep up.

pm0733464
  • 2,862
  • 14
  • 16
  • Thanks for the answer. Is there code anywhere that does real time landmark tracking? – Bardia B Feb 16 '17 at 01:14
  • Yeah, see the Googly Eyes example on GitHub which tracks landmarks and overlays animated eyes over the user's face. https://github.com/googlesamples/android-vision/blob/master/visionSamples/googly-eyes/app/src/main/java/com/google/android/gms/samples/vision/face/googlyeyes/GooglyEyesActivity.java – pm0733464 Feb 16 '17 at 15:06