Ocean
TestFrameInverter.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 OCEAN_TEST_TESTCV_TEST_FRAME_INVERTER_H
9 #define OCEAN_TEST_TESTCV_TEST_FRAME_INVERTER_H
10 
12 
13 #include "ocean/base/Worker.h"
14 
15 namespace Ocean
16 {
17 
18 namespace Test
19 {
20 
21 namespace TestCV
22 {
23 
24 /**
25  * This class implements tests for the FrameInverter class.
26  * @ingroup testcv
27  */
28 class OCEAN_TEST_CV_EXPORT TestFrameInverter
29 {
30  public:
31 
32  /**
33  * Starts all tests of the FrameInverter class.
34  * @param width The width of the test frame in pixel, with range [1, infinity)
35  * @param height The height of the test frame in pixel, with range [1, infinity)
36  * @param testDuration Number of seconds for each test, with range (0, infinity)
37  * @param worker The worker object to distribute the computational load
38  * @return True, if succeeded
39  */
40  static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
41 
42  /**
43  * Tests the invert function for images with 8 bit per channel.
44  * @param width The width of the test frame in pixel, with range [1, infinity)
45  * @param height The height of the test frame in pixel, with range [1, infinity)
46  * @param channels The number of frame channels, with range [1, infinity)
47  * @param testDuration Number of seconds for each test, with range (0, infinity)
48  * @param worker The worker object to distribute the computational load
49  * @return True, if succeeded
50  */
51  static bool testInvert8BitPerChannel(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker& worker);
52 };
53 
54 }
55 
56 }
57 
58 }
59 
60 #endif // OCEAN_TEST_TESTCV_TEST_FRAME_INVERTER_H
This class implements tests for the FrameInverter class.
Definition: TestFrameInverter.h:29
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Starts all tests of the FrameInverter class.
static bool testInvert8BitPerChannel(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker &worker)
Tests the invert function for images with 8 bit per channel.
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15