Function segment_plane

Source
pub fn segment_plane(
    cloud: &PointCloud<Point3f>,
    threshold: f32,
    max_iters: usize,
) -> Result<PlaneSegmentationResult>
Expand description

Plane segmentation using RANSAC algorithm

This function finds the best plane that fits the most points in the cloud using the RANSAC (Random Sample Consensus) algorithm.

§Arguments

  • cloud - Input point cloud
  • threshold - Maximum distance for a point to be considered an inlier
  • max_iters - Maximum number of RANSAC iterations

§Returns

  • Result<PlaneSegmentationResult> - The best plane model and inlier indices