@@ -2118,6 +2118,44 @@ TEST(Calib3d_StereoCalibrate_CPP, extended)
2118
2118
EXPECT_TRUE (err.total () == 2 );
2119
2119
}
2120
2120
2121
+ TEST (Calib3d_StereoCalibrate, regression_10791)
2122
+ {
2123
+ const Matx33d M1 (
2124
+ 853.1387981631528 , 0 , 704.154907802121 ,
2125
+ 0 , 853.6445089162528 , 520.3600712930319 ,
2126
+ 0 , 0 , 1
2127
+ );
2128
+ const Matx33d M2 (
2129
+ 848.6090216909176 , 0 , 701.6162856852185 ,
2130
+ 0 , 849.7040162357157 , 509.1864036137 ,
2131
+ 0 , 0 , 1
2132
+ );
2133
+ const Matx<double , 14 , 1 > D1 (-6.463598629567206 , 79.00104930508179 , -0.0001006144444464403 , -0.0005437499822299972 ,
2134
+ 12.56900616588467 , -6.056719942752855 , 76.3842481414836 , 45.57460250612659 ,
2135
+ 0 , 0 , 0 , 0 , 0 , 0 );
2136
+ const Matx<double , 14 , 1 > D2 (0.6123436439798265 , -0.4671756923224087 , -0.0001261947899033442 , -0.000597334584036978 ,
2137
+ -0.05660119809538371 , 1.037075740629769 , -0.3076042835831711 , -0.2502169324283623 ,
2138
+ 0 , 0 , 0 , 0 , 0 , 0 );
2139
+
2140
+ const Matx33d R (
2141
+ 0.9999926627018476 , -0.0001095586963765905 , 0.003829169539302921 ,
2142
+ 0.0001021735876758584 , 0.9999981346680941 , 0.0019287874145156 ,
2143
+ -0.003829373712065528 , -0.001928382022437616 , 0.9999908085776333
2144
+ );
2145
+ const Matx31d T (-58.9161771697128 , -0.01581306249996402 , -0.8492960216760961 );
2146
+
2147
+ const Size imageSize (1280 , 960 );
2148
+
2149
+ Mat R1, R2, P1, P2, Q;
2150
+ Rect roi1, roi2;
2151
+ stereoRectify (M1, D1, M2, D2, imageSize, R, T,
2152
+ R1, R2, P1, P2, Q,
2153
+ CALIB_ZERO_DISPARITY, 1 , imageSize, &roi1, &roi2);
2154
+
2155
+ EXPECT_GE (roi1.area (), 400 *300 ) << roi1;
2156
+ EXPECT_GE (roi2.area (), 400 *300 ) << roi2;
2157
+ }
2158
+
2121
2159
TEST (Calib3d_Triangulate, accuracy)
2122
2160
{
2123
2161
// the testcase from http://code.opencv.org/issues/4334
0 commit comments