Back to Adaptive Vision Library websiteYou are here:
Start »
Function Reference »
Geometry 2D Fitting »
AdjustPointArrays
Aligns a point array to match best the input point array.
Syntax
C++
C#
void avl::AdjustPointArrays
(
const atl::Array<avl::Point2D>& inPoints,
const atl::Array<avl::Point2D>& inReferencePoints,
const bool inAllowRotation,
const bool inAllowScale,
const int inMaxIterationCount,
const float inMatchFraction,
const int inInitialTransformCount,
atl::Conditional<avl::CoordinateSystem2D>& outAlignment,
atl::Conditional<atl::Array<avl::Point2D> >& outAlignedPoints
)
void AdjustPointArrays
(
Point2D[] inPoints,
Point2D[] inReferencePoints,
bool inAllowRotation,
bool inAllowScale,
int inMaxIterationCount,
float inMatchFraction,
int inInitialTransformCount,
out CoordinateSystem2D? outAlignment,
out Point2D[] outAlignedPoints
)
Parameters
|
Name |
Type |
Range |
Default |
Description |
|
inPoints |
const Array<Point2D>& |
|
|
Points to be aligned |
|
inReferencePoints |
const Array<Point2D>& |
|
|
Points to align to |
|
inAllowRotation |
const bool |
|
True |
Flag indicating whether rotation is allowed as a part of output alignment |
|
inAllowScale |
const bool |
|
False |
Flag indicating whether scale is allowed as a part of output alignment |
|
inMaxIterationCount |
const int |
1 - |
10 |
Maximal number of iteration for the algorithm |
|
inMatchFraction |
const float |
0.0 - 1.0 |
0.75f |
Defines fraction of input points that is being fitted in every iteration |
|
inInitialTransformCount |
const int |
1 - |
10 |
Number of initial transforms to be tried out by the algorithm |
|
outAlignment |
Conditional<CoordinateSystem2D>& |
|
|
The transform that aligns best the input points |
|
outAlignedPoints |
Conditional<Array<Point2D> >& |
|
|
The aligned input points |
Errors
Error type |
Description |
DomainError |
Input point array is empty in AdjustPointArrays. |