Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Constructions » CreateCoordinateSystemFromTwoPoints
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Creates a coordinate system with two points on its axes.
Applications: Most often used to define an object alignment from results of two 1D Edge Detection scans, each of which locates one side of a rectangular object.
Syntax
C++
C#
void fil::CreateCoordinateSystemFromTwoPoints ( const fil::Point2D& inPoint1, const fil::Point2D& inPoint2, float inAngle, float inScale, float inScaleDivisor, fil::CoordinateSystem2D& outCoordinateSystem )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inPoint1 | const Point2D& | |||
![]() |
inPoint2 | const Point2D& | |||
![]() |
inAngle | float | |||
![]() |
inScale | float | 0.001 - ![]() |
1.0f | |
![]() |
inScaleDivisor | float | 0.001 - ![]() |
1.0f | |
![]() |
outCoordinateSystem | CoordinateSystem2D& |
Hints
- PassinPoint1 and inPoint2 to computed points lying on (respectively) the X and the Y axes of a new coordinate system.
- Optionally set inAngle to define the rotation.
- Optionally set inScale and inScaleDivisor to obtain a custom scale.
Remarks
Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.