Ocean
Loading...
Searching...
No Matches
TestFASTDetector.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_FAST_DETECTOR_H
9#define META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_FAST_DETECTOR_H
10
12
14
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestCV
24{
25
26namespace TestDetector
27{
28
29/**
30 * This class implements a FAST feature detector test.
31 * @ingroup testcvdetector
32 */
33class OCEAN_TEST_CV_DETECTOR_EXPORT TestFASTDetector
34{
35 public:
36
37 /**
38 * Tests the FAST feature detector.
39 * @param frame Test frame to be used for feature detection, must be valid with a dimension larger than 7x7
40 * @param testDuration Number of seconds for each test, with range (0, infinity)
41 * @param worker The worker object
42 * @param selector The test selector to filter tests
43 * @return True, if succeeded
44 */
45 static bool test(const Frame& frame, const double testDuration, Worker& worker, const TestSelector& selector);
46
47 /**
48 * Tests the FAST feature detector with standard strength determination.
49 * @param yFrame The frame which will be used for testing, with pixel format FORMAT_Y8, must be valid
50 * @param testDuration Number of seconds for each test, with range (0, infinity)
51 * @param worker The worker object
52 * @return True, if succeeded
53 */
54 static bool testStandardStrength(const Frame& yFrame, const double testDuration, Worker& worker);
55
56 /**
57 * Tests the FAST feature detector with precise strength determination.
58 * @param yFrame The frame which will be used for testing, with pixel format FORMAT_Y8, must be valid
59 * @param testDuration Number of seconds for each test, with range (0, infinity)
60 * @param worker The worker object
61 * @return True, if succeeded
62 */
63 static bool testPreciseStrength(const Frame& yFrame, const double testDuration, Worker& worker);
64
65 private:
66
67 /**
68 * Validates already detected FAST features.
69 * @param yFrame The frame in which the features have been detected, must be valid
70 * @param threshold FAST feature detection threshold
71 * @param features Already detected FAST features
72 * @return True, if succeeded
73 */
74 static bool validate(const Frame& yFrame, const unsigned int threshold, const CV::Detector::FASTFeatures& features);
75
76 /**
77 * Sorts two detector points.
78 * @param first First detector point
79 * @param second Second detector point
80 * @return True, if the first point should be located before the second point
81 */
82 static bool sortPoints(const CV::Detector::FASTFeature& first, const CV::Detector::FASTFeature& second);
83};
84
85}
86
87}
88
89}
90
91}
92
93#endif // META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_FAST_DETECTOR_H
This class implements a FAST feature.
Definition FASTFeature.h:37
This class implements Ocean's image class.
Definition Frame.h:1879
This class implements a FAST feature detector test.
Definition TestFASTDetector.h:34
static bool testStandardStrength(const Frame &yFrame, const double testDuration, Worker &worker)
Tests the FAST feature detector with standard strength determination.
static bool test(const Frame &frame, const double testDuration, Worker &worker, const TestSelector &selector)
Tests the FAST feature detector.
static bool testPreciseStrength(const Frame &yFrame, const double testDuration, Worker &worker)
Tests the FAST feature detector with precise strength determination.
static bool validate(const Frame &yFrame, const unsigned int threshold, const CV::Detector::FASTFeatures &features)
Validates already detected FAST features.
static bool sortPoints(const CV::Detector::FASTFeature &first, const CV::Detector::FASTFeature &second)
Sorts two detector points.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
std::vector< FASTFeature > FASTFeatures
Definition of a vector holding FAST features.
Definition FASTFeature.h:30
The namespace covering the entire Ocean framework.
Definition Accessor.h:15