Ocean
TestCVAdvanced.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_TESTADVANCED_TESTCVADVANCED_H
9 #define META_OCEAN_TEST_TESTCV_TESTADVANCED_TESTCVADVANCED_H
10 
12 
13 namespace Ocean
14 {
15 
16 namespace Test
17 {
18 
19 namespace TestCV
20 {
21 
22 namespace TestAdvanced
23 {
24 
25 /**
26  * @ingroup testcv
27  * @defgroup testcvadvanced Ocean Test CV Advanced Library
28  * @{
29  * The Ocean Test CV Advanced Library provides several function to test the performance and validation of the computer vision advanced functionalities.
30  * The library is platform independent.
31  * @}
32  */
33 
34 /**
35  * @namespace Ocean::Test::TestCV::TestAdvanced Namespace of the CV Advanced Test library.<p>
36  * The Namespace Ocean::Test::TestCV::TestAdvanced is used in the entire Ocean CV Advanced Test Library.
37  */
38 
39 // Defines OCEAN_TEST_CV_ADVANCED_EXPORT for dll export and import.
40 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
41  #ifdef USE_OCEAN_TEST_CV_ADVANCED_EXPORT
42  #define OCEAN_TEST_CV_ADVANCED_EXPORT __declspec(dllexport)
43  #else
44  #define OCEAN_TEST_CV_ADVANCED_EXPORT __declspec(dllimport)
45  #endif
46 #else
47  #define OCEAN_TEST_CV_ADVANCED_EXPORT
48 #endif
49 
50 /**
51  * Tests the entire Computer Vision Advanced library.
52  * @param testDuration Number of seconds for each test, with range (0, infinity)
53  * @param worker The worker object to distribute some computation on as many CPU cores as defined in the worker object
54  * @param width The width of the test frame in pixel, with range [32, infinity)
55  * @param height The height of the test frame in pixel, with range [32, infinity)
56  * @param testFunctions Optional name of the functions to be tested
57  * @return True, if the entire test succeeded
58  * @ingroup testcvadvanced
59  */
60 OCEAN_TEST_CV_ADVANCED_EXPORT bool testCVAdvanced(const double testDuration, Worker& worker, const unsigned int width = 1280u, const unsigned int height = 720u, const std::string& testFunctions = std::string());
61 
62 /**
63  * Tests the entire Computer Vision Advanced library.
64  * This function returns directly as the actual test is invoked in an own thread.<br>
65  * Use this function in intendet for non-console applications like e.g., mobile devices.
66  * @param testDuration Number of seconds for each test, with range (0, infinity)
67  * @param width The width of the test frame in pixel, with range [32, infinity)
68  * @param height The height of the test frame in pixel, with range [32, infinity)
69  * @param testFunctions Optional name of the functions to be tested
70  * @ingroup testcvadvanced
71  */
72 OCEAN_TEST_CV_ADVANCED_EXPORT void testCVAdvancedAsynchron(const double testDuration, const unsigned int width = 1280u, const unsigned int height = 720u, const std::string& testFunctions = std::string());
73 
74 }
75 
76 }
77 
78 }
79 
80 }
81 
82 #endif // META_OCEAN_TEST_TESTCV_TESTADVANCED_TESTCVADVANCED_H
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
OCEAN_TEST_CV_ADVANCED_EXPORT bool testCVAdvanced(const double testDuration, Worker &worker, const unsigned int width=1280u, const unsigned int height=720u, const std::string &testFunctions=std::string())
Tests the entire Computer Vision Advanced library.
OCEAN_TEST_CV_ADVANCED_EXPORT void testCVAdvancedAsynchron(const double testDuration, const unsigned int width=1280u, const unsigned int height=720u, const std::string &testFunctions=std::string())
Tests the entire Computer Vision Advanced library.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15