mrdja.ransaclpexperiments.get_pointclouds_of_inliers_of_lines_along_with_plane

mrdja.ransaclpexperiments.get_pointclouds_of_inliers_of_lines_along_with_plane(pcd: PointCloud, line1: ndarray, line2: ndarray, threshold: float) Tuple[PointCloud, PointCloud][source]

Get the pointclouds of the inliers of the lines that are in indices index_1 and index_2 according to the best number of inliers, along with the equation of the plane that best fits the two lines.

Parameters:
  • pcd (o3d.geometry.PointCloud) – The point cloud to be processed.

  • line1 (np.ndarray) – The first line.

  • line2 (np.ndarray) – The second line.

  • threshold (float) – The threshold to be used.

Returns:

A tuple with the inliers and outliers point clouds and the equation of the plane.

Return type:

Tuple[o3d.geometry.PointCloud, o3d.geometry.PointCloud, np.ndarray]

Example:

>>> import mrdja.ransaclpexperiments as experiments
>>> import pickle as pkl
>>> import open3d as o3d
>>> filename_pcd = "/home/scpmaotj/open3d_data/extract/OfficePointClouds/cloud_bin_0.ply"
>>> threshold = 0.02
>>> iterations = 500
>>> percentage_chosen_lines = 0.2
>>> percentage_chosen_planes = 0.05