Function

VNNormalizedFaceBoundingBoxPointForLandmarkPoint

Returns the coordinates of a given face landmark point, in bounding box coordinates.

Declaration

CGPoint VNNormalizedFaceBoundingBoxPointForLandmarkPoint(vector_float2 faceLandmarkPoint, CGRect faceBoundingBox, size_t imageWidth, size_t imageHeight);

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

imageWidth

The width of the image from which the VNFaceObservation instance was generated.

imageHeight

The height of the image from which the VNFaceObservation instance was generated.

Return Value

The input point projected into normalized bounding box coordinates.

See Also

Coordinate Conversion

VNImagePointForNormalizedPoint

Projects a point from normalized coordinate space into image coordinates.

VNImageRectForNormalizedRect

Projects a rectangle from normalized coordinate space into image coordinates.

VNNormalizedRectForImageRect

Normalizes a rectangle from image coordinates.

VNNormalizedIdentityRect

The normalized identity rectangle with origin (0,0) and unit length and width.

VNNormalizedRectIsIdentityRect

Returns YES if the rectangle has origin (0,0) and unit length and width.

VNImagePointForFaceLandmarkPoint

Returns the image coordinates of a given face landmark point.