mrdja.ransaclp.get_n_percentile_from_list_sse_plane
- mrdja.ransaclp.get_n_percentile_from_list_sse_plane(list_sse_plane: List[Tuple[float, ndarray]], percentile: int = 5) List[Tuple[float, ndarray]][source]
Gets the list of elements in which sse is below the n percentile from a list of sse and planes. The function looks for the best sse values, that are the lowest ones.
- Parameters:
list_sse_plane (List[Tuple[float, np.ndarray]]) – The list of sse and planes.
percentile (int) – The percentile.
- Returns:
The n percentile.
- Return type:
List[Tuple[float, np.ndarray]]
- Example:
>>> import open3d as o3d >>> import mrdja.ransaclp as ransaclp >>> import mrdja.ransac.coreransac as coreransac >>> office_dataset = o3d.data.OfficePointClouds() >>> office_filename = office_dataset.paths[0] >>> ransac_iterator = coreransac.get_ransac_line_iteration_results >>> ransac_iterations = 200 >>> threshold = 0.02 >>> seed = 42 >>> ransac_data = ransaclp.get_ransac_data_from_filename(office_filename, ransac_iterator = ransac_iterator, ransac_iterations = ransac_iterations, threshold = threshold, audit_cloud=True, seed = seed) >>> pair_lines_number_inliers = ransaclp.get_lines_and_number_inliers_from_ransac_data_from_file(ransac_data) >>> list_sse_plane = ransaclp.get_ordered_list_sse_plane(pair_lines_number_inliers, percentage_best = 0.2) >>> len(list_sse_plane) 780 >>> list_sse_plane[:5] [(3.133004699296308e-09, array([ 0.02115254, 0.23488194, -0.97179373, 2.07212126])), (4.072922344774246e-09, array([-0.0583794 , 0.16947913, -0.98380317, 2.274669 ])), (5.597729648076989e-09, array([ 0.04009822, -0.15939724, 0.98639984, -2.26464593])), (1.6036620702538505e-08, array([ 0.04939934, -0.14154284, 0.98869881, -2.30467834])), (1.7597194644519755e-08, array([-0.02745968, 0.98751003, 0.15514477, -2.9031455 ]))] >>> list_sse_plane_05 = ransaclp.get_n_percentile_from_list_sse_plane(list_sse_plane, percentile = 5) >>> len(list_sse_plane_05) 39 >>> list_sse_plane_05[:5] [(3.133004699296308e-09, array([ 0.02115254, 0.23488194, -0.97179373, 2.07212126])), (4.072922344774246e-09, array([-0.0583794 , 0.16947913, -0.98380317, 2.274669 ])), (5.597729648076989e-09, array([ 0.04009822, -0.15939724, 0.98639984, -2.26464593])), (1.6036620702538505e-08, array([ 0.04939934, -0.14154284, 0.98869881, -2.30467834])), (1.7597194644519755e-08, array([-0.02745968, 0.98751003, 0.15514477, -2.9031455 ]))]