Ocean
TestMaskAnalyzer.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_TEST_MASK_ANALYZER_H
9 #define META_OCEAN_TEST_TESTCV_TEST_MASK_ANALYZER_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 a frame analyzer test.
26  * @ingroup testcv
27  */
28 class OCEAN_TEST_CV_EXPORT TestMaskAnalyzer
29 {
30  public:
31 
32  /**
33  * Tests all mask analyzer functions.
34  * @param width The width of a test mask in pixel, with range [1, infinity)
35  * @param height The height of a test mask in pixel, with range [1, infinity)
36  * @param testDuration The number of seconds for each test, with range [0, infinity)
37  * @param worker The worker object to distribute the computation
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 bounding box detection function.
44  * @param width The width of a test mask in pixel, with range [1, infinity)
45  * @param height The height of a test mask in pixel, with range [1, infinity)
46  * @param testDuration The number of seconds for each test, with range [0, infinity)
47  * @return True, if succeeded
48  */
49  static bool testDetectBoundingBox(const unsigned int width, const unsigned int height, const double testDuration);
50 
51  /**
52  * Tests the bounding box detection function widt given rough bounding box.
53  * @param width The width of a test mask in pixel, with range [1, infinity)
54  * @param height The height of a test mask in pixel, with range [1, infinity)
55  * @param testDuration The number of seconds for each test, with range [0, infinity)
56  * @return True, if succeeded
57  */
58  static bool testDetectBoundingBoxWithRoughGuess(const unsigned int width, const unsigned int height, const double testDuration);
59 
60  /**
61  * Tests the opaque bounding box detection function.
62  * @param width The width of a test mask in pixel, with range [1, infinity)
63  * @param height The height of a test mask in pixel, with range [1, infinity)
64  * @param testDuration The number of seconds for each test, with range [0, infinity)
65  * @param worker The worker object to distribute the computation
66  * @return True, if succeeded
67  */
68  static bool testDetectOpaqueBoundingBox(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
69 
70  /**
71  * Tests the hasValue() function.
72  * @param width The width of a test mask in pixel, with range [1, infinity)
73  * @param height The height of a test mask in pixel, with range [1, infinity)
74  * @param testDuration The number of seconds for each test, with range [0, infinity)
75  * @return True, if succeeded
76  */
77  static bool testHasValue(const unsigned int width, const unsigned int height, const double testDuration);
78 };
79 
80 }
81 
82 }
83 
84 }
85 
86 #endif // META_OCEAN_TEST_TESTCV_TEST_MASK_ANALYZER_H
This class implements a frame analyzer test.
Definition: TestMaskAnalyzer.h:29
static bool testHasValue(const unsigned int width, const unsigned int height, const double testDuration)
Tests the hasValue() function.
static bool testDetectBoundingBox(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bounding box detection function.
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests all mask analyzer functions.
static bool testDetectOpaqueBoundingBox(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the opaque bounding box detection function.
static bool testDetectBoundingBoxWithRoughGuess(const unsigned int width, const unsigned int height, const double testDuration)
Tests the bounding box detection function widt given rough bounding box.
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