Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit23dec32

Browse files
authored
Merge pull request#23150 from savuor:port5_stereo_calib_per_obj
### Changes* Port of#22519 to 5.x* Distortion coefficients were not copied properly, fixed* Minor coding style chages### Pull Request Readiness ChecklistSee details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request- [x] I agree to contribute to the project under Apache 2 License.- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV- [x] The PR is proposed to the proper branch- [x] There is a reference to the original bug report and related work- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name.- [x] The feature is well documented and sample code can be built with the project CMake
1 parent29dc07b commit23dec32

File tree

5 files changed

+271
-118
lines changed

5 files changed

+271
-118
lines changed

‎modules/calib/include/opencv2/calib.hpp‎

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,15 @@ second camera coordinate system.
994994
@param T Output translation vector, see description above.
995995
@param E Output essential matrix.
996996
@param F Output fundamental matrix.
997+
@param rvecs Output vector of rotation vectors ( @ref Rodrigues ) estimated for each pattern view in the
998+
coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each
999+
i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter
1000+
description) brings the calibration pattern from the object coordinate space (in which object points are
1001+
specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms,
1002+
the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space
1003+
to camera coordinate space of the first camera of the stereo pair.
1004+
@param tvecs Output vector of translation vectors estimated for each pattern view, see parameter description
1005+
of previous output parameter ( rvecs ).
9971006
@param perViewErrors Output vector of the RMS re-projection error estimated for each pattern view.
9981007
@param flags Different flags that may be zero or a combination of the following values:
9991008
- @ref CALIB_FIX_INTRINSIC Fix cameraMatrix? and distCoeffs? so that only R, T, E, and F
@@ -1091,6 +1100,7 @@ CV_EXPORTS_AS(stereoCalibrateExtended) double stereoCalibrate( InputArrayOfArray
10911100
InputOutputArray cameraMatrix1, InputOutputArray distCoeffs1,
10921101
InputOutputArray cameraMatrix2, InputOutputArray distCoeffs2,
10931102
Size imageSize, InputOutputArray R, InputOutputArray T, OutputArray E, OutputArray F,
1103+
OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs,
10941104
OutputArray perViewErrors,int flags = CALIB_FIX_INTRINSIC,
10951105
TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,100,1e-6) );
10961106

@@ -1103,6 +1113,14 @@ CV_EXPORTS_W double stereoCalibrate( InputArrayOfArrays objectPoints,
11031113
int flags = CALIB_FIX_INTRINSIC,
11041114
TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,100,1e-6) );
11051115

1116+
/// @overload
1117+
CV_EXPORTS_WdoublestereoCalibrate( InputArrayOfArrays objectPoints,
1118+
InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,
1119+
InputOutputArray cameraMatrix1, InputOutputArray distCoeffs1,
1120+
InputOutputArray cameraMatrix2, InputOutputArray distCoeffs2,
1121+
Size imageSize, InputOutputArray R, InputOutputArray T, OutputArray E, OutputArray F,
1122+
OutputArray perViewErrors,int flags = CALIB_FIX_INTRINSIC,
1123+
TermCriteria criteria = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS,30,1e-6) );
11061124

11071125
/** @brief Computes Hand-Eye calibration: \f$_{}^{g}\textrm{T}_c\f$
11081126
@@ -1635,6 +1653,15 @@ similar to D1 .
16351653
@param imageSize Size of the image used only to initialize camera intrinsic matrix.
16361654
@param R Output rotation matrix between the 1st and the 2nd camera coordinate systems.
16371655
@param T Output translation vector between the coordinate systems of the cameras.
1656+
@param rvecs Output vector of rotation vectors ( @ref Rodrigues ) estimated for each pattern view in the
1657+
coordinate system of the first camera of the stereo pair (e.g. std::vector<cv::Mat>). More in detail, each
1658+
i-th rotation vector together with the corresponding i-th translation vector (see the next output parameter
1659+
description) brings the calibration pattern from the object coordinate space (in which object points are
1660+
specified) to the camera coordinate space of the first camera of the stereo pair. In more technical terms,
1661+
the tuple of the i-th rotation and translation vector performs a change of basis from object coordinate space
1662+
to camera coordinate space of the first camera of the stereo pair.
1663+
@param tvecs Output vector of translation vectors estimated for each pattern view, see parameter description
1664+
of previous output parameter ( rvecs ).
16381665
@param flags Different flags that may be zero or a combination of the following values:
16391666
- @ref fisheye::CALIB_FIX_INTRINSIC Fix K1, K2? and D1, D2? so that only R, T matrices
16401667
are estimated.
@@ -1650,9 +1677,15 @@ zero.
16501677
@param criteria Termination criteria for the iterative optimization algorithm.
16511678
*/
16521679
CV_EXPORTS_WdoublestereoCalibrate(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,
1653-
InputOutputArray K1, InputOutputArray D1, InputOutputArray K2, InputOutputArray D2, Size imageSize,
1654-
OutputArray R, OutputArray T,int flags = fisheye::CALIB_FIX_INTRINSIC,
1655-
TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS,100, DBL_EPSILON));
1680+
InputOutputArray K1, InputOutputArray D1, InputOutputArray K2, InputOutputArray D2, Size imageSize,
1681+
OutputArray R, OutputArray T, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs,int flags = fisheye::CALIB_FIX_INTRINSIC,
1682+
TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS,100, DBL_EPSILON));
1683+
1684+
/// @overload
1685+
CV_EXPORTS_WdoublestereoCalibrate(InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2,
1686+
InputOutputArray K1, InputOutputArray D1, InputOutputArray K2, InputOutputArray D2, Size imageSize,
1687+
OutputArray R, OutputArray T,int flags = fisheye::CALIB_FIX_INTRINSIC,
1688+
TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS,100, DBL_EPSILON));
16561689

16571690
//! @} calib3d_fisheye
16581691
}//end namespace fisheye

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp