• DepthAI-v2
  • Intrinsics of undistorted image (or fov)

I'm using the camera node in order to get undistorted images from a bunch of OAK-D-PRO-W-POE cameras, and it works pretty well, but I can't figure out how to get the correct intrinsics that represent the updated fovs after the undistortion is taken into account.

I tried using the getCalibrationAlpha function, but it returns None (I'm in python)

The socket is CAM_A, and the resolution is 1920x1080. This code prints "Alpha: None"

self.pipeline = depthai.Pipeline()
# create color camera node
colorCam = self.pipeline.create(depthai.node.Camera) colorCam.setBoardSocket(self.color_cam_socket)
colorCam.setSize(*self.color_cam_resolution) colorCam.setMeshSource(depthai.CameraProperties.WarpMeshSource.CALIBRATION)
self.alpha = colorCam.getCalibrationAlpha()
print(f"Alpha: {self.alpha}")

  • I feel pretty dumb. The right intrinsics were in there, but the camera info wasn't updating in RVIZ so everything looked skewed. Grabbing the intrinsics from calibration as usual worked great.

Messing around a bit more. I can see clearly taht using colorCam.setCalibrationAlpha(0) does not produce the same result as when I don't manually set it, and setting it to anything greater than 0 makes it even more off. The main thing that bothers me about this is that the StereoDepth node lines up perfectly with the image that is corrected using colorCam.setMeshSource(depthai.CameraProperties.WarpMeshSource.CALIBRATION) and if I can simply get an intrinsics matrix from that for doing solvepnp calculations with the undistorted image, I'll be golden.

I feel pretty dumb. The right intrinsics were in there, but the camera info wasn't updating in RVIZ so everything looked skewed. Grabbing the intrinsics from calibration as usual worked great.