mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 13:10:12 +08:00
Fixed sanity checks in several performance tests
This commit is contained in:
parent
b5ecb1d32d
commit
e3be5f138a
@ -55,7 +55,7 @@ PERF_TEST_P(PointsNum_Algo, solvePnP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SANITY_CHECK(rvec, 1e-6);
|
SANITY_CHECK(rvec, 1e-6);
|
||||||
SANITY_CHECK(tvec, 1e-6);
|
SANITY_CHECK(tvec, 1e-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
PERF_TEST(PointsNum_Algo, solveP3P)
|
PERF_TEST(PointsNum_Algo, solveP3P)
|
||||||
|
@ -25,12 +25,12 @@ PERF_TEST_P(Size_MatType, addWeighted, TYPICAL_MATS_ADWEIGHTED)
|
|||||||
|
|
||||||
if (CV_MAT_DEPTH(type) == CV_32S)
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
||||||
{
|
{
|
||||||
//see ticket 1529: absdiff can be without saturation on 32S
|
// there might be not enough precision for integers
|
||||||
src1 /= 8;
|
src1 /= 2048;
|
||||||
src2 /= 8;
|
src2 /= 2048;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CYCLE() cv::addWeighted( src1, alpha, src2, beta, gamma, dst, dst.type() );
|
TEST_CYCLE() cv::addWeighted( src1, alpha, src2, beta, gamma, dst, dst.type() );
|
||||||
|
|
||||||
SANITY_CHECK(dst);
|
SANITY_CHECK(dst, 1);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ PERF_TEST_P(orb, detect, testing::Values(ORB_IMAGES))
|
|||||||
|
|
||||||
Mat mask;
|
Mat mask;
|
||||||
declare.in(frame);
|
declare.in(frame);
|
||||||
ORB detector(1500, 1.3f, 5);
|
ORB detector(1500, 1.3f, 1);
|
||||||
vector<KeyPoint> points;
|
vector<KeyPoint> points;
|
||||||
|
|
||||||
TEST_CYCLE() detector(frame, mask, points);
|
TEST_CYCLE() detector(frame, mask, points);
|
||||||
@ -42,7 +42,7 @@ PERF_TEST_P(orb, extract, testing::Values(ORB_IMAGES))
|
|||||||
Mat mask;
|
Mat mask;
|
||||||
declare.in(frame);
|
declare.in(frame);
|
||||||
|
|
||||||
ORB detector(1500, 1.3f, 5);
|
ORB detector(1500, 1.3f, 1);
|
||||||
vector<KeyPoint> points;
|
vector<KeyPoint> points;
|
||||||
detector(frame, mask, points);
|
detector(frame, mask, points);
|
||||||
sort(points.begin(), points.end(), comparators::KeypointGreater());
|
sort(points.begin(), points.end(), comparators::KeypointGreater());
|
||||||
@ -64,7 +64,7 @@ PERF_TEST_P(orb, full, testing::Values(ORB_IMAGES))
|
|||||||
|
|
||||||
Mat mask;
|
Mat mask;
|
||||||
declare.in(frame);
|
declare.in(frame);
|
||||||
ORB detector(1500, 1.3f, 5);
|
ORB detector(1500, 1.3f, 1);
|
||||||
|
|
||||||
vector<KeyPoint> points;
|
vector<KeyPoint> points;
|
||||||
Mat descriptors;
|
Mat descriptors;
|
||||||
|
@ -43,7 +43,7 @@ PERF_TEST_P( TestWarpAffine, WarpAffine,
|
|||||||
|
|
||||||
TEST_CYCLE() warpAffine( src, dst, warpMat, sz, interType, borderMode, Scalar::all(150) );
|
TEST_CYCLE() warpAffine( src, dst, warpMat, sz, interType, borderMode, Scalar::all(150) );
|
||||||
|
|
||||||
SANITY_CHECK(dst);
|
SANITY_CHECK(dst, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ PERF_TEST_P( TestWarpPerspective, WarpPerspective,
|
|||||||
|
|
||||||
TEST_CYCLE() warpPerspective( src, dst, warpMat, sz, interType, borderMode, Scalar::all(150) );
|
TEST_CYCLE() warpPerspective( src, dst, warpMat, sz, interType, borderMode, Scalar::all(150) );
|
||||||
|
|
||||||
SANITY_CHECK(dst);
|
SANITY_CHECK(dst, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
PERF_TEST_P( TestWarpPerspectiveNear_t, WarpPerspectiveNear,
|
PERF_TEST_P( TestWarpPerspectiveNear_t, WarpPerspectiveNear,
|
||||||
|
@ -12,13 +12,10 @@ typedef perf::TestBaseWithParam<ImageName_MinSize_t> ImageName_MinSize;
|
|||||||
|
|
||||||
PERF_TEST_P(ImageName_MinSize, CascadeClassifierLBPFrontalFace,
|
PERF_TEST_P(ImageName_MinSize, CascadeClassifierLBPFrontalFace,
|
||||||
testing::Combine(testing::Values( std::string("cv/shared/lena.png"),
|
testing::Combine(testing::Values( std::string("cv/shared/lena.png"),
|
||||||
std::string("cv/shared/1_itseez-0000247.png"),
|
|
||||||
std::string("cv/shared/1_itseez-0000289.png"),
|
std::string("cv/shared/1_itseez-0000289.png"),
|
||||||
std::string("cv/shared/1_itseez-0000492.png"),
|
std::string("cv/shared/1_itseez-0000492.png"),
|
||||||
std::string("cv/shared/1_itseez-0000573.png"),
|
std::string("cv/shared/1_itseez-0000573.png"),
|
||||||
std::string("cv/shared/1_itseez-0000803.png"),
|
|
||||||
std::string("cv/shared/1_itseez-0000892.png"),
|
std::string("cv/shared/1_itseez-0000892.png"),
|
||||||
std::string("cv/shared/1_itseez-0000984.png"),
|
|
||||||
std::string("cv/shared/1_itseez-0001238.png"),
|
std::string("cv/shared/1_itseez-0001238.png"),
|
||||||
std::string("cv/shared/1_itseez-0001438.png"),
|
std::string("cv/shared/1_itseez-0001438.png"),
|
||||||
std::string("cv/shared/1_itseez-0002524.png")),
|
std::string("cv/shared/1_itseez-0002524.png")),
|
||||||
@ -53,5 +50,5 @@ PERF_TEST_P(ImageName_MinSize, CascadeClassifierLBPFrontalFace,
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::sort(faces.begin(), faces.end(), comparators::RectLess());
|
std::sort(faces.begin(), faces.end(), comparators::RectLess());
|
||||||
SANITY_CHECK(faces);
|
SANITY_CHECK(faces, 3.001 * faces.size());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user