Recover original pointcloud after outlier removal

I want to use Open3D to filter a realsense D415 pointcloud, my goal is to remove outliers and generally clean the raw pointcloud a bit. I tested the python tutorial for outlier removal and it gives nice results, but to use the “remove_radius_outlier” and “remove_statistical_outlier” functions the pointcloud first needs to be downsampled with “voxel_down_sample”. If I run the outlier removal functions on the raw pointcloud, it also works but its very slow.

So my question is:
How can I recover the original pointcloud after filtering the voxel_down_sampled pontcloud?

I checked the function “voxel_down_sample_and_trace” ,

voxel_down_pcd,org_ind = pcd.voxel_down_sample_and_trace(voxel_size=0.02,

this function lists the corners of the voxel cube in “org_ind”, but it does not return index of all points that contribute to form the voxel

Hi Ivan,

Can you:

  1. Complete the downsample
  2. run remove_radius_outlier –
  3. use the outlier list produced by the remove_radius_outlier
    function to remove these points in a radius from your original point cloud?


Hi Runner,
Thanks for your reply. Basically my problem is like this,
I have
pointcloud pcd w 100.000 pts
voxel_down_pcd = pcd.voxel_down_sample(voxel_size=0.02)
filtered_pcd, ind_outlier_removed = voxel_down_pcd.remove_radius_outlier(nb_points=16, radius=0.05)

filtered_pcd will have about 2000 points at this stage, what i what to do is recover the points in pcd that correspond to the remaining points in filtered_pcd.

I found that a new version in the master branch of Open3D adds the requested functionality, in the latest version voxel_down_sample_and_trace includes a third return argument that lists all the index of pcd that are used for each voxel. I tested this and it worked and solved my problem.