Ocean
Loading...
Searching...
No Matches
TestCreatorI1.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_TESTSYNTHESIS_TEST_CREATOR_I_1_H
9#define META_OCEAN_TEST_TESTCV_TESTSYNTHESIS_TEST_CREATOR_I_1_H
10
12
13#include "ocean/base/Frame.h"
14
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestCV
24{
25
26namespace TestSynthesis
27{
28
29/**
30 * This class implements a test for creators with one frame.
31 * @ingroup testcvsynthesis
32 */
33class OCEAN_TEST_CV_SYNTHESIS_EXPORT TestCreatorI1
34{
35 public:
36
37 /**
38 * Invokes all test functions.
39 * @param width The width of the source frame in pixel, with range [1, infinity)
40 * @param height The height of the source frame in pixel, with range [1, infinity)
41 * @param testDuration Number of seconds for each test, with range (0, infinity)
42 * @param worker The worker object to distribute the CPU load
43 * @param selector The test selector
44 * @return True, if succeeded
45 */
46 static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker, const TestSelector& selector);
47
48 /**
49 * Tests the inpainting content creator.
50 * @param width The width of the source frame in pixel, with range [1, infinity)
51 * @param height The height of the source frame in pixel, with range [1, infinity)
52 * @param testDuration Number of seconds for each test, with range (0, infinity)
53 * @param worker The worker object to distribute the CPU load
54 * @return True, if succeeded
55 */
56 static bool testInpaintingContent(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
57
58 /**
59 * Tests the inpainting content creator with a specified channel number.
60 * @param width The width of the source frame in pixel, with range [1, infinity)
61 * @param height The height of the source frame in pixel, with range [1, infinity)
62 * @param channels The number of frame channels which will be used during the test, with range [1, infinity)
63 * @param testDuration Number of seconds for each test, with range (0, infinity)
64 * @param worker The worker object to distribute the CPU load
65 * @return True, if succeeded
66 */
67 static bool testInpaintingContent(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker& worker);
68
69 /**
70 * Tests the spatial cost information creator.
71 * @param width The width of the source frame in pixel, with range [1, infinity)
72 * @param height The height of the source frame in pixel, with range [1, infinity)
73 * @param testDuration Number of seconds for each test, with range (0, infinity)
74 * @param worker The worker object to distribute the CPU load
75 * @return True, if succeeded
76 */
77 static bool testInformationSpatialCost(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
78
79 /**
80 * Tests the 4-neighborhood cost information creator.
81 * @param width The width of the source frame in pixel, with range [1, infinity)
82 * @param height The height of the source frame in pixel, with range [1, infinity)
83 * @param testDuration Number of seconds for each test, with range (0, infinity)
84 * @param worker The worker object to distribute the CPU load
85 * @return True, if succeeded
86 */
87 static bool testInformationCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
88
89 /**
90 * Tests the 4-neighborhood cost information creator with a specified channel number.
91 * @param width The width of the source frame in pixel, with range [1, infinity)
92 * @param height The height of the source frame in pixel, with range [1, infinity)
93 * @param testDuration Number of seconds for each test, with range (0, infinity)
94 * @param worker The worker object to distribute the CPU load
95 * @return True, if succeeded
96 * @tparam tChannels The number of frame channels which will be used during the test, with range [1, infinity)
97 */
98 template <unsigned int tChannels>
99 static bool testInformationCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker);
100};
101
102}
103
104}
105
106}
107
108}
109
110#endif // META_OCEAN_TEST_TESTCV_TESTSYNTHESIS_TEST_CREATOR_I_1_H
This class implements a test for creators with one frame.
Definition TestCreatorI1.h:34
static bool testInpaintingContent(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the inpainting content creator.
static bool testInpaintingContent(const unsigned int width, const unsigned int height, const unsigned int channels, const double testDuration, Worker &worker)
Tests the inpainting content creator with a specified channel number.
static bool testInformationCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the 4-neighborhood cost information creator.
static bool testInformationSpatialCost(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the spatial cost information creator.
static bool testInformationCost4Neighborhood(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker)
Tests the 4-neighborhood cost information creator with a specified channel number.
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker, const TestSelector &selector)
Invokes all test functions.
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