Function

VNImagePointForNormalizedPoint(_:_:_:)

Projects a point from normalized coordinate space into image coordinates.

Declaration

func VNImagePointForNormalizedPoint(_ normalizedPoint: CGPoint, _ imageWidth: Int, _ imageHeight: Int) -> CGPoint

Parameters

normalizedPoint

The input point, in normalized coordinate space.

imageWidth

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

imageHeight

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

Return Value

The input point projected into image coordinates.

Discussion

The resulting point in image coordinate space may have nonintegral (floating-point) coordinates.

See Also

Coordinate Conversion

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

Projects a rectangle 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.