Skip to content

Commit bf84152

Browse files
committed
calib3d: replace defines with enum values
1 parent 37b1bc9 commit bf84152

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

modules/calib3d/include/opencv2/calib3d.hpp

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,11 @@ CV_EXPORTS_W Mat initCameraMatrix2D( InputArrayOfArrays objectPoints,
651651
( patternSize = cvSize(points_per_row,points_per_colum) = cvSize(columns,rows) ).
652652
@param corners Output array of detected corners.
653653
@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
655655
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
657657
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,
659659
square-like shape) to filter out false quads extracted at the contour retrieval stage.
660660
- **CALIB_CB_FAST_CHECK** Run a fast check on the image that looks for chessboard corners,
661661
and shortcut the call if none is found. This can drastically speed up the call in the
@@ -800,7 +800,7 @@ together.
800800
@param imageSize Size of the image used only to initialize the intrinsic camera matrix.
801801
@param cameraMatrix Output 3x3 floating-point camera matrix
802802
\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
804804
initialized before calling the function.
805805
@param distCoeffs Output vector of distortion coefficients
806806
\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
820820
\f$R_i, T_i\f$ are concatenated 1x3 vectors.
821821
@param perViewErrors Output vector of the RMS re-projection error estimated for each pattern view.
822822
@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
824824
fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image
825825
center ( imageSize is used), and focal distances are computed in a least-squares fashion.
826826
Note, that if intrinsic parameters are known, there is no need to use this function just to
827827
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
829829
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
832832
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
834834
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
836836
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
839839
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
841841
backward compatibility, this extra flag should be explicitly specified to make the
842842
calibration function use the rational model and return 8 coefficients. If the flag is not
843843
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
846846
calibration function use the thin prism model and return 12 coefficients. If the flag is not
847847
set, the function computes and returns only 5 distortion coefficients.
848848
- **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
850850
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
851851
- **CALIB_TILTED_MODEL** Coefficients tauX and tauY are enabled. To provide the
852852
backward compatibility, this extra flag should be explicitly specified to make the
853853
calibration function use the tilted sensor model and return 14 coefficients. If the flag is not
854854
set, the function computes and returns only 5 distortion coefficients.
855855
- **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
857857
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
858858
@param criteria Termination criteria for the iterative optimization algorithm.
859859
@@ -865,15 +865,15 @@ points and their corresponding 2D projections in each view must be specified. Th
865865
by using an object with a known geometry and easily detectable feature points. Such an object is
866866
called a calibration rig or calibration pattern, and OpenCV has built-in support for a chessboard as
867867
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
869869
patterns (where Z-coordinates of the object points must be all zeros). 3D calibration rigs can also
870870
be used as long as initial cameraMatrix is provided.
871871
872872
The algorithm performs the following steps:
873873
874874
- Compute the initial intrinsic parameters (the option only available for planar calibration
875875
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.
877877
878878
- Estimate the initial camera pose as if the intrinsic parameters have been already known. This is
879879
done using solvePnP .
@@ -953,8 +953,8 @@ observed by the first camera.
953953
observed by the second camera.
954954
@param cameraMatrix1 Input/output first camera matrix:
955955
\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
958958
matrix components must be initialized. See the flags description for details.
959959
@param distCoeffs1 Input/output vector of distortion coefficients
960960
\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 .
968968
@param E Output essential matrix.
969969
@param F Output fundamental matrix.
970970
@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
972972
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
974974
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$
978978
.
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
981981
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,
984984
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
986986
compatibility, this extra flag should be explicitly specified to make the calibration
987987
function use the rational model and return 8 coefficients. If the flag is not set, the
988988
function computes and returns only 5 distortion coefficients.
@@ -991,14 +991,14 @@ backward compatibility, this extra flag should be explicitly specified to make t
991991
calibration function use the thin prism model and return 12 coefficients. If the flag is not
992992
set, the function computes and returns only 5 distortion coefficients.
993993
- **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
995995
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
996996
- **CALIB_TILTED_MODEL** Coefficients tauX and tauY are enabled. To provide the
997997
backward compatibility, this extra flag should be explicitly specified to make the
998998
calibration function use the tilted sensor model and return 14 coefficients. If the flag is not
999999
set, the function computes and returns only 5 distortion coefficients.
10001000
- **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
10021002
supplied distCoeffs matrix is used. Otherwise, it is set to 0.
10031003
@param criteria Termination criteria for the iterative optimization algorithm.
10041004
@@ -1026,10 +1026,10 @@ Besides the stereo-related information, the function can also perform a full cal
10261026
two cameras. However, due to the high dimensionality of the parameter space and noise in the input
10271027
data, the function can diverge from the correct solution. If the intrinsic parameters can be
10281028
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
10301030
function along with the computed intrinsic parameters. Otherwise, if all the parameters are
10311031
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
10331033
reasonable assumption.
10341034
10351035
Similarly to calibrateCamera , the function minimizes the total re-projection error for all the
@@ -1061,7 +1061,7 @@ camera.
10611061
@param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
10621062
camera.
10631063
@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,
10651065
the function makes the principal points of each camera have the same pixel coordinates in the
10661066
rectified views. And if the flag is not set, the function may still shift the images in the
10671067
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:
11001100
\f[\texttt{P2} = \begin{bmatrix} f & 0 & cx_2 & T_x*f \\ 0 & f & cy & 0 \\ 0 & 0 & 1 & 0 \end{bmatrix} ,\f]
11011101
11021102
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.
11041104
11051105
- **Vertical stereo**: the first and the second camera views are shifted relative to each other
11061106
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
21222122
@param P2 Output 3x4 projection matrix in the new (rectified) coordinate systems for the second
21232123
camera.
21242124
@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,
21262126
the function makes the principal points of each camera have the same pixel coordinates in the
21272127
rectified views. And if the flag is not set, the function may still shift the images in the
21282128
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
21482148
observed by the second camera.
21492149
@param K1 Input/output first camera matrix:
21502150
\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,
21522152
some or all of the matrix components must be initialized.
21532153
@param D1 Input/output vector of distortion coefficients \f$(k_1, k_2, k_3, k_4)\f$ of 4 elements.
21542154
@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
21582158
@param R Output rotation matrix between the 1st and the 2nd camera coordinate systems.
21592159
@param T Output translation vector between the coordinate systems of the cameras.
21602160
@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
21622162
are estimated.
21632163
- **fisheye::CALIB_USE_INTRINSIC_GUESS** K1, K2 contains valid initial values of
21642164
fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image

0 commit comments

Comments
 (0)