Back to Aurora Vision Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Fitting » AdjustPointArrays

AdjustPointArrays


Header: AVL.h
Namespace: avl
Module: FoundationPro

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<atl::Array<avl::Point2D> >& outAlignedPoints,
	atl::Conditional<avl::CoordinateSystem2D>& outAlignment
)

Parameters

Name Type Range Default Description
Input value inPoints const Array<Point2D>& Points to be aligned
Input value inReferencePoints const Array<Point2D>& Points to align to
Input value inAllowRotation const bool True Flag indicating whether rotation is allowed as a part of output alignment
Input value inAllowScale const bool False Flag indicating whether scale is allowed as a part of output alignment
Input value inMaxIterationCount const int 1 - 10 Maximal number of iteration for the algorithm
Input value inMatchFraction const float 0.0 - 1.0 0.75f Defines fraction of input points that is being fitted in every iteration
Input value inInitialTransformCount const int 1 - 10 Number of initial transforms to be tried out by the algorithm
Output value outAlignedPoints Conditional<Array<Point2D> >& The aligned input points
Output value outAlignment Conditional<CoordinateSystem2D>& The transform that aligns best the input points

Errors

List of possible exceptions:

Error type Description
DomainError Input point array is empty in AdjustPointArrays.