I'm trying to an example code in my vsc editor. However, I got the AttributeError: module 'open3d' has no attribute 'PointCloud'error. I looked how to fix this problem but none of those are worked. Looking for any help. I'm using Win10 and Python 3.8. Thanks in advance
import open3d as o3d
import numpy as np
pc_array = np.array([[1, 2, 3], [3, 4, 5]], dtype=np.float32)
print(pc_array)
pc = o3d.PointCloud()
pc.points = o3d.Vector3dVector(pc_array)
print(pc)
According to the documentation it's within the geometry
module. Try:
pc = o3d.geometry.PointCloud()
See also this example where they import PointCloud
from the geometry
module.
Sometimes when you build open3d from source you might encounter that error. Try, o3d.geometry.PointCloud.estimate_normals(<cloud>,search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=<float>,max_nn=<int>))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.