Notes:
- The result's IsFound property will be set to false if no cylinder can be fit to the given points.
- This operation determines the 3D cylinder which minimizes the sum squared error in image pixels.
- This operation can compute the cylinder's radius and height if the input data includes image points from more than one camera.
Assembly: Cognex.VisionPro3D (in Cognex.VisionPro3D.dll) Version: 83.0.0.0
public Cog3DCylinderFitterUsing2DPointsResult Execute( List<Cog3DCameraCalibration> raw2DFromPhys3Ds, List<Cog3DVect2Collection> pointsRaw2DOnOccludingEdge0, List<Cog3DVect2Collection> pointsRaw2DOnOccludingEdge1, List<Cog3DVect2Collection> pointsRaw2DOnCircularEdge0, List<Cog3DVect2Collection> pointsRaw2DOnCircularEdge1 )
Parameters
- raw2DFromPhys3Ds
- Type: System.Collections.Generic List Cog3DCameraCalibration
The List of camera calibrations of the cameras used to extract the 2D points. The size of the list defines the number of cameras/views used.
- pointsRaw2DOnOccludingEdge0
- Type: System.Collections.Generic List Cog3DVect2Collection
A List of 2D point collections for occluding edges, one collection per camera/view. The size of the list must be equal to the number of cameras. May not be null.Notes:
- It only requires that all points in one collection correspond to the same occluding edge from that camera, i.e., all points in pointsRaw2DOnOccludingEdge0[camIndex_i] must correspond to one occluding edge, and points in pointsRaw2DOnOccludingEdge0[camIndex_j] must correspond to one occluding edge (but diffent from the one for pointsRaw2DOnOccludingEdge0[camIndex_i] if camIndex_j != camIndex_i).
- This function can tolerate the situation where some or all items of pointsRaw2DOnOccludingEdge0 are empty (i.e., pointsRaw2DOnOccludingEdge0[camIndex_i].Count==0);
- It is NOT required that pointsRaw2DOnOccludingEdge0[camIndex_i].Count == pointsRaw2DOnOccludingEdge0[camIndex_j].Count (camIndex_i != camIndex_j);
- It is NOT required that pointsRaw2DOnOccludingEdge0[camIndex_i][k] corresponds to pointsRaw2DOnOccludingEdge0[camIndex_j][k] (camIndex_i != camIndex_j).
- pointsRaw2DOnOccludingEdge1
- Type: System.Collections.Generic List Cog3DVect2Collection
A List of 2D point collections for occluding edges, one collection per camera/view. The size of the list must be equal to the number of cameras. May not be null. Note that pointsRaw2DOnOccludingEdge1[camIndex_i] and pointsRaw2DOnOccludingEdge0[camIndex_i] must correspond to two different occluding edges of the same cylinder observed from the same camera. For detailed specification, see the notes of pointsRaw2DOnOccludingEdge0 for more information.
- pointsRaw2DOnCircularEdge0
- Type: System.Collections.Generic List Cog3DVect2Collection
A List of 2D point collections for circular edges, one collection per camera/view. The size of the List must be equal to the number of cameras. May not be null.Notes:
- It only requires that all points in one collection correspond to the same circular edge (i.e., all points in pointsRaw2DOnCircularEdge0[camIndex_i] must correspond to one circular edge on the cylinder, and points in pointsRaw2DOnCircularEdge0[camIndex_j] must correspond to one circular edge on the cylinder (which might be different from the one for pointsRaw2DOnCircularEdge0[camIndex_i)).
- This function can tolerate the situation where some or all items of pointsRaw2DOnCircularEdge0 are empty (i.e., pointsRaw2DOnCircularEdge0[camIndex_i].Count==0);
- It is NOT required that pointsRaw2DOnCircularEdge0[camIndex_i].Count == pointsRaw2DOnCircularEdge0[camIndex_j].Count (camIndex_i != camIndex_j);
- It is NOT required that pointsRaw2DOnCircularEdge0[camIndex_i][k] corresponds to pointsRaw2DOnCircularEdge0[camIndex_j][k] (camIndex_i != camIndex_j).
- pointsRaw2DOnCircularEdge1
- Type: System.Collections.Generic List Cog3DVect2Collection
A List of 2D point collections for circular edges, one collection per camera/view. The size of the List must be equal to the number of cameras. May not be null. Note that pointsRaw2DOnCircularEdge1[camIndex_i] pointsRaw2DOnCircularEdge0[camIndex_i] must correspond to different circular edges of the same cylinder. For detailed specification, see the notes of pointsRaw2DOnCircularEdge0 for more information.
Return Value
Type: Cog3DCylinderFitterUsing2DPointsResultA Cog3DCylinderFitterUsing2DPointsResult containing the fitted cylinder and 2D and 3D residuals.
| Exception | Condition |
|---|---|
| ArgumentNullException | If any of the input arguments is null or any argument includes null item. |
| ArgumentException |
|
The minimum 2D information required when fitting with FitMode of Cog3DCylinderFitterUsing2DPointsFitModeConstants.LeastSquaresUseSpecifiedRadiusAndHeight is:
At least two 2D points along each occluding edge for one camera;
or at least five 2D points along one of the circular edge for one camera.
The minimum 2D information required when fitting with FitMode of Cog3DCylinderFitterUsing2DPointsFitModeConstants.LeastSquaresComputeRadiusAndHeight is:
At least two 2D points (from each camera) along each occluding edge for two cameras;
Or at least five 2D points (from each camera) along the same circular edge for two cameras.