Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

open3d.open3d.geometry.PointCloud has no "voxel_down_sample" method

Open jiangwei221 opened this issue 7 years ago • 19 comments

IMPORTANT: Please use the following template to report the bug.


Describe the bug Tried to run example /examples/Python/Advanced/pointcloud_outlier_removal.py using open3d 0.7.0.0, which installed via conda.

To Reproduce Steps to reproduce the behavior:

  1. cd ./examples/Python/Advanced/
  2. python pointcloud_outlier_removal.py
  3. after closing the first visualization, the program breaks and the error is:
Load a ply point cloud, print it, and render it
Downsample the point cloud with a voxel of 0.02
Traceback (most recent call last):
  File "pointcloud_outlier_removal.py", line 27, in <module>
    voxel_down_pcd = pcd.voxel_down_sample(voxel_size=0.02)
AttributeError: 'open3d.open3d.geometry.PointCloud' object has no attribute 'voxel_down_sample'

Expected behavior open3d.open3d.geometry.PointCloud has no "voxel_down_sample" method

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS:Ubuntu 18.04
  • Python version: Python 3.6.5
  • Open3D version: '0.7.0.0'
  • Is this remote workstation?: no
  • How did you install Open3D?: conda, conda install -c open3d-admin open3d

Additional context Add any other context about the problem here.

jiangwei221 avatar Jun 08 '19 05:06 jiangwei221

works if compiling from source

jiangwei221 avatar Jun 08 '19 05:06 jiangwei221

The problem is, that the online documentation is connected to the master branch and not the latest tag. Had a few of these issues lately. @yxlao can you look into this as discussed on discord?

griegler avatar Jun 08 '19 08:06 griegler

I experience the same error (AttributeError: 'open3d.open3d.geometry.PointCloud' object has no attribute 'voxel_down_sample') for the global_registration example.

OS: Ubuntu 18.04 Open3D version: 0.7.0.0 Python version: 3.6.7 Not a remote workstation Installed Open3D with pip: pip3 install open3d-python

@griegler is it possible to look up documentation online for the latest tag somewhere? Would love to try a working example!

asylunatic avatar Jun 11 '19 14:06 asylunatic

@asylunatic not yet, unfortunately. The scripts in docs/ are set-up to build always the latest version in the master branch. It is on our list. Until then, you could either build the latest open3d from source, or the documentation by running make html in the docs/ folder (after checking out the tagged version).

griegler avatar Jun 11 '19 15:06 griegler

I also did experience the same error while performing one of my first tests, namely: http://www.open3d.org/docs/tutorial/Basic/pointcloud.html

Which gives me the following error:

AttributeError: 'open3d.open3d.geometry.PointCloud' object has no attribute 'voxel_down_sample'

OS: Windows 10 Open3D version: 0.7.0.0 Python version: 3.7.3 Not a remote workstation Installed Open3D by compiling from source

Can anyone explain/inform me how to perform such a basic operation?

Thanks in advance.

Timowas avatar Jun 14 '19 13:06 Timowas

Look at the code here: https://github.com/intel-isl/Open3D/blob/v0.7.0/examples/Python/Basic/pointcloud.py Again, the online doc shows unfortunately the master branch and not the latest released version.

@yxlao @qianyizh @germanros1987 does anybody work on that issue?

griegler avatar Jun 14 '19 14:06 griegler

Thanks for the fast reply @griegler! Sorry to ask it twice.

Timowas avatar Jun 14 '19 14:06 Timowas

I had faced the same issue. Currently I'm using from open3d.open3d.geometry import voxel_down_sample,estimate_normals as a work around

abhineet99 avatar Jun 17 '19 06:06 abhineet99

I had faced the same issue. Currently I'm using from open3d.open3d.geometry import voxel_down_sample,estimate_normals as a work around

Hi,

I tried your strategy and when calling "voxel_down_sample(pcd)" it shows error " voxel_down_sample(): incompatible function arguments." Do you have the similar issue before? Thanks!

YiruS avatar Jul 01 '19 23:07 YiruS

I had faced the same issue. Currently I'm using from open3d.open3d.geometry import voxel_down_sample,estimate_normals as a work around

Hi,

I tried your strategy and when calling "voxel_down_sample(pcd)" it shows error " voxel_down_sample(): incompatible function arguments." Do you have the similar issue before? Thanks!

You need to give voxel_size as an argument as well, as you are down sampling. So the function template becomes "voxel_down_sample(pcd,voxel_size)" . Hope this helps!

abhineet99 avatar Jul 02 '19 04:07 abhineet99

I had faced the same issue. Currently I'm using from open3d.open3d.geometry import voxel_down_sample,estimate_normals as a work around

Hi, I tried your strategy and when calling "voxel_down_sample(pcd)" it shows error " voxel_down_sample(): incompatible function arguments." Do you have the similar issue before? Thanks!

You need to give voxel_size as an argument as well, as you are down sampling. So the function template becomes "voxel_down_sample(pcd,voxel_size)" . Hope this helps!

Thank works, thanks!

YiruS avatar Jul 02 '19 04:07 YiruS

close with #1055

yxlao avatar Jul 03 '19 23:07 yxlao

In case anyone is running into this by way of google, the version being referenced above is now in pypi so before you try any complicated measures, try updating your package using pip3 first.

dopeboy avatar Nov 02 '19 02:11 dopeboy

In case anyone is running into this by way of google, the version being referenced above is now in pypi so before you try any complicated measures, try updating your package using pip3 first.

I have updated it yet get the same issue. any help?

oseh avatar Jan 07 '20 16:01 oseh

This can also be due to multiple versions of open3D associated with your interpreter. See what version is installed : import open3d as o3d && o3d.__version__ Try pip3 uninstall open3D and see what version was uninstalled. If the python can still import open3d after un-installation, you have another version installed! Sometimes this can be open3d-python so you can remove this by pip3 uninstall open3d-python. This should completely remove all the open3d versions. See this link for more information: https://github.com/intel-isl/Open3D/pull/1055#issue-293960190

arkadeepnc avatar Jan 27 '20 21:01 arkadeepnc

This can also be due to multiple versions of open3D associated with your interpreter. See what version is installed : import open3d as o3d && o3d.__version__ Try pip3 uninstall open3D and see what version was uninstalled. If the python can still import open3d after un-installation, you have another version installed! Sometimes this can be open3d-python so you can remove this by pip3 uninstall open3d-python. This should completely remove all the open3d versions. See this link for more information: #1055 (comment)

Thank you very much. You've been very helpful.

oseh avatar Jan 27 '20 21:01 oseh

I was facing the same issue, I uninstalled open3d-python and installed just "open3d" package. It is working properly now.

Anksss3d avatar Apr 08 '21 18:04 Anksss3d

I observed the issue when installed via conda. Uninstalling and installing via pip worked for me.

submagr avatar Jun 18 '21 20:06 submagr

Replace This (0.7.0.0 open3d version)

downpcd = o3d.geometry.voxel_down_sample(pcd,voxel_size=0.06) o3d.visualization.draw_geometries([downpcd]) Worked for me

Nikhilbharadwaj08 avatar Sep 17 '21 07:09 Nikhilbharadwaj08