Ocean
Loading...
Searching...
No Matches
TestPinholeCamera.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_TESTMATH_PINHOLE_CAMERA_H
9#define META_OCEAN_TEST_TESTMATH_PINHOLE_CAMERA_H
10
12
13namespace Ocean
14{
15
16namespace Test
17{
18
19namespace TestMath
20{
21
22/**
23 * This class implements tests for the PinholeCamera.
24 * @ingroup testmath
25 */
26class OCEAN_TEST_MATH_EXPORT TestPinholeCamera
27{
28 public:
29
30 /**
31 * Tests all pinhole camera functions.
32 * @param testDuration Number of seconds for each test, with range (0, infinity)
33 * @return True, if succeeded
34 */
35 static bool test(const double testDuration);
36
37 /**
38 * Tests the constructors of the camera function.
39 * @param testDuration Number of seconds for each test, with range (0, infinity)
40 * @return True, if succeeded
41 * @tparam T The data type of a scalar, 'float' or 'double'
42 */
43 template <typename T>
44 static bool testCameraConstructor(const double testDuration);
45
46 /**
47 * Tests the pattern camera function.
48 * @param testDuration Number of seconds for each test, with range (0, infinity)
49 * @return True, if succeeded
50 * @tparam T The data type of a scalar, 'float' or 'double'
51 */
52 template <typename T>
53 static bool testPatternCamera(const double testDuration);
54
55 /**
56 * Tests the sub-frame camera function.
57 * @param testDuration Number of seconds for each test, with range (0, infinity)
58 * @return True, if succeeded
59 * @tparam T The data type of a scalar, 'float' or 'double'
60 */
61 template <typename T>
62 static bool testSubFrameCamera(const double testDuration);
63
64 /**
65 * Tests the distortion function.
66 * @param width The width of the camera image in pixel
67 * @param height The height of the camera image in pixel
68 * @param testDuration Number of seconds for each test, with range (0, infinity)
69 * @return True, if succeeded
70 * @tparam T The data type of a scalar, 'float' or 'double'
71 */
72 template <typename T>
73 static bool testDistortion(const unsigned int width, const unsigned int height, const double testDuration);
74
75 /**
76 * Tests the vector function with an undistorted camera.
77 * @param width The width of the camera image in pixel
78 * @param height The height of the camera image in pixel
79 * @param testDuration Number of seconds for each test, with range (0, infinity)
80 * @return True, if succeeded
81 * @tparam T The data type of a scalar, 'float' or 'double'
82 */
83 template <typename T>
84 static bool testVectorDistortionFree(const unsigned int width, const unsigned int height, const double testDuration);
85
86 /**
87 * Tests the vector function with a distorted camera.
88 * @param width The width of the camera image in pixel
89 * @param height The height of the camera image in pixel
90 * @param testDuration Number of seconds for each test, with range (0, infinity)
91 * @return True, if succeeded
92 * @tparam T The data type of a scalar, 'float' or 'double'
93 */
94 template <typename T>
95 static bool testVectorDistorted(const unsigned int width, const unsigned int height, const double testDuration);
96
97 /**
98 * Tests the diagonal field of view function.
99 * @param testDuration Number of seconds for each test, with range (0, infinity)
100 * @return True, if succeeded
101 * @tparam T The data type of a scalar, 'float' or 'double'
102 */
103 template <typename T>
104 static bool testFovDiagonal(const double testDuration);
105};
106
107}
108
109}
110
111}
112
113#endif // META_OCEAN_TEST_TESTMATH_PINHOLE_CAMERA_H
This class implements tests for the PinholeCamera.
Definition TestPinholeCamera.h:27
static bool testFovDiagonal(const double testDuration)
Tests the diagonal field of view function.
static bool test(const double testDuration)
Tests all pinhole camera functions.
static bool testCameraConstructor(const double testDuration)
Tests the constructors of the camera function.
static bool testPatternCamera(const double testDuration)
Tests the pattern camera function.
static bool testVectorDistortionFree(const unsigned int width, const unsigned int height, const double testDuration)
Tests the vector function with an undistorted camera.
static bool testDistortion(const unsigned int width, const unsigned int height, const double testDuration)
Tests the distortion function.
static bool testSubFrameCamera(const double testDuration)
Tests the sub-frame camera function.
static bool testVectorDistorted(const unsigned int width, const unsigned int height, const double testDuration)
Tests the vector function with a distorted camera.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15