How did you obtain this matrix? Code?
i want to use the calibration_params_raw.stereo_transform to find out where the point in the depth map is in the left or right picturdef project_3d_to_2d(point_3d, calibration_params, stereo_transform, right=False):
if right:
point_3d_homogeneous = np.append(point_3d, 1)
point_3d_right_homogeneous = np.dot(stereo_transform[:,:3], point_3d_homogeneous)
point_3d_right = np.array(point_3d_right_homogeneous[:,:3]) / np.array(point_3d_right_homogeneous[:,3])
else:
point_3d_right = point_3d
fx = calibration_params.right_cam.fx if right else calibration_params.left_cam.fx
fy = calibration_params.right_cam.fy if right else calibration_params.left_cam.fy
cx = calibration_params.right_cam.cx if right else calibration_params.left_cam.cx
cy = calibration_params.right_cam.cy if right else calibration_params.left_cam.cy
x = (point_3d_right[0] * fx / point_3d_right[2]) + cx
y = (point_3d_right[1] * fy / point_3d_right[2]) + cy
return int(x), int(y)e,but i cant.