Location second camera seems not right cv2.stereoCalibrate()

Arthur
Tue, 13 Dec 2022 13:22:10 +0000
Python

I am debugging my stereo calibration code, however, the location of the second camera seems to be in the wrong location. I perform a dot product of translationmatrix ([[R, T], [0, 0, 0, 1]]) with the location vector of the first camera ([X1, Y1, Z1, 1]) as given in the stereoCalibrate function (OpenCV: Camera Calibration and 3D Reconstruction).

Observations:

The RMSE for the calibration of both cameras is lower than 1 pixel.

The location of the camera is [x, y, z] = [376, -24, 101] in mm with the first camera at the center of the coordinate system; while the real location of the second camera is roughly 190 mm to the right of the first camera and on the same y and z location.

The rotation matrix is

array([[ 8.63219239e-01,  2.41569153e-02, -5.04250918e-01],
       [-1.47503745e-04,  9.98866480e-01,  4.75997246e-02],
       [ 5.04829202e-01, -4.10146192e-02,  8.62244326e-01]])

The translation vector is

array([[376.31094412],
       [-24.09983431],
       [101.15273905]])

Question
Why is the location from the second camera so far of from where it should be?

4 posts - 2 participants