@@ -651,11 +651,11 @@ CV_EXPORTS_W Mat initCameraMatrix2D( InputArrayOfArrays objectPoints,
651
651
( patternSize = cvSize(points_per_row,points_per_colum) = cvSize(columns,rows) ).
652
652
@param corners Output array of detected corners.
653
653
@param flags Various operation flags that can be zero or a combination of the following values:
654
- - **CV_CALIB_CB_ADAPTIVE_THRESH ** Use adaptive thresholding to convert the image to black
654
+ - **CALIB_CB_ADAPTIVE_THRESH ** Use adaptive thresholding to convert the image to black
655
655
and white, rather than a fixed threshold level (computed from the average image brightness).
656
- - **CV_CALIB_CB_NORMALIZE_IMAGE ** Normalize the image gamma with equalizeHist before
656
+ - **CALIB_CB_NORMALIZE_IMAGE ** Normalize the image gamma with equalizeHist before
657
657
applying fixed or adaptive thresholding.
658
- - **CV_CALIB_CB_FILTER_QUADS ** Use additional criteria (like contour area, perimeter,
658
+ - **CALIB_CB_FILTER_QUADS ** Use additional criteria (like contour area, perimeter,
659
659
square-like shape) to filter out false quads extracted at the contour retrieval stage.
660
660
- **CALIB_CB_FAST_CHECK** Run a fast check on the image that looks for chessboard corners,
661
661
and shortcut the call if none is found. This can drastically speed up the call in the
@@ -800,7 +800,7 @@ together.
800
800
@param imageSize Size of the image used only to initialize the intrinsic camera matrix.
801
801
@param cameraMatrix Output 3x3 floating-point camera matrix
802
802
\f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$ . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
803
- and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
803
+ and/or CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
804
804
initialized before calling the function.
805
805
@param distCoeffs Output vector of distortion coefficients
806
806
\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])\f$ of
@@ -820,24 +820,24 @@ space, that is, a real position of the calibration pattern in the k-th pattern v
820
820
\f$R_i, T_i\f$ are concatenated 1x3 vectors.
821
821
@param perViewErrors Output vector of the RMS re-projection error estimated for each pattern view.
822
822
@param flags Different flags that may be zero or a combination of the following values:
823
- - **CV_CALIB_USE_INTRINSIC_GUESS ** cameraMatrix contains valid initial values of
823
+ - **CALIB_USE_INTRINSIC_GUESS ** cameraMatrix contains valid initial values of
824
824
fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image
825
825
center ( imageSize is used), and focal distances are computed in a least-squares fashion.
826
826
Note, that if intrinsic parameters are known, there is no need to use this function just to
827
827
estimate extrinsic parameters. Use solvePnP instead.
828
- - **CV_CALIB_FIX_PRINCIPAL_POINT ** The principal point is not changed during the global
828
+ - **CALIB_FIX_PRINCIPAL_POINT ** The principal point is not changed during the global
829
829
optimization. It stays at the center or at a different location specified when
830
- CV_CALIB_USE_INTRINSIC_GUESS is set too.
831
- - **CV_CALIB_FIX_ASPECT_RATIO ** The functions considers only fy as a free parameter. The
830
+ CALIB_USE_INTRINSIC_GUESS is set too.
831
+ - **CALIB_FIX_ASPECT_RATIO ** The functions considers only fy as a free parameter. The
832
832
ratio fx/fy stays the same as in the input cameraMatrix . When
833
- CV_CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are
833
+ CALIB_USE_INTRINSIC_GUESS is not set, the actual input values of fx and fy are
834
834
ignored, only their ratio is computed and used further.
835
- - **CV_CALIB_ZERO_TANGENT_DIST ** Tangential distortion coefficients \f$(p_1, p_2)\f$ are set
835
+ - **CALIB_ZERO_TANGENT_DIST ** Tangential distortion coefficients \f$(p_1, p_2)\f$ are set
836
836
to zeros and stay zero.
837
- - **CV_CALIB_FIX_K1 ,...,CV_CALIB_FIX_K6 ** The corresponding radial distortion
838
- coefficient is not changed during the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is
837
+ - **CALIB_FIX_K1 ,...,CALIB_FIX_K6 ** The corresponding radial distortion
838
+ coefficient is not changed during the optimization. If CALIB_USE_INTRINSIC_GUESS is
839
839
set, the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
840
- - **CV_CALIB_RATIONAL_MODEL ** Coefficients k4, k5, and k6 are enabled. To provide the
840
+ - **CALIB_RATIONAL_MODEL ** Coefficients k4, k5, and k6 are enabled. To provide the
841
841
backward compatibility, this extra flag should be explicitly specified to make the
842
842
calibration function use the rational model and return 8 coefficients. If the flag is not
843
843
set, the function computes and returns only 5 distortion coefficients.
@@ -846,14 +846,14 @@ backward compatibility, this extra flag should be explicitly specified to make t
846
846
calibration function use the thin prism model and return 12 coefficients. If the flag is not
847
847
set, the function computes and returns only 5 distortion coefficients.
848
848
- **CALIB_FIX_S1_S2_S3_S4** The thin prism distortion coefficients are not changed during
849
- the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
849
+ the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
850
850
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
851
851
- **CALIB_TILTED_MODEL** Coefficients tauX and tauY are enabled. To provide the
852
852
backward compatibility, this extra flag should be explicitly specified to make the
853
853
calibration function use the tilted sensor model and return 14 coefficients. If the flag is not
854
854
set, the function computes and returns only 5 distortion coefficients.
855
855
- **CALIB_FIX_TAUX_TAUY** The coefficients of the tilted sensor model are not changed during
856
- the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
856
+ the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
857
857
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
858
858
@param criteria Termination criteria for the iterative optimization algorithm.
859
859
@@ -865,15 +865,15 @@ points and their corresponding 2D projections in each view must be specified. Th
865
865
by using an object with a known geometry and easily detectable feature points. Such an object is
866
866
called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as
867
867
a calibration rig (see findChessboardCorners ). Currently, initialization of intrinsic parameters
868
- (when CV_CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration
868
+ (when CALIB_USE_INTRINSIC_GUESS is not set) is only implemented for planar calibration
869
869
patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also
870
870
be used as long as initial cameraMatrix is provided.
871
871
872
872
The algorithm performs the following steps:
873
873
874
874
- Compute the initial intrinsic parameters (the option only available for planar calibration
875
875
patterns) or read them from the input parameters. The distortion coefficients are all set to
876
- zeros initially unless some of CV_CALIB_FIX_K ? are specified.
876
+ zeros initially unless some of CALIB_FIX_K ? are specified.
877
877
878
878
- Estimate the initial camera pose as if the intrinsic parameters have been already known. This is
879
879
done using solvePnP .
@@ -953,8 +953,8 @@ observed by the first camera.
953
953
observed by the second camera.
954
954
@param cameraMatrix1 Input/output first camera matrix:
955
955
\f$\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\f$ , \f$j = 0,\, 1\f$ . If
956
- any of CV_CALIB_USE_INTRINSIC_GUESS , CV_CALIB_FIX_ASPECT_RATIO ,
957
- CV_CALIB_FIX_INTRINSIC , or CV_CALIB_FIX_FOCAL_LENGTH are specified, some or all of the
956
+ any of CALIB_USE_INTRINSIC_GUESS , CALIB_FIX_ASPECT_RATIO ,
957
+ CALIB_FIX_INTRINSIC , or CALIB_FIX_FOCAL_LENGTH are specified, some or all of the
958
958
matrix components must be initialized. See the flags description for details.
959
959
@param distCoeffs1 Input/output vector of distortion coefficients
960
960
\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])\f$ of
@@ -968,21 +968,21 @@ is similar to distCoeffs1 .
968
968
@param E Output essential matrix.
969
969
@param F Output fundamental matrix.
970
970
@param flags Different flags that may be zero or a combination of the following values:
971
- - **CV_CALIB_FIX_INTRINSIC ** Fix cameraMatrix? and distCoeffs? so that only R, T, E , and F
971
+ - **CALIB_FIX_INTRINSIC ** Fix cameraMatrix? and distCoeffs? so that only R, T, E , and F
972
972
matrices are estimated.
973
- - **CV_CALIB_USE_INTRINSIC_GUESS ** Optimize some or all of the intrinsic parameters
973
+ - **CALIB_USE_INTRINSIC_GUESS ** Optimize some or all of the intrinsic parameters
974
974
according to the specified flags. Initial values are provided by the user.
975
- - **CV_CALIB_FIX_PRINCIPAL_POINT ** Fix the principal points during the optimization.
976
- - **CV_CALIB_FIX_FOCAL_LENGTH ** Fix \f$f^{(j)}_x\f$ and \f$f^{(j)}_y\f$ .
977
- - **CV_CALIB_FIX_ASPECT_RATIO ** Optimize \f$f^{(j)}_y\f$ . Fix the ratio \f$f^{(j)}_x/f^{(j)}_y\f$
975
+ - **CALIB_FIX_PRINCIPAL_POINT ** Fix the principal points during the optimization.
976
+ - **CALIB_FIX_FOCAL_LENGTH ** Fix \f$f^{(j)}_x\f$ and \f$f^{(j)}_y\f$ .
977
+ - **CALIB_FIX_ASPECT_RATIO ** Optimize \f$f^{(j)}_y\f$ . Fix the ratio \f$f^{(j)}_x/f^{(j)}_y\f$
978
978
.
979
- - **CV_CALIB_SAME_FOCAL_LENGTH ** Enforce \f$f^{(0)}_x=f^{(1)}_x\f$ and \f$f^{(0)}_y=f^{(1)}_y\f$ .
980
- - **CV_CALIB_ZERO_TANGENT_DIST ** Set tangential distortion coefficients for each camera to
979
+ - **CALIB_SAME_FOCAL_LENGTH ** Enforce \f$f^{(0)}_x=f^{(1)}_x\f$ and \f$f^{(0)}_y=f^{(1)}_y\f$ .
980
+ - **CALIB_ZERO_TANGENT_DIST ** Set tangential distortion coefficients for each camera to
981
981
zeros and fix there.
982
- - **CV_CALIB_FIX_K1 ,...,CV_CALIB_FIX_K6 ** Do not change the corresponding radial
983
- distortion coefficient during the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set,
982
+ - **CALIB_FIX_K1 ,...,CALIB_FIX_K6 ** Do not change the corresponding radial
983
+ distortion coefficient during the optimization. If CALIB_USE_INTRINSIC_GUESS is set,
984
984
the coefficient from the supplied distCoeffs matrix is used. Otherwise, it is set to 0.
985
- - **CV_CALIB_RATIONAL_MODEL ** Enable coefficients k4, k5, and k6. To provide the backward
985
+ - **CALIB_RATIONAL_MODEL ** Enable coefficients k4, k5, and k6. To provide the backward
986
986
compatibility, this extra flag should be explicitly specified to make the calibration
987
987
function use the rational model and return 8 coefficients. If the flag is not set, the
988
988
function computes and returns only 5 distortion coefficients.
@@ -991,14 +991,14 @@ backward compatibility, this extra flag should be explicitly specified to make t
991
991
calibration function use the thin prism model and return 12 coefficients. If the flag is not
992
992
set, the function computes and returns only 5 distortion coefficients.
993
993
- **CALIB_FIX_S1_S2_S3_S4** The thin prism distortion coefficients are not changed during
994
- the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
994
+ the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
995
995
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
996
996
- **CALIB_TILTED_MODEL** Coefficients tauX and tauY are enabled. To provide the
997
997
backward compatibility, this extra flag should be explicitly specified to make the
998
998
calibration function use the tilted sensor model and return 14 coefficients. If the flag is not
999
999
set, the function computes and returns only 5 distortion coefficients.
1000
1000
- **CALIB_FIX_TAUX_TAUY** The coefficients of the tilted sensor model are not changed during
1001
- the optimization. If CV_CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
1001
+ the optimization. If CALIB_USE_INTRINSIC_GUESS is set, the coefficient from the
1002
1002
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
1003
1003
@param criteria Termination criteria for the iterative optimization algorithm.
1004
1004
@@ -1026,10 +1026,10 @@ Besides the stereo-related information, the function can also perform a full cal
1026
1026
two cameras. However, due to the high dimensionality of the parameter space and noise in the input
1027
1027
data, the function can diverge from the correct solution. If the intrinsic parameters can be
1028
1028
estimated with high accuracy for each of the cameras individually (for example, using
1029
- calibrateCamera ), you are recommended to do so and then pass CV_CALIB_FIX_INTRINSIC flag to the
1029
+ calibrateCamera ), you are recommended to do so and then pass CALIB_FIX_INTRINSIC flag to the
1030
1030
function along with the computed intrinsic parameters. Otherwise, if all the parameters are
1031
1031
estimated at once, it makes sense to restrict some parameters, for example, pass
1032
- CV_CALIB_SAME_FOCAL_LENGTH and CV_CALIB_ZERO_TANGENT_DIST flags, which is usually a
1032
+ CALIB_SAME_FOCAL_LENGTH and CALIB_ZERO_TANGENT_DIST flags, which is usually a
1033
1033
reasonable assumption.
1034
1034
1035
1035
Similarly to calibrateCamera , the function minimizes the total re-projection error for all the
@@ -1061,7 +1061,7 @@ camera.
1061
1061
@param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
1062
1062
camera.
1063
1063
@param Q Output \f$4 \times 4\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
1064
- @param flags Operation flags that may be zero or CV_CALIB_ZERO_DISPARITY . If the flag is set,
1064
+ @param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
1065
1065
the function makes the principal points of each camera have the same pixel coordinates in the
1066
1066
rectified views. And if the flag is not set, the function may still shift the images in the
1067
1067
horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
@@ -1100,7 +1100,7 @@ coordinates. The function distinguishes the following two cases:
1100
1100
\f[\texttt{P2} = \begin{bmatrix} f & 0 & cx_2 & T_x*f \\ 0 & f & cy & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} ,\f]
1101
1101
1102
1102
where \f$T_x\f$ is a horizontal shift between the cameras and \f$cx_1=cx_2\f$ if
1103
- CV_CALIB_ZERO_DISPARITY is set.
1103
+ CALIB_ZERO_DISPARITY is set.
1104
1104
1105
1105
- **Vertical stereo**: the first and the second camera views are shifted relative to each other
1106
1106
mainly in vertical direction (and probably a bit in the horizontal direction too). The epipolar
@@ -2122,7 +2122,7 @@ optimization. It stays at the center or at a different location specified when C
2122
2122
@param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
2123
2123
camera.
2124
2124
@param Q Output \f$4 \times 4\f$ disparity-to-depth mapping matrix (see reprojectImageTo3D ).
2125
- @param flags Operation flags that may be zero or CV_CALIB_ZERO_DISPARITY . If the flag is set,
2125
+ @param flags Operation flags that may be zero or CALIB_ZERO_DISPARITY . If the flag is set,
2126
2126
the function makes the principal points of each camera have the same pixel coordinates in the
2127
2127
rectified views. And if the flag is not set, the function may still shift the images in the
2128
2128
horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the
@@ -2148,7 +2148,7 @@ optimization. It stays at the center or at a different location specified when C
2148
2148
observed by the second camera.
2149
2149
@param K1 Input/output first camera matrix:
2150
2150
\f$\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\f$ , \f$j = 0,\, 1\f$ . If
2151
- any of fisheye::CALIB_USE_INTRINSIC_GUESS , fisheye::CV_CALIB_FIX_INTRINSIC are specified,
2151
+ any of fisheye::CALIB_USE_INTRINSIC_GUESS , fisheye::CALIB_FIX_INTRINSIC are specified,
2152
2152
some or all of the matrix components must be initialized.
2153
2153
@param D1 Input/output vector of distortion coefficients \f$(k_1, k_2, k_3, k_4)\f$ of 4 elements.
2154
2154
@param K2 Input/output second camera matrix. The parameter is similar to K1 .
@@ -2158,7 +2158,7 @@ optimization. It stays at the center or at a different location specified when C
2158
2158
@param R Output rotation matrix between the 1st and the 2nd camera coordinate systems.
2159
2159
@param T Output translation vector between the coordinate systems of the cameras.
2160
2160
@param flags Different flags that may be zero or a combination of the following values:
2161
- - **fisheye::CV_CALIB_FIX_INTRINSIC ** Fix K1, K2? and D1, D2? so that only R, T matrices
2161
+ - **fisheye::CALIB_FIX_INTRINSIC ** Fix K1, K2? and D1, D2? so that only R, T matrices
2162
2162
are estimated.
2163
2163
- **fisheye::CALIB_USE_INTRINSIC_GUESS** K1, K2 contains valid initial values of
2164
2164
fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image
0 commit comments