Back to Adaptive Vision Library website
You are here: Start » Function Reference » Path Features » PathBoundingRectangle
PathBoundingRectangle
Computes the smallest rectangle containing a path.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::PathBoundingRectangle ( const avl::Path& inPath, avl::BoundingRectangleFeature::Type inBoundingRectangleFeature, float inReferenceAngle, avl::RectangleOrientation::Type inRectangleOrientation, avl::Rectangle2D& outBoundingRectangle, atl::Optional<avl::Point2D&> outCenter = atl::NIL, atl::Optional<float&> outLongSide = atl::NIL, atl::Optional<float&> outShortSide = atl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inPath | const Path& | Input path | ||
inBoundingRectangleFeature | BoundingRectangleFeature::Type | MinimalArea | Determines what kind of bounding rectangle will be computed | |
inReferenceAngle | float | 0.0f | The middle angle of the valid range of the output rectangle's angle | |
inRectangleOrientation | RectangleOrientation::Type | Horizontal | Orientation of the output rectangle | |
outBoundingRectangle | Rectangle2D& | The smallest bounding rectangle of the input path | ||
outCenter | Optional<Point2D&> | NIL | Center of the bounding rectangle | |
outLongSide | Optional<float&> | NIL | Length of the bounding rectangle long side | |
outShortSide | Optional<float&> | NIL | Length of the bounding rectangle short side |
Description
The filter computes a rectangle with the smallest possible selected feature that contains all points of the given path. The angle of the resulting rectangle is then normalized as in the NormalizeRectangleOrientation filter.
Errors
Error type | Description |
---|---|
DomainError | Empty path on input in PathBoundingRectangle. |
See Also
- NormalizeRectangleOrientation – Changes orientation of the given rectangle according to parameters.