Ocean
testopencv/TestFramePyramid.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_PYRAMID_H
9 #define META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_PYRAMID_H
10 
12 
14 
15 #include <opencv2/core.hpp>
16 
17 namespace Ocean
18 {
19 
20 namespace Test
21 {
22 
23 namespace TestCV
24 {
25 
26 namespace TestOpenCV
27 {
28 
29 /**
30  * This class implements performance tests for the frame pyramid of OpenCV.
31  * @ingroup testcvopencv
32  */
33 class OCEAN_TEST_CV_OPENCV_EXPORT TestFramePyramid : protected Test::TestCV::TestFrameShrinker
34 {
35  public:
36 
37  /**
38  * Benchmarks frame pyramid functions.
39  * @param testDuration Number of seconds for each test, with range (0, infinity)
40  */
41  static void test(const double testDuration);
42 
43  private:
44 
45  /**
46  * Benchmarks the performance of downsampling a frame.
47  * @param testDuration Number of seconds for each test, with range (0, infinity)
48  */
49  static void testFrameDownsampling(const double testDuration);
50 
51  /**
52  * Benchmarks the performance of creating a frame pyramid.
53  * @param testDuration Number of seconds for each test, with range (0, infinity)
54  */
55  static void testFramePyramid(const double testDuration);
56 
57  /**
58  * Benchmarks the performance of downsampling a frame.
59  * @param width The width of the frame to downsample, with range [2, infinity)
60  * @param height The height of the frame to downsample, with range [2, infinity)
61  * @param channels The nmber of frame channels, with range [1, infinity)
62  * @param testDuration Number of seconds for each test, with range (0, infinity)
63  */
64  static void testFrameDownsampling(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration);
65 
66  /**
67  * Benchmarks the performance of creating a frame pyramid.
68  * @param width The width of the finest pyramid layer, with range [2, infinity)
69  * @param height The height of the finest pyramid layer, with range [2, infinity)
70  * @param channels The nmber of frame channels, with range [1, infinity)
71  * @param testDuration Number of seconds for each test, with range (0, infinity)
72  */
73  static void testFramePyramid(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration);
74 };
75 
76 }
77 
78 }
79 
80 }
81 
82 }
83 
84 #endif // META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_PYRAMID_H
This class implements tests for the frame downsizing functions.
Definition: TestFrameShrinker.h:31
This class implements performance tests for the frame pyramid of OpenCV.
Definition: testopencv/TestFramePyramid.h:34
static void testFramePyramid(const double testDuration)
Benchmarks the performance of creating a frame pyramid.
static void testFrameDownsampling(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration)
Benchmarks the performance of downsampling a frame.
static void testFramePyramid(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration)
Benchmarks the performance of creating a frame pyramid.
static void testFrameDownsampling(const double testDuration)
Benchmarks the performance of downsampling a frame.
static void test(const double testDuration)
Benchmarks frame pyramid functions.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15