Ocean
testopencv/TestFrameConverter.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_CONVERTER_H
9 #define META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_CONVERTER_H
10 
12 
13 #include <opencv2/core.hpp>
14 
15 namespace Ocean
16 {
17 
18 namespace Test
19 {
20 
21 namespace TestCV
22 {
23 
24 namespace TestOpenCV
25 {
26 
27 /**
28  * This class tests the performance of the frame converter function of OpenCV.
29  * @ingroup testcvopencv
30  */
31 class OCEAN_TEST_CV_OPENCV_EXPORT TestFrameConverter
32 {
33  public:
34 
35  /**
36  * Benchmarks frame converter functions.
37  * @param testDuration Number of seconds for each test, with range (0, infinity)
38  */
39  static void test(const double testDuration);
40 
41  private:
42 
43  /**
44  * Benchmarks the performance of cast of a frame.
45  * @param testDuration Number of seconds for each test, with range (0, infinity)
46  */
47  static void testCast(const double testDuration);
48 
49  /**
50  * Benchmarks the performance of cast of a frame.
51  * @param width The width of the frame to cast, with range [1, infinity)
52  * @param height The height of the frame to cast, with range [1, infinity)
53  * @param channels The nmber of frame channels, with range [1, infinity)
54  * @param testDuration Number of seconds for each test, with range (0, infinity)
55  */
56  static void testCast(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration);
57 };
58 
59 }
60 
61 }
62 
63 }
64 
65 }
66 
67 #endif // META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_FRAME_CONVERTER_H
This class tests the performance of the frame converter function of OpenCV.
Definition: testopencv/TestFrameConverter.h:32
static void testCast(const double testDuration)
Benchmarks the performance of cast of a frame.
static void test(const double testDuration)
Benchmarks frame converter functions.
static void testCast(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration)
Benchmarks the performance of cast of a frame.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15