CogTransform2DLinescan BestFitLinearTransform Method Cognex VisionPro
Returns a new linear transform which best describes this transform over the given set of points. The points must be expressed in 'from' coordinates.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 65.1.0.0
Syntax

public virtual CogTransform2DLinear BestFitLinearTransform(
	double[,] fromPoints,
	out double rmsError
)

Parameters

fromPoints
Type:  System Double 

An array of points, expressed in From coordinates, for which to apply .

rmsError
Type: System Double 

If you supply a value for ., sets it to the RMS error of the points against the returned linear transformation. A value of 0 indicates that the returned transformation exactly maps the points. Note that the RMS error is measured in To space.

. is the Root Mean Square (RMS) unweighted Euclidian error between two sets of corresponding points. Set A is composed of the given points (in From space) after they have been mapped through this transform into To space. Set B is the same points after they have been mapped to To space using the linear transform returned by this function.

Return Value

Type: CogTransform2DLinear

A CogTransform2DLinear object that describes the best-fit linear transform (the one that produces the smallest RMSError of any linear transform).

Implements

ICogTransform2D BestFitLinearTransform( Double , Double )
Exceptions

ExceptionCondition
CogTransformTooFewPointsLinFitException

Too few points were provided to compute a best fit linear transform.

Remarks

Returns a new linear transform that best describes this transform over the given set of points. These points must be expressed in From coordinates. The returned transform is called the "best-fit linear transform" because it is guaranteed to produce the smallest RMSError of any linear transform.

See Also