Ocean
TestImageQuality.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_IMAGE_QUALITY_H
9 #define OCEAN_TEST_TESTCV_TEST_IMAGE_QUALITY_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 ImageQuality class.
26  * @ingroup testcv
27  */
28 class OCEAN_TEST_CV_EXPORT TestImageQuality
29 {
30  public:
31 
32  /**
33  * Starts all tests of the ImageQuality 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  * Applies a stress test for structural similarity calculation ensuring that the function does not crash.
44  * @param testDuration Number of seconds for each test, with range (0, infinity)
45  * @param worker The worker object to distribute the computational load
46  * @return True, if succeeded
47  */
48  static bool testStructuralSimilarityStressTest(const double testDuration, Worker& worker);
49 
50  /**
51  * Applies a stress test for multi-scale structural similarity calculation ensuring that the function does not crash.
52  * @param testDuration Number of seconds for each test, with range (0, infinity)
53  * @param worker The worker object to distribute the computational load
54  * @return True, if succeeded
55  */
56  static bool testMultiScaleStructuralSimilarityStressTest(const double testDuration, Worker& worker);
57 };
58 
59 }
60 
61 }
62 
63 }
64 
65 #endif // OCEAN_TEST_TESTCV_TEST_IMAGE_QUALITY_H
This class implements tests for the ImageQuality class.
Definition: TestImageQuality.h:29
static bool testStructuralSimilarityStressTest(const double testDuration, Worker &worker)
Applies a stress test for structural similarity calculation ensuring that the function does not crash...
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Starts all tests of the ImageQuality class.
static bool testMultiScaleStructuralSimilarityStressTest(const double testDuration, Worker &worker)
Applies a stress test for multi-scale structural similarity calculation ensuring that the function do...
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