fwilliams / point-cloud-utils

An easy-to-use Python library for processing and manipulating 3D point clouds and meshes.
https://www.fwilliams.info/point-cloud-utils/
MIT License
1.3k stars 107 forks source link

Attribute Error: module 'point_cloud_utils' has no attribute 'downsample_point_cloud_voxel_grid' #85

Open rahul28suresh opened 6 months ago

rahul28suresh commented 6 months ago

Hi there,

Thanks for your hardwork contributing to the scientific community.

I am having issues running the downsample_point_cloud_voxel_grid example.

v, n, and c seem to be correct and I can use other functions like load_mesh_vnc from pcu but not downsample_point_cloud_voxel_grid. I have posted the code below.

v = np.row_stack(rot_trans_tees_tight) n = np.row_stack(rot_trans_tees_tight_normals) c = np.row_stack(labels)

num_voxels_per_axis = 128 bbox_size = v.max(0) - v.min(0) size_of_voxel = bbox_size / num_voxels_per_axis min_points_per_voxel = 3 v_sampled, n_sampled, c_sampled = pcu.downsample_point_cloud_voxel_grid(sizeof_voxel, v, n, c, min_points_per_voxel=min_points_per_voxel)

Error Message

 7 size_of_voxel = bbox_size / num_voxels_per_axis
  8 min_points_per_voxel = 3

----> 9 v_sampled, n_sampled, c_sampled = pcu.downsample_point_cloud_voxel_grid(sizeof_voxel, v, n, c, 10 min_points_per_voxel=min_points_per_voxel) 11 # print(size_of_voxel)

AttributeError: module 'point_cloud_utils' has no attribute 'downsample_point_cloud_voxel_grid'

C-H-Chien commented 1 week ago

I met the same issue. I did not find anywhere that defines downsample_point_cloud_voxel_grid. Did you solve the issue?