Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/features2d/test/test_detectors_invariance.cpp
16339 views
1
// This file is part of OpenCV project.
2
// It is subject to the license terms in the LICENSE file found in the top-level directory
3
// of this distribution and at http://opencv.org/license.html
4
5
#include "test_precomp.hpp"
6
#include "test_invariance_utils.hpp"
7
8
#include "test_detectors_invariance.impl.hpp"
9
10
namespace opencv_test { namespace {
11
12
const static std::string IMAGE_TSUKUBA = "features2d/tsukuba.png";
13
const static std::string IMAGE_BIKES = "detectors_descriptors_evaluation/images_datasets/bikes/img1.png";
14
#define Value(...) Values(make_tuple(__VA_ARGS__))
15
16
/*
17
* Detector's rotation invariance check
18
*/
19
20
INSTANTIATE_TEST_CASE_P(BRISK, DetectorRotationInvariance,
21
Value(IMAGE_TSUKUBA, BRISK::create(), 0.45f, 0.76f));
22
23
INSTANTIATE_TEST_CASE_P(ORB, DetectorRotationInvariance,
24
Value(IMAGE_TSUKUBA, ORB::create(), 0.5f, 0.76f));
25
26
INSTANTIATE_TEST_CASE_P(AKAZE, DetectorRotationInvariance,
27
Value(IMAGE_TSUKUBA, AKAZE::create(), 0.5f, 0.71f));
28
29
INSTANTIATE_TEST_CASE_P(AKAZE_DESCRIPTOR_KAZE, DetectorRotationInvariance,
30
Value(IMAGE_TSUKUBA, AKAZE::create(AKAZE::DESCRIPTOR_KAZE), 0.5f, 0.71f));
31
32
/*
33
* Detector's scale invariance check
34
*/
35
36
INSTANTIATE_TEST_CASE_P(BRISK, DetectorScaleInvariance,
37
Value(IMAGE_BIKES, BRISK::create(), 0.08f, 0.49f));
38
39
INSTANTIATE_TEST_CASE_P(ORB, DetectorScaleInvariance,
40
Value(IMAGE_BIKES, ORB::create(), 0.08f, 0.49f));
41
42
INSTANTIATE_TEST_CASE_P(KAZE, DetectorScaleInvariance,
43
Value(IMAGE_BIKES, KAZE::create(), 0.08f, 0.49f));
44
45
INSTANTIATE_TEST_CASE_P(AKAZE, DetectorScaleInvariance,
46
Value(IMAGE_BIKES, AKAZE::create(), 0.08f, 0.49f));
47
48
INSTANTIATE_TEST_CASE_P(AKAZE_DESCRIPTOR_KAZE, DetectorScaleInvariance,
49
Value(IMAGE_BIKES, AKAZE::create(AKAZE::DESCRIPTOR_KAZE), 0.08f, 0.49f));
50
51
}} // namespace
52
53