Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Region Features » RegionBoundingRectangle

RegionBoundingRectangle


Computes the smallest rectangle containing a region.

Name Type Description
inRegion Region Input array of points
inRectangleOrientation Real* Expected orientation of the resulting rectangle
inBoundingRectangleFeature BoundingRectangleFeature Determines what kind of bounding rectangle will be computed
outBoundingRectangle Rectangle2D The smallest bounding rectangle of the input region
outCenter Point2D Center of the bounding rectangle
outLongSide Real Length of the bounding rectangle long side
outShortSide Real Length of the bounding rectangle short side

Hints

  • If the input region is not guaranteed to be non-empty, precede this filter with SkipEmptyRegion.

Examples

Description of usage of this filter can be found in examples and tutorial: Badge Measurement, Button Presence, Waffles.

RegionBoundingRectangle performed on a sample region.

Remarks

Orientation of the resulting rectangle will be in range of 0..90 degrees. Consider using NormalizeRectangleOrientation if another orientation is more appropriate.

Errors

This filter can throw an exception to report error. Read how to deal with errors here: Error Handling

Error type Description
DomainError Empty region on input in RegionBoundingRectangle.

Complexity Level

This filter is available on Basic Complexity Level.

See Also