The stability and precision of the fitted line segment can be determined by setting Perturbation to a value greater than 0. This will estimate the precision of the found line segment by trying slight perturbations of the fitted line segment and comparing the residuals (induced by the perturbed line segment) with the residuals corresponding to the fitted line segment. The difference between the residuals induced by the perturbed line segment and the residuals of the fitted line segment are stored in the Cog3DLineFitterUsing2DPointsResult.MinDeltaResidualsPhys3D and Cog3DLineFitterUsing2DPointsResult.MinDeltaResidualsRaw2D properties.
Notes:
- The result's IsFound property will be set to false if no line can be fit to the given points (such as when the line formed by the image points is exactly parallel to the baseline between two cameras).
- This operation determines the 3D line segment which minimizes the sum squared error in image pixels.
- The endpoints of the fitted line segment are determined by inferring 3D rays from all the pointsRaw2D, determining the nearest point on the fitted line segment to each 3D ray, determining the 2 outermost points with respect to all the nearest points on the fitted line segment.
Assembly: Cognex.VisionPro3D (in Cognex.VisionPro3D.dll) Version: 87.0.0.0
Parameters
- raw2DFromPhys3Ds
- Type: System.Collections.Generic List Cog3DCameraCalibration
The camera calibrations of the cameras used to extract the 2D points. The size of the list defines the number of cameras/views used.
- pointsRaw2D
- Type: System.Collections.Generic List Cog3DVect2Collection
A list of 2D point collections, one collection per camera/view. The size of the list must be equal to the number of cameras.Notes:
- This function can tolerate the situation where some items of pointsRaw2D are empty (i.e., pointsRaw2D[i].Count==0);
- It is NOT required that pointsRaw2D[camIndex_i].Count == pointsRaw2D[camIndex_j].Count (camIndex_i != camIndex_j);
- It is NOT required that pointsRaw2D[camIndex_i][k] corresponds to pointsRaw2D[camIndex_j][k] (camIndex_i != camIndex_j).
Return Value
Type: Cog3DLineFitterUsing2DPointsResultA Cog3DLineFitterUsing2DPointsResult containing the fitted line segment and 2D and 3D residuals.
| Exception | Condition |
|---|---|
| ArgumentNullException | If any of the input arguments is null. |
| ArgumentException |
|