Add sanity checks to nonfree module
This commit is contained in:
parent
e8a173bcaf
commit
d970a9159e
@ -26,6 +26,8 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
|
|||||||
vector<KeyPoint> points;
|
vector<KeyPoint> points;
|
||||||
|
|
||||||
TEST_CYCLE() detector(frame, mask, points);
|
TEST_CYCLE() detector(frame, mask, points);
|
||||||
|
|
||||||
|
SANITY_CHECK_KEYPOINTS(points);
|
||||||
}
|
}
|
||||||
|
|
||||||
PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
|
PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
|
||||||
@ -45,6 +47,8 @@ PERF_TEST_P(surf, extract, testing::Values(SURF_IMAGES))
|
|||||||
detector(frame, mask, points);
|
detector(frame, mask, points);
|
||||||
|
|
||||||
TEST_CYCLE() detector(frame, mask, points, descriptors, true);
|
TEST_CYCLE() detector(frame, mask, points, descriptors, true);
|
||||||
|
|
||||||
|
SANITY_CHECK(descriptors, 1e-4);
|
||||||
}
|
}
|
||||||
|
|
||||||
PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
|
PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
|
||||||
@ -62,4 +66,7 @@ PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
|
|||||||
vector<float> descriptors;
|
vector<float> descriptors;
|
||||||
|
|
||||||
TEST_CYCLE() detector(frame, mask, points, descriptors, false);
|
TEST_CYCLE() detector(frame, mask, points, descriptors, false);
|
||||||
|
|
||||||
|
SANITY_CHECK_KEYPOINTS(points);
|
||||||
|
SANITY_CHECK(descriptors, 1e-4);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user