Skip to content

Cylinder

Cylinder

class Cylinder():
 |  Cylinder()

Warning

The cylinder RANSAC does NOT present good results on real data on the current version. We are working to make a better algorithim using normals. If you want to contribute, please create a MR on github. Or give us ideas on this issue

Implementation for cylinder RANSAC.

This class finds a infinite height cilinder and returns the cylinder axis, center and radius.


fit

 | fit(pts, thresh=0.2, maxIteration=10000)

Find the parameters (axis and radius) defining a cylinder.

Arguments:

  • pts: 3D point cloud as a numpy array (N,3).
  • thresh: Threshold distance from the cylinder hull which is considered inlier.
  • maxIteration: Number of maximum iteration which RANSAC will loop over.

Returns:

  • center: Center of the cylinder np.array(1,3) which the cylinder axis is passing through.
  • axis: Vector describing cylinder's axis np.array(1,3).
  • radius: Radius of cylinder.
  • inliers: Inlier's index from the original point cloud.