Contents

VNNormalizedPointForImagePointUsingRegionOfInterest(_:_:_:_:)

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

Declaration

func VNNormalizedPointForImagePointUsingRegionOfInterest(_ imagePoint: CGPoint, _ imageWidth: Int, _ imageHeight: Int, _ roi: CGRect) -> CGPoint

Parameters

  • imagePoint:

    The input point in image coordinates.

  • imageWidth:

    The width of the image.

  • imageHeight:

    The height of the image.

  • roi:

    The region of interest within the image-coordinate space.

Return Value

A point in the normalized-coordinate space.

See Also

Coordinate conversion