luxonis / depthai-python

DepthAI Python Library
MIT License
353 stars 192 forks source link

Camera extrinsic parameter #974

Closed SahilJain8 closed 7 months ago

SahilJain8 commented 7 months ago

I'm currently working on message generation using Open3D. For this I require access to the camera's extrinsic parameters.

volume = o3d.pipelines.integration.ScalableTSDFVolume( voxel_length=4.0 / 512.0, sdf_trunc=0.04, color_type=o3d.pipelines.integration.TSDFVolumeColorType.RGB8)

for i in range(len(camera_poses)): print("Integrate {:d}-th image into the volume.".format(i)) color = o3d.io.read_image("../../test_data/RGBD/color/{:05d}.jpg".format(i)) depth = o3d.io.read_image("../../test_data/RGBD/depth/{:05d}.png".format(i)) rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth( color, depth, depth_trunc=4.0, convert_rgb_to_intensity=False) volume.integrate( rgbd, o3d.camera.PinholeCameraIntrinsic( o3d.camera.PinholeCameraIntrinsicParameters.PrimeSenseDefault), camera_extrinsic parameter)