add new_added_pts compute
This commit is contained in:
@@ -31,6 +31,18 @@ class ReconstructionUtil:
|
||||
|
||||
return filtered_sampled_points[:, :3]
|
||||
|
||||
@staticmethod
|
||||
def get_new_added_points(old_combined_pts, new_pts, threshold=0.005):
|
||||
if old_combined_pts.size == 0:
|
||||
return new_pts
|
||||
if new_pts.size == 0:
|
||||
return np.array([])
|
||||
|
||||
tree = cKDTree(old_combined_pts)
|
||||
distances, _ = tree.query(new_pts, k=1)
|
||||
new_added_points = new_pts[distances > threshold]
|
||||
return new_added_points
|
||||
|
||||
if __name__ == "__main__":
|
||||
import os
|
||||
root = "/media/hofee/data/project/python/nbv_reconstruction/nbv_rec_visualize/data/sample/"
|
||||
|
Reference in New Issue
Block a user