Hey! I recently discovered that the factory calibration of my OAK-D Lite camera had a principal point about 40px to the left, which I find to be excessive, so I tried calibrating my camera using calibrate.py from github. Unfortunately I can't get the epipolar error for the RGB camera below 1. It's usually at about 4-5. I'm using the recommended aruco board pattern on my 27 inch monitor, which is pretty flat and high-fidelity and have tried many configurations of shooting the shots, aiming to fill the camera frame and look from many directions at the monitor. Still, the error is quite high. Interestingly, the error for the left and right camera is quite low, so I can't really figure out how to get it to perform better.
Has anyone had similar problems? What else can I do?
Thank you!
<------------Calibrating rgb ------------>
INTRINSIC CALIBRATION
Reprojection error of rgb: 5.034222658668403
<------------Calibrating left ------------>
INTRINSIC CALIBRATION
Reprojection error of left: 0.15107010555635988
<------------Calibrating right ------------>
INTRINSIC CALIBRATION
Reprojection error of right: 0.16599770162246127
<-------------Extrinsics calibration of left and right ------------>
Reprojection error is 0.1601330748860618
<-------------Epipolar error of left and right ------------>
Original intrinsics ....
L [[457.10106012 0. 328.89856635]
[ 0. 456.91268888 225.50472026]
[ 0. 0. 1. ]]
R: [[458.20856262 0. 307.18176888]
[ 0. 458.06629417 234.9234571 ]
[ 0. 0. 1. ]]
Intrinsics from the getOptimalNewCameraMatrix/Original ....
L: [[458.20856262 0. 307.18176888]
[ 0. 458.06629417 234.9234571 ]
[ 0. 0. 1. ]]
R: [[458.20856262 0. 307.18176888]
[ 0. 458.06629417 234.9234571 ]
[ 0. 0. 1. ]]
Average Epipolar Error is : 0.14776542348769103
<-------------Extrinsics calibration of right and rgb ------------>
Reprojection error is 0.42267471973251036
<-------------Epipolar error of right and rgb ------------>
Original intrinsics ....
L [[458.20856262 0. 307.18176888]
[ 0. 458.06629417 174.9234571 ]
[ 0. 0. 1. ]]
R: [[498.7213913 0. 306.59984722]
[ 0. 497.02051934 180.05594615]
[ 0. 0. 1. ]]
Intrinsics from the getOptimalNewCameraMatrix/Original ....
L: [[498.7213913 0. 306.59984722]
[ 0. 497.02051934 180.05594615]
[ 0. 0. 1. ]]
R: [[498.7213913 0. 306.59984722]
[ 0. 497.02051934 180.05594615]
[ 0. 0. 1. ]]
Average Epipolar Error is : 0.3633410286610644
Reprojection error threshold -> 3
rgb Reprojection Error: 5.034223
/home/evg/depthai/calibrate.py:1029: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
calibration_handler.setDistortionCoefficients(stringToCam[camera], cam_info['dist_coeff'])
Reprojection error threshold -> 1.0
left Reprojection Error: 0.151070
/home/evg/depthai/calibrate.py:1068: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
calibration_handler.setCameraExtrinsics(stringToCam[camera], stringToCam[cam_info['extrinsics']['to_cam']], cam_info['extrinsics']['rotation_matrix'], cam_info['extrinsics']['translation'], specTranslation)
Reprojection error threshold -> 1.0
right Reprojection Error: 0.165998
['high Reprojection Error']
py: DONE.