Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Constructions » CreateCoordinateSystemFromRectangle
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Creates a coordinate system from a rectangle.
Applications: Most often used to define an object alignment from a filter like RegionBoundingRectangle.
Syntax
C++
C#
void fil::CreateCoordinateSystemFromRectangle ( const fil::Rectangle2D& inRectangle, const fil::Anchor2D::Type inPointAnchor, float inRelativeAngle, float inScale, float inScaleDivisor, fil::CoordinateSystem2D& outCoordinateSystem )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inRectangle | const Rectangle2D& | |||
![]() |
inPointAnchor | const Anchor2D::Type | TopLeft | ||
![]() |
inRelativeAngle | float | |||
![]() |
inScale | float | 0.001 - ![]() |
1.0f | |
![]() |
inScaleDivisor | float | 0.001 - ![]() |
1.0f | |
![]() |
outCoordinateSystem | CoordinateSystem2D& |
Hints
- Pass inRectangle to a computed rectangle representing a new coordinate system.
- Optionally set inScale and inScaleDivisor to obtain a custom scale.
- Optionally set inRelativeAngle to modify the rotation.
Examples

A local coordinate system created from a rectangle.
Remarks
Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.