Fix sanity checks in improc perf tests
This commit is contained in:
@@ -15,7 +15,7 @@ PERF_TEST_P(Image_MaxCorners_QualityLevel_MinDistance_BlockSize_UseHarris, goodF
|
||||
testing::Values( 100, 500 ),
|
||||
testing::Values( 0.1, 0.01 ),
|
||||
testing::Values( 3, 5 ),
|
||||
testing::Bool()
|
||||
testing::Bool()
|
||||
)
|
||||
)
|
||||
{
|
||||
@@ -28,11 +28,14 @@ PERF_TEST_P(Image_MaxCorners_QualityLevel_MinDistance_BlockSize_UseHarris, goodF
|
||||
Mat image = imread(filename, IMREAD_GRAYSCALE);
|
||||
if (image.empty())
|
||||
FAIL() << "Unable to load source image" << filename;
|
||||
|
||||
|
||||
std::vector<Point2f> corners;
|
||||
|
||||
double minDistance = 1;
|
||||
TEST_CYCLE() goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, noArray(), blockSize, useHarrisDetector);
|
||||
|
||||
//SANITY_CHECK(corners);
|
||||
if (corners.size() > 50)
|
||||
corners.erase(corners.begin() + 50, corners.end());
|
||||
|
||||
SANITY_CHECK(corners);
|
||||
}
|
||||
|
Reference in New Issue
Block a user