Instance Method

boundingBoxForRange:error:

Calculates the bounding box around the characters in the range of the string.

Declaration

- (VNRectangleObservation *)boundingBoxForRange:(NSRange)range error:(NSError * _Nullable *)error;

Parameters

range

The range of the characters in the text string around which to draw a bounding box.

error

An error that contains information about failed computation of the bounding box, or nil if no error occurred.

Discussion

The bounding boxes are not guaranteed to be an exact fit around the characters. Use them to show in user interfaces or general guidance, but refrain from using their contents for image processing.