Back to FabImage Library website

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

GoldenTemplate3D


Header: FIL.h
Namespace: fil
Module: Vision3DPro

Compares points on the input with the golden object. Any significant differences are considered defects.

Syntax

C++
C#
 
void fil::GoldenTemplate3D
(
	const fil::Point3DGrid& inObject,
	const fil::Point3DGrid& inGoldenObject,
	const float inMaxDistance,
	const float inVoxelSize,
	const int inNeighborCount,
	const int inSampleCount,
	const float inDeltaCorrection,
	ftl::Optional<const float&> inMaxAngle,
	ftl::Optional<const float&> inMaxTranslationDistance,
	const float inOverlap,
	ftl::Array<fil::Point3D>& outMissing,
	ftl::Array<fil::Point3D>& outExcessive,
	fil::Matrix& outAlignment,
	fil::Point3DGrid& diagCleanedGoldenObject,
	fil::Point3DGrid& diagAlignedObject
)

Parameters

Name Type Range Default Description
Input value
inObject const Point3DGrid& Input Point3DGrid
Input value
inGoldenObject const Point3DGrid& Point3DGrid with the golden object
Input value
inMaxDistance const float 0.0 - Maximal allowed distance between corresponding vertices of the input and the golden object
Input value
inVoxelSize const float 0.0 - 0.0f Defines a voxel size used to subsample both grids.
Input value
inNeighborCount const int 1 - 15 Defines number of neighbors used to compute average distances between vertices during noise removal.
Input value
inSampleCount const int 1 - 5000 Defines number of samples used by the registration algorithm.
Input value
inDeltaCorrection const float 0.0 - 9.3f Defines the accuracy of the alignment. With smaller delta the amount of allocated memory increases.
Input value
inMaxAngle Optional<const float&> 0.0 - 360.0 NIL Limits the maximum rotation angle of the final transform.
Input value
inMaxTranslationDistance Optional<const float&> 0.0 - NIL Limits the length of the translation vector of the final transform.
Input value
inOverlap const float 0.0 - 1.0 0.95f Defines the estimated overlap between two input grids (0 = no overlap, 1.0 = every point in inObject is also in inGoldenObject).
Output value
outMissing Array<Point3D>& Points from the golden object not present in the input object.
Output value
outExcessive Array<Point3D>& Points from the input object not present in the golden object.
Output value
outAlignment Matrix& The transform that aligns best the input object to the golden object.
Diagnostic input
diagCleanedGoldenObject Point3DGrid& Golden object after subsampling and noise removal.
Diagnostic input
diagAlignedObject Point3DGrid& Aligned and cleaned input object

Errors

List of possible exceptions:

Error type Description
DomainError Grids are empty after noise removal in GoldenTemplate3D.
DomainError inNeighborCount is larger than the number of valid points in GoldenTemplate3D.
DomainError Input grid has no valid points in GoldenTemplate3D.
DomainError Input grid is empty in GoldenTemplate3D.
DomainError Parameter inDeltaCorrection in GoldenTemplate3D has to be greater than 0.0
DomainError Parameter inVoxelSize in GoldenTemplate3D has to be greater than or equal to 0.0