intrinsics = o3d.camera.PinholeCameraIntrinsic(640, 480 ,525.0, 525.0, 319.5, 239.5)
'''
width (int) – Width of the image.
height (int) – Height of the image.
fx (float) – X-axis focal length
fy (float) – Y-axis focal length.
cx (float) – X-axis principle point.
cy (float) – Y-axis principle point.
'''
depth_raw = o3d.io.read_image("./00000.png")
color_raw = o3d.io.read_image("./color.jpg")
rgbd_image = create_rgbd_image_from_color_and_depth(
color_raw, depth_raw)
pcd = o3d.geometry.create_point_cloud_from_rgbd_image(rgbd_image, o3d.camera.PinholeCameraIntrinsic(intrinsics))
pcd.transform([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]]) # flips to it is right side up
o3d.visualization.draw_geometries([pcd])
np.savetxt("./pcd.txt", np.asarray(pcd.points))
有人能帮我用python、opencv或任何其他库将点云投影到深度图的代码吗
目前没有回答
相关问题 更多 >
编程相关推荐