Ocean
TestOpenCV.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_TESTOPENCV_TEST_OPEN_CV_H
9 #define META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_OPEN_CV_H
10 
12 
13 namespace Ocean
14 {
15 
16 namespace Test
17 {
18 
19 namespace TestCV
20 {
21 
22 namespace TestOpenCV
23 {
24 
25 /**
26  * @ingroup testcv
27  *
28  * @defgroup testcvopencv Ocean Test CV OpenCV Library
29  * @{
30  * The Ocean Test CV OpenCV Library provides several functions to test the performance of the 3rdparty OpenCV library.
31  * The library is platform independent.
32  * @}
33  */
34 
35 /**
36  * @namespace Ocean::Test::TestCV::TestOpenCV Namespace of the Ocean CV OpenCV test library.<p>
37  * The Namespace Ocean::Test::TestCV:TestOpencv is used in the entire Ocean CV OpenCV Library.
38  */
39 
40 // Defines OCEAN_TEST_CV_OPENCV_EXPORT for dll export and import.
41 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
42  #ifdef USE_OCEAN_TEST_CV_OPENCV_EXPORT
43  #define OCEAN_TEST_CV_OPENCV_EXPORT __declspec(dllexport)
44  #else
45  #define OCEAN_TEST_CV_OPENCV_EXPORT __declspec(dllimport)
46  #endif
47 #else
48  #define OCEAN_TEST_CV_OPENCV_EXPORT
49 #endif
50 
51 /**
52  * Tests the entire CV OpenCV library.
53  * @param testDuration Number of seconds for each test, with range (0, infinity)
54  * @param imageFilename The filename of the image to be used for testing
55  * @param testFunctions Optional name of the functions to be tested
56  * @return True, if the entire test succeeded
57  * @ingroup testcvopencv
58  */
59 OCEAN_TEST_CV_OPENCV_EXPORT bool testCVOpenCV(const double testDuration, const std::string& imageFilename, const std::string& testFunctions = std::string());
60 
61 /**
62  * Tests the entire CV OpenCV library.
63  * This function returns directly as the actual test is invoked in an own thread.<br>
64  * Use this function in intendet for non-console applications like e.g., mobile devices.
65  * @param testDuration Number of seconds for each test, with range (0, infinity)
66  * @param imageFilename The filename of the image to be used for testing
67  * @param testFunctions Optional name of the functions to be tested
68  * @ingroup testcvopencv
69  */
70 OCEAN_TEST_CV_OPENCV_EXPORT void testCVOpenCVAsynchron(const double testDuration, const std::string& imageFilename, const std::string& testFunctions = std::string());
71 
72 
73 } // namespace TestOpenCV
74 
75 } // namespace TestCV
76 
77 } // namespace Test
78 
79 } // namespace Ocean
80 
81 #endif // META_OCEAN_TEST_TESTCV_TESTOPENCV_TEST_OPEN_CV_H
OCEAN_TEST_CV_OPENCV_EXPORT bool testCVOpenCV(const double testDuration, const std::string &imageFilename, const std::string &testFunctions=std::string())
Tests the entire CV OpenCV library.
OCEAN_TEST_CV_OPENCV_EXPORT void testCVOpenCVAsynchron(const double testDuration, const std::string &imageFilename, const std::string &testFunctions=std::string())
Tests the entire CV OpenCV library.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15