Returns the image coordinates of a given face landmark point.
SDKs
- iOS 11.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 11.0+
Framework
- Vision
Declaration
func VNImagePointForFaceLandmarkPoint(_ faceLandmarkPoint: vector _float2, _ faceBoundingBox: CGRect, _ imageWidth: Int, _ imageHeight: Int) -> CGPoint
Parameters
faceLandmarkPoint
The location of the face landmark, as returned from a
VNFace
instance.Landmark Region2D faceBoundingBox
The normalized bounding box rect around the face, as obtained from a
VNFace
.Observation imageWidth
The width of the image from which the
VNFace
was generated.Observation imageHeight
The height of the image from which the
VNFace
was generated.Observation
Return Value
The input face landmark point, projected into image coordinates.
Discussion
The resulting point in image coordinate space may have nonintegral (floating-point) coordinates.