Back to Adaptive Vision Library website

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


Header: AVL.h
Namespace: avl
Module: FoundationPro

Aligns a point array to match best the input point array.


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


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
outAlignedPoints Conditional<Array<Point2D> >& The aligned input points
outAlignment Conditional<CoordinateSystem2D>& The transform that aligns best the input points


List of possible exceptions:

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