Fix compilation problems with XCode 7.1.1 and cmake 3.3.2
This commit is contained in:
@@ -1480,7 +1480,7 @@ void CV_StereoCalibrationTest::run( int )
|
||||
|
||||
if( norm(R1t*R1 - eye33) > 0.01 ||
|
||||
norm(R2t*R2 - eye33) > 0.01 ||
|
||||
abs(determinant(F)) > 0.01)
|
||||
std::abs(determinant(F)) > 0.01)
|
||||
{
|
||||
ts->printf( cvtest::TS::LOG, "The computed (by rectify) R1 and R2 are not orthogonal,"
|
||||
"or the computed (by calibrate) F is not singular, testcase %d\n", testcase);
|
||||
@@ -1617,7 +1617,7 @@ void CV_StereoCalibrationTest::run( int )
|
||||
perspectiveTransform( _imgpt1, rectifPoints1, _H1 );
|
||||
perspectiveTransform( _imgpt2, rectifPoints2, _H2 );
|
||||
|
||||
bool verticalStereo = abs(P2.at<double>(0,3)) < abs(P2.at<double>(1,3));
|
||||
bool verticalStereo = std::abs(P2.at<double>(0,3)) < std::abs(P2.at<double>(1,3));
|
||||
double maxDiff_c = 0, maxDiff_uc = 0;
|
||||
for( int i = 0, k = 0; i < nframes; i++ )
|
||||
{
|
||||
@@ -1627,9 +1627,9 @@ void CV_StereoCalibrationTest::run( int )
|
||||
|
||||
for( int j = 0; j < npoints; j++, k++ )
|
||||
{
|
||||
double diff_c = verticalStereo ? abs(temp[0][j].x - temp[1][j].x) : abs(temp[0][j].y - temp[1][j].y);
|
||||
double diff_c = verticalStereo ? std::abs(temp[0][j].x - temp[1][j].x) : std::abs(temp[0][j].y - temp[1][j].y);
|
||||
Point2f d = rectifPoints1.at<Point2f>(k,0) - rectifPoints2.at<Point2f>(k,0);
|
||||
double diff_uc = verticalStereo ? abs(d.x) : abs(d.y);
|
||||
double diff_uc = verticalStereo ? std::abs(d.x) : std::abs(d.y);
|
||||
maxDiff_c = max(maxDiff_c, diff_c);
|
||||
maxDiff_uc = max(maxDiff_uc, diff_uc);
|
||||
if( maxDiff_c > maxScanlineDistErr_c )
|
||||
|
@@ -381,7 +381,7 @@ TEST_F(fisheyeTest, EtimateUncertainties)
|
||||
EXPECT_MAT_NEAR(errors.c, cv::Vec2d(0.890439368129246, 0.816096854937896), 1e-10);
|
||||
EXPECT_MAT_NEAR(errors.k, cv::Vec4d(0.00516248605191506, 0.0168181467500934, 0.0213118690274604, 0.00916010877545648), 1e-10);
|
||||
EXPECT_MAT_NEAR(err_std, cv::Vec2d(0.187475975266883, 0.185678953263995), 1e-10);
|
||||
CV_Assert(abs(rms - 0.263782587133546) < 1e-10);
|
||||
CV_Assert(std::abs(rms - 0.263782587133546) < 1e-10);
|
||||
CV_Assert(errors.alpha == 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user