Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Down sampling error #78

Open
VMohinder opened this issue Jun 17, 2021 · 2 comments
Open

Down sampling error #78

VMohinder opened this issue Jun 17, 2021 · 2 comments

Comments

@VMohinder
Copy link

VMohinder commented Jun 17, 2021

Processing: bildstein_station1_xyz_intensity_rgb
Num points: 29697591
Num points after 0-skip: 9476296
Traceback (most recent call last):
File "downsample.py", line 97, in
voxel_size,
File "downsample.py", line 49, in down_sample
sparse_pcd, cubics_ids = open3d.voxel_down_sample_and_trace(
AttributeError: module 'open3d' has no attribute 'voxel_down_sample_and_trace'

If I use

sparse_pcd, cubics_ids = dense_pcd.voxel_down_sample_and_trace(voxel_size, min_bound, max_bound, False)

then

Processing: bildstein_station1_xyz_intensity_rgb
Num points: 29697591
Num points after 0-skip: 9476296
Traceback (most recent call last):
File "downsample.py", line 100, in
voxel_size,
File "downsample.py", line 53, in down_sample
sparse_pcd, cubics_ids = dense_pcd.voxel_down_sample_and_trace(voxel_size, min_bound, max_bound, False)
ValueError: too many values to unpack (expected 2)

But if I use:

sparse_pcd = cubics_idsdense_pcd.voxel_down_sample_and_trace(voxel_size, min_bound, max_bound, False)

it works, but I'm not sure were cubics_ids are stored. I know that sparse_pcd[0] is the down sampled point cloud, but I can't interpret sparse_pcd[1] and sparse_pcd[2].

@VMohinder
Copy link
Author

It seems that cubics_ids is stored in sparse_pcd[1].

@rekharchandran
Copy link

sparse_pcd, cubics_ids, some_list = open3d.geometry.PointCloud.voxel_down_sample_and_trace(pcd, voxel_size, min_bound, max_bound, approximate_class=False) this works for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants