Contents

VNImagePointForFaceLandmarkPoint(_:_:_:_:)

Returns the image coordinates of a specified face landmark point.

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 Vnfacelandmarkregion2d instance.

  • faceBoundingBox:

    The normalized bounding box rect around the face, as obtained from a Vnfaceobservation.

  • imageWidth:

    The width of the image from which the Vnfaceobservation was generated.

  • imageHeight:

    The height of the image from which the Vnfaceobservation was generated.

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.

See Also

Coordinate conversion