Also this is the code I used to get the intrinsic and distortion parameters:
import depthai as dai
pipeline = dai.Pipeline()
cam_rgb = pipeline.createColorCamera()
cam_rgb.setFps(2)
cam_rgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)
cam_rgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1200_P)
cam_rgb.setPreviewSize(1024, 512)
cam_rgb.setInterleaved(False)
cam_rgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.RGB)
xout_rgb = pipeline.createXLinkOut()
xout_rgb.setStreamName("rgb")
cam_rgb.preview.link(xout_rgb.input)
with dai.Device(pipeline) as device:
calib_data = device.readCalibration2()
# print(calib_data)
## Get Extrinsics between cameras (Camera A is the origin in this case)
extrinsics_AtoB = calib_data.getCameraExtrinsics(dai.CameraBoardSocket.CAM_A,dai.CameraBoardSocket.CAM_B) # [cm]
print("Extrinsics from A to B:",extrinsics_AtoB)
## Get Intrinsics for a given camera [fx,0,cx; 0,fy,cy; 0,0,1]
intrinsics = calib_data.getCameraIntrinsics(dai.CameraBoardSocket.CAM_A) # [pixels]
print("Camera A intrinsics:",intrinsics)
## Distortion Coefficients: "k1","k2","p1","p2","k3","k4","k5","k6","s1","s2","s3","s4","τx","τy"
dist_coeff = calib_data.getDistortionCoefficients(dai.CameraBoardSocket.CAM_A)
print("Camera A distortion coefficients:",dist_coeff)