This commit is contained in:
2024-10-10 21:48:55 +08:00
parent 8fd2d6b1e1
commit cd85fed3a0
10 changed files with 73 additions and 33004 deletions

View File

@@ -8,7 +8,7 @@ class ReconstructionUtil:
def compute_coverage_rate(target_point_cloud, combined_point_cloud, threshold=0.01):
kdtree = cKDTree(combined_point_cloud)
distances, _ = kdtree.query(target_point_cloud)
covered_points_num = np.sum(distances < threshold)
covered_points_num = np.sum(distances < threshold*2)
coverage_rate = covered_points_num / target_point_cloud.shape[0]
return coverage_rate, covered_points_num
@@ -16,7 +16,7 @@ class ReconstructionUtil:
def compute_overlap_rate(new_point_cloud, combined_point_cloud, threshold=0.01):
kdtree = cKDTree(combined_point_cloud)
distances, _ = kdtree.query(new_point_cloud)
overlapping_points = np.sum(distances < threshold)
overlapping_points = np.sum(distances < threshold*2)
if new_point_cloud.shape[0] == 0:
overlap_rate = 0
else: