Merge pull request #2002 from abak:stereo_calibrate

This commit is contained in:
Roman Donchenko
2014-02-05 17:47:26 +04:00
committed by OpenCV Buildbot
7 changed files with 18 additions and 18 deletions

View File

@@ -137,8 +137,8 @@ static bool run3Calibration( vector<vector<Point2f> > imagePoints1,
double err = stereoCalibrate(objpt, imgpt, imgpt_right, cameraMatrix1, distCoeffs1,
cameraMatrix, distCoeffs,
imageSize, R, T, E, F,
TermCriteria(TermCriteria::COUNT, 30, 0),
CALIB_FIX_INTRINSIC);
CALIB_FIX_INTRINSIC,
TermCriteria(TermCriteria::COUNT, 30, 0));
printf("Pair (1,%d) calibration reprojection error = %g\n", c, sqrt(err/(N*2)));
if( c == 2 )
{

View File

@@ -172,12 +172,12 @@ StereoCalib(const vector<string>& imagelist, Size boardSize, bool useCalibrated=
cameraMatrix[0], distCoeffs[0],
cameraMatrix[1], distCoeffs[1],
imageSize, R, T, E, F,
TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 100, 1e-5),
CALIB_FIX_ASPECT_RATIO +
CALIB_ZERO_TANGENT_DIST +
CALIB_SAME_FOCAL_LENGTH +
CALIB_RATIONAL_MODEL +
CALIB_FIX_K3 + CALIB_FIX_K4 + CALIB_FIX_K5);
CALIB_FIX_K3 + CALIB_FIX_K4 + CALIB_FIX_K5,
TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 100, 1e-5) );
cout << "done with RMS error=" << rms << endl;
// CALIBRATION QUALITY CHECK