Ocean
Loading...
Searching...
No Matches
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
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestCV
24{
25
26/**
27 * This class implements a frame analyzer test.
28 * @ingroup testcv
29 */
30class OCEAN_TEST_CV_EXPORT TestMaskAnalyzer
31{
32 public:
33
34 /**
35 * Tests all mask analyzer functions.
36 * @param width The width of a test mask in pixel, with range [1, infinity)
37 * @param height The height of a test mask in pixel, with range [1, infinity)
38 * @param testDuration The number of seconds for each test, with range [0, infinity)
39 * @param worker The worker object to distribute the computation
40 * @param selector The test selector to control which tests to run
41 * @return True, if succeeded
42 */
43 static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker, const TestSelector& selector = TestSelector());
44
45 /**
46 * Tests the bounding box detection function.
47 * @param width The width of a test mask in pixel, with range [1, infinity)
48 * @param height The height of a test mask in pixel, with range [1, infinity)
49 * @param testDuration The number of seconds for each test, with range [0, infinity)
50 * @return True, if succeeded
51 */
52 static bool testDetectBoundingBox(const unsigned int width, const unsigned int height, const double testDuration);
53
54 /**
55 * Tests the bounding box detection function widt given rough bounding box.
56 * @param width The width of a test mask in pixel, with range [1, infinity)
57 * @param height The height of a test mask in pixel, with range [1, infinity)
58 * @param testDuration The number of seconds for each test, with range [0, infinity)
59 * @return True, if succeeded
60 */
61 static bool testDetectBoundingBoxWithRoughGuess(const unsigned int width, const unsigned int height, const double testDuration);
62
63 /**
64 * Tests the opaque bounding box detection function.
65 * @param width The width of a test mask in pixel, with range [1, infinity)
66 * @param height The height of a test mask in pixel, with range [1, infinity)
67 * @param testDuration The number of seconds for each test, with range [0, infinity)
68 * @param worker The worker object to distribute the computation
69 * @return True, if succeeded
70 */
71 static bool testDetectOpaqueBoundingBox(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
72
73 /**
74 * Tests the hasValue() function.
75 * @param width The width of a test mask in pixel, with range [1, infinity)
76 * @param height The height of a test mask in pixel, with range [1, infinity)
77 * @param testDuration The number of seconds for each test, with range [0, infinity)
78 * @return True, if succeeded
79 */
80 static bool testHasValue(const unsigned int width, const unsigned int height, const double testDuration);
81};
82
83}
84
85}
86
87}
88
89#endif // META_OCEAN_TEST_TESTCV_TEST_MASK_ANALYZER_H
This class implements a frame analyzer test.
Definition TestMaskAnalyzer.h:31
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, const TestSelector &selector=TestSelector())
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 test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
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