点云位于哪个参考系?

问题描述 投票:0回答:1

我必须使用 RGBD 图像生成点云。我正在使用 open3d 中的以下函数。哪个帧将是相机帧或世界帧中的结果点?

pcd_tmp = o3d.geometry.PointCloud.create_from_rgbd_image(
            rgbd,
            o3d.camera.PinholeCameraIntrinsic(
                cam.image_width,
                cam.image_height,
                cam.fx,
                cam.fy,
                cam.cx,
                cam.cy,
            ),
            extrinsic=W2C,
            project_valid_depth_only=True,
        )

我想获取世界参考系中的点云,这是正确的方法吗?

point-clouds open3d
1个回答
0
投票

我主要使用tensor api,因此添加一个答案。

pcd_frame = o3d.t.geometry.PointCloud.create_from_rgbd_image(
                    rgbd_image=rgbd_frame,
                    intrinsics=intrinsics,
                    extrinsics=extrinsics,
                    depth_scale=depth_scale,
                    depth_max=depth_max,
                    stride=1,
                    with_normals=False,
                )

但是,要检查这是否正确完成,最好添加世界坐标系和相机标记以查看所有内容是否正确映射。

coordinate_frame = o3d.geometry.TriangleMesh.create_coordinate_frame(size=1)
cameraLine = o3d.geometry.LineSet.create_camera_visualization(
                    intrinsic=pinhole_intrinsic,
                    extrinsic=extrinsics,
                    scale=0.25,  # Use 0.25 meter as side length of lineset of camera lines
                )
open3d.visualization.draw_geometries([coordinate_frame, cameraLine, pcd_frame.to_legacy()], mesh_show_back_face=True)

Image showing markers for camera location in the world and world coordinate system

© www.soinside.com 2019 - 2024. All rights reserved.