Ocean
testopencv/TestFrameMinMax.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_TESTOPENCV_TEST_FRAME_MIN_MAX_H
9 #define META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_MIN_MAX_H
10 
12 
13 namespace Ocean
14 {
15 
16 namespace Test
17 {
18 
19 namespace TestCV
20 {
21 
22 namespace TestOpenCV
23 {
24 
25 /**
26  * This class benchmarks the performance of the minmax functionality of OpenCV.
27  * @ingroup testcvopencv
28  */
29 class OCEAN_TEST_CV_OPENCV_EXPORT TestFrameMinMax
30 {
31  public:
32 
33  /**
34  * Benchmarks min-max functions.
35  * @param testDuration Number of seconds for each test, with range (0, infinity)
36  */
37  static void test(const double testDuration);
38 
39  private:
40 
41  /**
42  * Benchmarks the performance of function allowing to determine the location of a minimum value within a 1-channel frame.
43  * @param testDuration Number of seconds for each test, with range (0, infinity)
44  */
45  static void testMinLocation(const double testDuration);
46 
47  /**
48  * Benchmarks the performance of function allowing to determine the location of a maximum value within a 1-channel frame.
49  * @param testDuration Number of seconds for each test, with range (0, infinity)
50  */
51  static void testMaxLocation(const double testDuration);
52 
53  /**
54  * Benchmarks the performance of function allowing to determine the location of a minimum value within a 1-channel frame.
55  * @param width The width of the frame to cast, with range [1, infinity)
56  * @param height The height of the frame to cast, with range [1, infinity)
57  * @param testDuration Number of seconds for each test, with range (0, infinity)
58  * @tparam T The data type of each pixel value
59  */
60  template <typename T>
61  static void testMinLocation(const unsigned int width, const unsigned int height, const double testDuration);
62 
63  /**
64  * Benchmarks the performance of function allowing to determine the location of a maximum value within a 1-channel frame.
65  * @param width The width of the frame to cast, with range [1, infinity)
66  * @param height The height of the frame to cast, with range [1, infinity)
67  * @param testDuration Number of seconds for each test, with range (0, infinity)
68  * @tparam T The data type of each pixel value
69  */
70  template <typename T>
71  static void testMaxLocation(const unsigned int width, const unsigned int height, const double testDuration);
72 };
73 
74 }
75 
76 }
77 
78 }
79 
80 }
81 
82 #endif // META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_MIN_MAX_H
This class benchmarks the performance of the minmax functionality of OpenCV.
Definition: testopencv/TestFrameMinMax.h:30
static void testMinLocation(const double testDuration)
Benchmarks the performance of function allowing to determine the location of a minimum value within a...
static void testMaxLocation(const unsigned int width, const unsigned int height, const double testDuration)
Benchmarks the performance of function allowing to determine the location of a maximum value within a...
static void test(const double testDuration)
Benchmarks min-max functions.
static void testMinLocation(const unsigned int width, const unsigned int height, const double testDuration)
Benchmarks the performance of function allowing to determine the location of a minimum value within a...
static void testMaxLocation(const double testDuration)
Benchmarks the performance of function allowing to determine the location of a maximum value within a...
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15