From e1503cc29efc49bfe483c715bc1b29b66b56a3df Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Thu, 24 Nov 2016 13:56:08 +0100 Subject: [PATCH] calibrateCamera: specifiy what kind of re-projection error is returned --- modules/calib3d/include/opencv2/calib3d.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/calib3d/include/opencv2/calib3d.hpp b/modules/calib3d/include/opencv2/calib3d.hpp index 6c61e6a854..023fe103e0 100644 --- a/modules/calib3d/include/opencv2/calib3d.hpp +++ b/modules/calib3d/include/opencv2/calib3d.hpp @@ -784,7 +784,7 @@ space, that is, a real position of the calibration pattern in the k-th pattern v @param stdDeviationsExtrinsics Output vector of standard deviations estimated for extrinsic parameters. Order of deviations values: \f$(R_1, T_1, \dotsc , R_M, T_M)\f$ where M is number of pattern views, \f$R_i, T_i\f$ are concatenated 1x3 vectors. - @param perViewErrors Output vector of average re-projection errors estimated for each pattern view. + @param perViewErrors Output vector of the RMS re-projection error estimated for each pattern view. @param flags Different flags that may be zero or a combination of the following values: - **CV_CALIB_USE_INTRINSIC_GUESS** cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image @@ -823,6 +823,8 @@ the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set, the coefficient from t supplied distCoeffs matrix is used. Otherwise, it is set to 0. @param criteria Termination criteria for the iterative optimization algorithm. +@return the overall RMS re-projection error. + The function estimates the intrinsic camera parameters and extrinsic parameters for each of the views. The algorithm is based on @cite Zhang2000 and @cite BouguetMCT . The coordinates of 3D object points and their corresponding 2D projections in each view must be specified. That may be achieved @@ -847,8 +849,6 @@ The algorithm performs the following steps: the projected (using the current estimates for camera parameters and the poses) object points objectPoints. See projectPoints for details. -The function returns the final re-projection error. - @note If you use a non-square (=non-NxN) grid and findChessboardCorners for calibration, and calibrateCamera returns bad values (zero distortion coefficients, an image center very far from