Contents

VNImageRectForNormalizedRectUsingRegionOfInterest(_:_:_:_:)

Projects a rectangle from a region of interest within the normalized coordinates into image coordinates.

Declaration

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

Parameters

  • normalizedRect:

    The rectangle in normalized coordinates.

  • imageWidth:

    The width of the image.

  • imageHeight:

    The height of the image.

  • roi:

    The region of interest within the normalized-coordinate space.

Return Value

A rectangle in the image-coordinate space.

See Also

Coordinate conversion