Contents

VNNormalizedRectForImageRect(_:_:_:)

Projects a rectangle from image coordinates into normalized coordinates.

Declaration

func VNNormalizedRectForImageRect(_ imageRect: CGRect, _ imageWidth: Int, _ imageHeight: Int) -> CGRect

Parameters

  • imageRect:

    The input rectangle in image coordinate space.

  • imageWidth:

    The width of the image in whose coordinates the input rect resides.

  • imageHeight:

    The height of the image in whose coordinates the input rect resides.

Return Value

The input rectangle projected into normalized coordinates.

See Also

Coordinate conversion