Can AVFoundation face recognition determine the position of the eyes and mouth?

When using CoreImage face detection, I get a CIFaceFeature object that has the properties of eyes and mouth. When using AVFoundation with AVMetadataObjectTypeFace as the metadata of ObjectTypes, I get an AVMetadataFaceObject with rotation and tilt properties.

Is there a way to get eyes and mouth position when using AVFoundation?

thanks

+4
source share
1 answer

The position of the mouth and eyes is not returned by the AVFoundation face function. However, the position of the mouths and eyes relative to the bounding box does not differ so much. For example, I found that the eyes are almost always located on:

  • (0.3 * faceWidth, 0.3 * faceHeight)
  • (0.7 * faceWidth, 0.3 * faceHeight)

I am sure the same is true for the mouth.

+3
source

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


All Articles