由于原始点云中有大量无效的点云数据。发现通过过滤的方式最方便
我的点云数据中Z无效的点云都为-32768 只要过滤掉大于-32768的数据就行
#加载点云数据
ply = o3d.io.read_point_cloud("source/Foam1.ply")
# Get the values of the points
points = np.asarray(ply.points)
# Filter the points by z-axis value
filtered_points = points[points[:, 2] > -32700]
# Create a new point cloud with the filtered points
filtered_pcd = o3d.geometry.PointCloud()
filtered_pcd.points = o3d.utility.Vector3dVector(filtered_points)
#pcd = ply.remove_non_finite_points(remove_nan = True, remove_infinite = True)
o3d.visualization.draw_geometries([ filtered_pcd],window_name="filtered_points")

本文介绍了如何通过Python的o3d.io库和numpy处理点云数据,通过筛选出Z轴值大于-32768的点,有效地去除原始点云中的无效数据,并创建一个新的过滤后点云对象。
487

被折叠的 条评论
为什么被折叠?



