Commit d970a915 authored by Andrey Kamaev's avatar Andrey Kamaev

Add sanity checks to nonfree module

parent e8a173bc
...@@ -26,6 +26,8 @@ PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES)) ...@@ -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)) ...@@ -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)) ...@@ -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);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment