小编Leo*_*nid的帖子

Open3d(Python),如何从 .ply 中删除点

我从英特尔实感深度摄像头获取点云。我想删除远处的额外点,如何在代码中添加条件?

获取点云的代码:

import numpy as np
from open3d import *


def main():
    cloud = read_point_cloud("1.ply") # Read the point cloud
    draw_geometries([cloud]) # Visualize the point cloud


if __name__ == "__main__":
    main()
Run Code Online (Sandbox Code Playgroud)

查看点云的代码:

import pyrealsense2 as rs


pipe = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth)
pipe.start(config)
colorizer = rs.colorizer()

try:

    frames = pipe.wait_for_frames()
    colorized = colorizer.process(frames)

    ply = rs.save_to_ply("1.ply")
    ply.set_option(rs.save_to_ply.option_ply_binary, False)
    ply.set_option(rs.save_to_ply.option_ply_normals, True)
    ply.process(colorized)

    print("Done")

finally:
    pipe.stop()

Run Code Online (Sandbox Code Playgroud)

这就是我想要删除的: 在此输入图像描述

python point-clouds realsense open3d

2
推荐指数
1
解决办法
4780
查看次数

标签 统计

open3d ×1

point-clouds ×1

python ×1

realsense ×1