Open3d: Visual 3d point directly from numpy array

Created on 6 Nov 2018  ·  8Comments  ·  Source: intel-isl/Open3D

Does it support visualize numpy array?

question

Most helpful comment

@syncle @yxlao Many thanks. Open3D is a very good library, the only question is that it's not work very well with IDE for code suggestions such as PyCharm in Python interface. Would be better to promote it, then it could be good as OpenCV

All 8 comments

Almost -- first we'll need to create a PointCloud from the numpy array.

import numpy as np
import open3d

points = np.random.rand(10000, 3)
point_cloud = open3d.PointCloud()
point_cloud.points = open3d.Vector3dVector(points)
open3d.draw_geometries([point_cloud])

I think we can say "yes" :) Thanks to #657, there is almost no overhead.

@syncle @yxlao Many thanks. Open3D is a very good library, the only question is that it's not work very well with IDE for code suggestions such as PyCharm in Python interface. Would be better to promote it, then it could be good as OpenCV

Could that be some config issues in PyCharm?

For example, Jupyter notebook does code suggestions pretty well:
screen shot 2018-11-06 at 6 07 30 pm

There are two cases: (1) pure Python code and (2) compiled C++ python module (and Open3D has a lot of them). Apparently, Jupyter suggestion works for both (1) and (2).

My guess is that PyCharm is configured to only to show case (1)? If this is the case, do you have suggestions on how to "promote" case (2) to be case (1) for PyCharm?

I saw Open3D source codes, it did some promote suggestion optimization in Jupyter notebook. But not in pure python, I mean, pycharm or vscode can not work with that. If you try pycharm, you will see Open3D just failing at any code suggestions

From this https://stackoverflow.com/a/5196184/1255535, it seems to be possible to set up in PyCharm. Though there are other reports saying that it is not possible with PyCharm.

I did a quick comparison with opencv. The __init__.py file look almost identical, so if opencv autocomplete works, open3d shall also work

Coud you check your installed opencv and see if there are some additional tricks? 🕵️

@yxlao Thanks for your quick look. __init__ file actually identical. I think maybe it's installation process makes sure the child package importable in IDEs. I am not quite specialized in Python package writing, hoping for your guys improve it in the future and make Open3D a great library though

@jinfagang looked at it again today, turned out to be an easy fix #676

Was this page helpful?
0 / 5 - 0 ratings