Function

VNImageRectForNormalizedRect(_:_:_:)

Projects a rectangle from normalized coordinate space into image coordinates.

Declaration

func VNImageRectForNormalizedRect(_ normalizedRect: CGRect, _ imageWidth: Int, _ imageHeight: Int) -> CGRect

Parameters

normalizedRect

The input rect, in normalized coordinate space.

imageWidth

The width of the image into whose coordinate space you're projecting the input rect.

imageHeight

The height of the image into whose coordinate space you're projecting the input rect.

Return Value

The input rect projected into image (pixel) coordinates.

See Also

Coordinate Conversion

func VNImagePointForNormalizedPoint(CGPoint, Int, Int) -> CGPoint

Projects a point from normalized coordinate space into image coordinates.

func VNNormalizedRectForImageRect(CGRect, Int, Int) -> CGRect

Normalizes a rectangle from image coordinates.

let VNNormalizedIdentityRect: CGRect

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

func VNNormalizedRectIsIdentityRect(CGRect) -> Bool

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

func VNImagePointForFaceLandmarkPoint(vector_float2, CGRect, Int, Int) -> CGPoint

Returns the image coordinates of a given face landmark point.

func VNNormalizedFaceBoundingBoxPointForLandmarkPoint(vector_float2, CGRect, Int, Int) -> CGPoint

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