Type Alias

VNAspectRatio

A type alias for expressing rectangle aspect ratios in Vision.

Declaration

typealias VNAspectRatio = Float

Discussion

The value is a float, but is limited to a range of 0.0 to 1.0, inclusive, with the default of 0.5 indicating a square image. It defines aspect ratio as the shorter dimension over the longer dimension.

See Also

Configuring Rectangle Detection

var minimumAspectRatio: VNAspectRatio

A float specifying the minimum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.

var maximumAspectRatio: VNAspectRatio

A float specifying the maximum aspect ratio of the rectangle to detect, defined as the shorter dimension over the longer dimension.

var quadratureTolerance: VNDegrees

A float specifying the number of degrees a rectangle corner angle can deviate from 90°.

var minimumSize: Float

A float specifying the minimum size of the rectangle to be detected, as a proportion of the smallest dimension.

var minimumConfidence: VNConfidence

A value specifying the minimum acceptable confidence level.

var maximumObservations: Int

An integer specifying the maximum number of rectangles Vision returns.

typealias VNConfidence

A type alias for the confidence value of an observation.

typealias VNDegrees

A typealias for expressing tolerance angles in Vision.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software