Ask Your Question
0

Stereo Calibration Large Reprojection Error

asked 2017-10-31 04:31:06 -0600

xuehy gravatar image

updated 2017-10-31 04:35:35 -0600

I have two cameras of focal length around 16mm. The images are of size 1920 x 1200. The baseline of the stereo camera is 58cm.

I use a chessboard which has 11 x 8 squares and each square is of size 30mm.

I try to calibrate them. First of all, I calibrate each camera individually and the result is fine as the reprojection error is 0.1 pixel.

cameraMatrixL=:[2785.202770863591, 0, 984.1400459663615;
  0, 2788.428270564179, 581.5087637790315;
  0, 0, 1]
cameraDistcoeffL=:[-0.1677238267167475;
  -0.395313443957162;
  -0.001383372443801478;
  0.0002014464131976951;
  2.119865752288633]
cameraMatrixR=:[2609.062822974007, 0, 971.5599542214958;
  0, 2607.290530112078, 559.2017994321467;
  0, 0, 1]
cameraDistcoeffR=:[-0.2495239596557136;
  0.4314222326927977;
  0.001374092496367516;
  -0.001356964758328043;
  -0.6424581915855094]

When I use stereoCalibrate to calibrate the two cameras, with CV_CALIB_FIX_INTRINSIC flag since each camera has been calibrated, the calibration leads to very large reprojection error of about 74 pixels. And part of the result is:

R=[0.9997985779255049, -0.01978248219858788, 0.003384815534210077;
  0.01973819084128694, 0.9997251111494954, 0.01265329836216954;
  -0.003634198735761777, -0.01258393957358743, 0.9999142148526329]
T=[-541.2430345930716;
  -22.06582437757288;
  -118.2719750753764]

541mm is close to my baseline of 58cm. However, the cameras should not have a distance in other directions as large as 118mm since the two cameras are placed on the same plane.

I don't know why. Is there anyone that can provide me some adivices to improve the results?

edit retag flag offensive close merge delete

Comments

what are the flags you use in StereoCalibrate ?

John_OpenCVdev gravatar imageJohn_OpenCVdev ( 2017-10-31 08:42:33 -0600 )edit

I use CV_CALIB_FIX_INTRINSIC. if i use intrinsic guess the calibration result will be complete wrong.

xuehy gravatar imagexuehy ( 2017-10-31 08:54:45 -0600 )edit

Try using all these flags "CV_CALIB_RATIONAL_MODEL + CV_CALIB_FIX_INTRINSIC + CV_CALIB_FIX_PRINCIPAL_POINT"

John_OpenCVdev gravatar imageJohn_OpenCVdev ( 2017-10-31 09:17:10 -0600 )edit

I tried. But the calibration error is still as large as 74.

xuehy gravatar imagexuehy ( 2017-11-02 03:21:18 -0600 )edit

@xuehy, did you ever resolve this issue ?

kevinkayaks gravatar imagekevinkayaks ( 2018-08-01 15:29:09 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-11-16 05:53:19 -0600

Phann gravatar image

updated 2018-11-16 05:55:16 -0600

The question is not new, but it seems that others have the same issue.

Have a look at the detected chessboards in both images with drawChessboardCorners. In some cases the order of the chessboard corners is determined differently in the stereo images (in one case starting from the right side and in the other from the left side). If that is the case, the reprojection error of stereoCalibrate is quite high (I had 15, but also much larger values are possible depending on the number of images with wrongly detected chessboard corner pairs). The reason for it is, that the points do not correspond to each other in both images anymore. However, the calibration for a single camera is not affected by that, so the reprojection error of calibrateCamera can be low at the same time.

By rejecting these wrongly detected chessboard pairs from calibration, I reduced the average reprojection error of stereoCalibrate to a value of less than 1.

Another solution could be the usage of ArUco or ChArUco patterns which should be unambigous in terms of orientation, but I haven't tested that myself.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-10-31 04:31:06 -0600

Seen: 3,795 times

Last updated: Nov 16 '18