I have an OAK D Pro:
- sensor resolution set to 4k
- preview resolution 640x480
- setPreviewKeepAspectRatio is True
I am working with a preview derived image stream and I require the camera intrinsics. Currently I am reading them from calibration with a custom resolution specified:
rgbd_intrinsics = calibData.getCameraIntrinsics(dai.CameraBoardSocket.RGB, resizeWidth=640, resizeHeight=480, keepAspectRatio=True)
Which returns [514.22424316, 0., 324.875, 0., 514.22424, 243.36540222, 0., 0., 1. ]
My problem is that objects located in the scene (apriltags and checkerboards) are being found closer to the camera than they actually are, by a ratio of 23/30 (0.76). If I multiply out the f_x and f_y terms of the intrinsic then i get pretty good distance measurements out to 1 meter.
I assume I'm not setting something appropriately to get the correct intrinsics - what am I doing wrong? Complete code can be found here: https://github.com/Taiga-Robotics/luxonis_support/blob/main/scripts/oak_d_node.py