ransac_table_detection(pcd, distance_threshold=0.005, ransac_n=3, num_iterations=1000, return_condition=False)[source]#

Detect the table plane using RANSAC.

  • pcd (PointCloud) – an open3d point cloud.

  • distance_threshold (float) – the distance threshold for RANSAC.

  • ransac_n (int) – the number of points to sample for RANSAC.

  • num_iterations (int) – the number of iterations for RANSAC.

  • return_condition (bool) – whether to return the condition used to filter the point cloud.


If return_condition is True, returns a tuple of (model, condition). Condition is a numpy array of shape (N,) representing the condition. Otherwise, returns a tuple of (inliers, outliers). Inliers and outliers are open3d point clouds.

Return type:

Tuple[ndarray, ndarray] | Tuple[PointCloud, PointCloud]