Ocean
Loading...
Searching...
No Matches
TestFREAKDescriptor.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_FREAK_DESCRIPTOR_H
9#define META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_FREAK_DESCRIPTOR_H
10
12
14
16
18
19namespace Ocean
20{
21
22namespace Test
23{
24
25namespace TestCV
26{
27
28namespace TestDetector
29{
30
31/// Forward-declaration of the test class for FREAK descriptors
32template <size_t tSize>
33class TestFREAKDescriptorT;
34
35/// Typedef for the test class of the 32-bytes long FREAK descriptors
37
38/// Typedef for the test class of the 64-bytes long FREAK descriptors
40
41/**
42 * This class implements a test for the FREAK descriptor.
43 * @tparam tSize The size of the FREAK descriptor to test, in bytes, either 32 or 64
44 * @ingroup testcvdetector
45 */
46template <size_t tSize>
47class OCEAN_TEST_CV_DETECTOR_EXPORT TestFREAKDescriptorT : public CV::Detector::FREAKDescriptorT<tSize>
48{
49 public:
50
51 /**
52 * Invokes all test for the FREAK descriptor.
53 * @param testDuration Number of seconds for each test, with range (0, infinity)
54 * @param worker The worker object
55 * @return True, if succeeded
56 */
57 static bool test(const double testDuration, Worker& worker);
58
59 /**
60 * Test the function creating a blurred frame pyramid.
61 * @param testDuration Number of seconds that this test will be run, range: (0, infinity)
62 * @param worker The worker object
63 * @return True if the test has passed, otherwise false
64 */
65 static bool testCreateBlurredFramePyramid(const double testDuration, Worker& worker);
66};
67
68#ifdef OCEAN_USE_EXTERNAL_TEST_FREAK_DESCRIPTOR
69
70/**
71 * Invokes all test for the FREAK descriptor.
72 * @param testDuration Number of seconds for each test, with range (0, infinity)
73 * @param worker The worker object
74 * @return True, if succeeded
75 * @tparam tSize The size of the FREAK descriptor in bytes, valid values: {32, 64}
76 */
77template <size_t tSize>
78bool TestFREAKDescriptorT_externalTests(const double testDuration, Worker& worker);
79
80#endif // OCEAN_USE_EXTERNAL_TEST_FREAK_DESCRIPTOR
81
82} // namespace TestDetector
83
84} // namespace TestCV
85
86} // namespace Test
87
88} // namespace Ocean
89
90#endif // META_OCEAN_TEST_TESTCV_TESTDETECTOR_TEST_FREAK_DESCRIPTOR_H
Forward-declaration of the descriptor class.
Definition FREAKDescriptor.h:84
Forward-declaration of the test class for FREAK descriptors.
Definition TestFREAKDescriptor.h:48
static bool test(const double testDuration, Worker &worker)
Invokes all test for the FREAK descriptor.
static bool testCreateBlurredFramePyramid(const double testDuration, Worker &worker)
Test the function creating a blurred frame pyramid.
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
TestFREAKDescriptorT< 32 > TestFREAKDescriptor32
Typedef for the test class of the 32-bytes long FREAK descriptors.
Definition TestFREAKDescriptor.h:36
TestFREAKDescriptorT< 64 > TestFREAKDescriptor64
Typedef for the test class of the 64-bytes long FREAK descriptors.
Definition TestFREAKDescriptor.h:39
bool TestFREAKDescriptorT_externalTests(const double testDuration, Worker &worker)
Invokes all test for the FREAK descriptor.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15