Ocean
Loading...
Searching...
No Matches
TestSumSquareDifferencesNoCenter.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_TESTADVANCED_SUM_SQUARE_DIFFERENCES_NO_CENTER_H
9#define META_OCEAN_TEST_TESTCV_TESTADVANCED_SUM_SQUARE_DIFFERENCES_NO_CENTER_H
10
12
14
15namespace Ocean
16{
17
18namespace Test
19{
20
21namespace TestCV
22{
23
24namespace TestAdvanced
25{
26
27/**
28 * This class implements sum square differences omitting the center pixel tests.
29 * @ingroup testcvadvanced
30 */
31class OCEAN_TEST_CV_ADVANCED_EXPORT TestSumSquareDifferencesNoCenter
32{
33 protected:
34
35 /**
36 * Definition of individual types of implementation.
37 */
38 enum ImplementationType : uint32_t
39 {
40 /// The naive implementation.
42 /// The template-based implementation.
44 /// The SSE-based implementation.
46 /// The NEON-based implementation.
48 /// The default implementation (which is actually used by default).
49 IT_DEFAULT
50 };
51
52 public:
53
54 /**
55 * Invokes all test functions.
56 * @param testDuration Number of seconds for each test, with range (0, infinity)
57 * @param selector The test selector to filter tests
58 * @return True, if succeeded
59 */
60 static bool test(const double testDuration, const TestSelector& selector);
61
62 /**
63 * Tests the sum square differences function for two pixel accurate patches in two images.
64 * @param testDuration Number of seconds for each test, with range (0, infinity)
65 * @return True, if succeeded
66 */
67 static bool testPatch8BitPerChannel(const double testDuration);
68
69 private:
70
71 /**
72 * Tests the sum square differences function for two pixel accurate patches in two images.
73 * @param width The width of the test image, in pixel, with range [tSize, infinity)
74 * @param height The height of the test image, in pixel, with range [tSize, infinity)
75 * @param testDuration Number of seconds for each test, with range (0, infinity)
76 * @return True, if succeeded
77 * @tparam tChannels The number of frame channels, with range [1, infinity)
78 * @tparam tPatchSize The size of the patch, with range [1, infinity)
79 */
80 template <unsigned int tChannels, unsigned int tPatchSize>
81 static bool testPatch8BitPerChannel(const unsigned int width, const unsigned int height, const double testDuration);
82};
83
84}
85
86}
87
88}
89
90}
91
92#endif // META_OCEAN_TEST_TESTCV_TESTADVANCED_SUM_SQUARE_DIFFERENCES_NO_CENTER_H
This class implements sum square differences omitting the center pixel tests.
Definition TestSumSquareDifferencesNoCenter.h:32
static bool test(const double testDuration, const TestSelector &selector)
Invokes all test functions.
ImplementationType
Definition of individual types of implementation.
Definition TestSumSquareDifferencesNoCenter.h:39
@ IT_NAIVE
The naive implementation.
Definition TestSumSquareDifferencesNoCenter.h:41
@ IT_TEMPLATE
The template-based implementation.
Definition TestSumSquareDifferencesNoCenter.h:43
@ IT_SSE
The SSE-based implementation.
Definition TestSumSquareDifferencesNoCenter.h:45
@ IT_NEON
The NEON-based implementation.
Definition TestSumSquareDifferencesNoCenter.h:47
static bool testPatch8BitPerChannel(const double testDuration)
Tests the sum square differences function for two pixel accurate patches in two images.
static bool testPatch8BitPerChannel(const unsigned int width, const unsigned int height, const double testDuration)
Tests the sum square differences function for two pixel accurate patches in two images.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
The namespace covering the entire Ocean framework.
Definition Accessor.h:15