Back to Aurora Vision Library website

You are here: Start » Function Reference » Point3DGrid » Point3DGrid Fitting » AdjustPointGrids3D

AdjustPointGrids3D


Header: AVL.h
Namespace: avl
Module: Vision3DStandard

Aligns (rotation + translation) a point grid to match best the reference point grid.

Syntax

C++
C#
 
void avl::AdjustPointGrids3D
(
	const avl::Point3DGrid& inPoints,
	const avl::Point3DGrid& inReferencePoints,
	const int inMaxIterationCount,
	const float inMatchFraction,
	const float inDiscardFurthestFraction,
	avl::Point3DGrid& outAlignedPoints,
	avl::Matrix& outAlignment,
	atl::Array<avl::Point3D>& diagPointsWorkingSet,
	atl::Array<avl::Point3D>& diagReferencePointsWorkingSet,
	atl::Array<atl::Array<avl::Segment3D>>& diagAttractionSegments
)

Parameters

Name Type Range Default Description
Input value inPoints const Point3DGrid& Data points to be aligned, may contain background clutter.
Input value inReferencePoints const Point3DGrid& Reference points to align to, may only contain points belonging to the object of interest.
Input value inMaxIterationCount const int 1 - 100 Maximal number of iteration for the algorithm
Input value inMatchFraction const float 0.0 - 1.0 0.1111111111111111f Defines fraction of input points that is being fitted in every iteration
Input value inDiscardFurthestFraction const float 0.0 - 1.0 0.05f Fraction of point pairs to be discarded during internal ICP loop. Furthest pairs are discarded, and only in last 10% of algorithm iterations. Useful for handling outliers in the inReferencePoints, as well as gaps/holes in the inPoints data.
Output value outAlignedPoints Point3DGrid& The aligned input points
Output value outAlignment Matrix& The transform that aligns best the input points to the reference points
Diagnostic input diagPointsWorkingSet Array<Point3D>& inPoints after decimation by inMatchFraction, i.e. points which will be fitted in every iteration
Diagnostic input diagReferencePointsWorkingSet Array<Point3D>& inReferencePoints after decimation by inMatchFraction, i.e. points which will be fitted in every iteration
Diagnostic input diagAttractionSegments Array<Array<Segment3D>>& Attraction segments from every iteration. Note that the algorithm internally moves inReferencePoints towards inPoints (and returns inverse transformation), so the segments show movement of reference towards data.

Hints

  • Usually the inPoints Point3DGrid data contains an object with background - a flat plate or some other clutter. The filter handles such cases, however its best to remove this clutter beforehand. Note: The inReferencePoints input must contain only points belonging to the object.
  • The filter can not be used as a pattern localization tool, as it performs well only when adjustments to be made are relatively small. For problems where large adjustments are needed (especially rotations) the filter may fail.

Errors

List of possible exceptions:

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