2017-06-21 19:33:09 +08:00
|
|
|
// This file is part of OpenCV project.
|
|
|
|
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
|
|
// of this distribution and at http://opencv.org/license.html
|
|
|
|
|
|
|
|
#include "test_precomp.hpp"
|
|
|
|
#include "test_invariance_utils.hpp"
|
|
|
|
|
2018-09-07 21:31:01 +08:00
|
|
|
#include "test_descriptors_invariance.impl.hpp"
|
2017-06-21 19:33:09 +08:00
|
|
|
|
2018-09-07 21:31:01 +08:00
|
|
|
namespace opencv_test { namespace {
|
2017-06-21 19:33:09 +08:00
|
|
|
|
|
|
|
const static std::string IMAGE_TSUKUBA = "features2d/tsukuba.png";
|
|
|
|
const static std::string IMAGE_BIKES = "detectors_descriptors_evaluation/images_datasets/bikes/img1.png";
|
2018-09-07 21:31:01 +08:00
|
|
|
#define Value(...) Values(make_tuple(__VA_ARGS__))
|
2017-06-21 19:33:09 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Descriptors's rotation invariance check
|
|
|
|
*/
|
|
|
|
|
2020-04-21 14:58:21 +08:00
|
|
|
INSTANTIATE_TEST_CASE_P(SIFT, DescriptorRotationInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_TSUKUBA, []() { return SIFT::create(); }, []() { return SIFT::create(); }, 0.98f));
|
2020-04-21 14:58:21 +08:00
|
|
|
|
2017-06-21 19:33:09 +08:00
|
|
|
INSTANTIATE_TEST_CASE_P(BRISK, DescriptorRotationInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_TSUKUBA, []() { return BRISK::create(); }, []() { return BRISK::create(); }, 0.99f));
|
2017-06-21 19:33:09 +08:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(ORB, DescriptorRotationInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_TSUKUBA, []() { return ORB::create(); }, []() { return ORB::create(); }, 0.99f));
|
2017-06-21 19:33:09 +08:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(AKAZE, DescriptorRotationInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_TSUKUBA, []() { return AKAZE::create(); }, []() { return AKAZE::create(); }, 0.99f));
|
2017-06-21 19:33:09 +08:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(AKAZE_DESCRIPTOR_KAZE, DescriptorRotationInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_TSUKUBA, []() { return AKAZE::create(AKAZE::DESCRIPTOR_KAZE); }, []() { return AKAZE::create(AKAZE::DESCRIPTOR_KAZE); }, 0.99f));
|
2017-06-21 19:33:09 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Descriptor's scale invariance check
|
|
|
|
*/
|
|
|
|
|
2020-06-25 19:34:31 +08:00
|
|
|
INSTANTIATE_TEST_CASE_P(SIFT, DescriptorScaleInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_BIKES, []() { return SIFT::create(0, 3, 0.09); }, []() { return SIFT::create(0, 3, 0.09); }, 0.78f));
|
2020-04-21 14:58:21 +08:00
|
|
|
|
2017-06-21 19:33:09 +08:00
|
|
|
INSTANTIATE_TEST_CASE_P(AKAZE, DescriptorScaleInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_BIKES, []() { return AKAZE::create(); }, []() { return AKAZE::create(); }, 0.6f));
|
2017-06-21 19:33:09 +08:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(AKAZE_DESCRIPTOR_KAZE, DescriptorScaleInvariance,
|
2024-04-17 19:19:05 +08:00
|
|
|
Value(IMAGE_BIKES, []() { return AKAZE::create(AKAZE::DESCRIPTOR_KAZE); }, []() { return AKAZE::create(AKAZE::DESCRIPTOR_KAZE); }, 0.55f));
|
2017-11-05 21:48:40 +08:00
|
|
|
|
|
|
|
}} // namespace
|