• ROS
  • Camera's P matrix matches K matrix exactly?

I have an OAK-D Pro W PoE

I recently calibrated my camera's intrinsics using the calibrate.py script.

I am using the camera in ROS2, and when I echoed the CameraInfo message, I noticed that the right stereo camera's P matrix matches the K matrix exactly. This seems weird and is unexpected. I'm wondering if this is possible in a correctly-calibrated camera, or if it indicates a deeper problem? For what it's worth, the images do visually appear "fine", and the depth appears correct, though I haven't verified to a high degree. Has this happened to anyone else? Does this indicate a problem?

Below is the CameraInfo message:

header:
  stamp:
    sec: 1737494575
    nanosec: 843275424
  frame_id: oak_right_camera_optical_frame
height: 800
width: 1280
distortion_model: rational_polynomial
d:
- 6.661192417144775
- 2.013073205947876
- -0.00017646803462412208
- -2.3972261260496452e-05
- 0.035011935979127884
- 7.052441120147705
- 4.067800521850586
- 0.28086593747138977
k:
- 575.0081787109375
- 0.0
- 644.4645385742188
- 0.0
- 574.729736328125
- 378.305419921875
- 0.0
- 0.0
- 1.0
r:
- 0.999981701374054
- -0.0013176240026950836
- 0.005904675927013159
- 0.0013300710124894977
- 0.9999969005584717
- -0.0021045648027211428
- -0.005901884753257036
- 0.0021123799961060286
- 0.9999803304672241
p:
- 575.0081787109375
- 0.0
- 644.4645385742188
- 0.0
- 0.0
- 574.729736328125
- 378.305419921875
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
binning_x: 0
binning_y: 0
roi:
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: false
---

    henry0987
    They are not exactly the same, K is a 3x3 intrinsic matrix and P is a projection matrix which seems to have all extrinsic parameters set to 0 (rotation as identity). That would give it the same values as K but with extended 4th column. Why this was done,.. cc @Luxonis-Adam

    Thanks,
    Jaka

    Just to be clear, does this mean my results are to be expected, or not? Is something likely wrong with my camera/calibration process?

    It should be noted that when I echo the CameraInfo from the left camera, the P and K matrices are not the same.

    @jakaskerl

    Hi, you can refer to the CameraInfo specification, P matrix contains intrinsics as well as translation part of the extrinsics for the stereo pair, DepthAI uses different stereo socket ordering (which makes Tx part zero, in case your use case needs different convention you can control that with i_reverse_stereo_socket_order parameter for given sensor