Ocean
Loading...
Searching...
No Matches
TestCameraCalibrationManager.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_TESTIO_TEST_CAMERA_CALIBRATION_MANAGER_H
9#define META_OCEAN_TEST_TESTIO_TEST_CAMERA_CALIBRATION_MANAGER_H
10
12
14
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestIO
24{
25
26/**
27 * This class implements a camera calibration manager test.
28 * @ingroup testio
29 */
30class OCEAN_TEST_IO_EXPORT TestCameraCalibrationManager
31{
32 protected:
33
34 /**
35 * Helper class that allows creating instances of CameraCalibrationManager for testing.
36 * This class derives from CameraCalibrationManager to access the protected constructor.
37 */
39 {
40 public:
41
42 /**
43 * Default constructor.
44 */
46 };
47
48 public:
49
50 /**
51 * Tests all camera calibration manager functions.
52 * @param testDuration The number of seconds for each test
53 * @param selector The test selector
54 * @return True, if succeeded
55 */
56 static bool test(const double testDuration, const TestSelector& selector);
57
58 /**
59 * Tests basic camera registration from JSON string.
60 * @return True, if succeeded
61 */
62 static bool testBasicRegistration();
63
64 /**
65 * Tests camera lookup by name.
66 * @return True, if succeeded
67 */
68 static bool testCameraLookup();
69
70 /**
71 * Tests camera lookup using aliases.
72 * @return True, if succeeded
73 */
74 static bool testAliasLookup();
75
76 /**
77 * Tests exact and interpolated resolution matching.
78 * @return True, if succeeded
79 */
81
82 /**
83 * Tests priority handling when multiple calibrations are available.
84 * @return True, if succeeded
85 */
86 static bool testPriorityHandling();
87
88 /**
89 * Tests different camera models (Pinhole and Fisheye).
90 * @return True, if succeeded
91 */
92 static bool testCameraModels();
93
94 /**
95 * Tests error handling with invalid JSON and missing data.
96 * @return True, if succeeded
97 */
98 static bool testErrorHandling();
99
100 /**
101 * Tests basic device context functionality (product, version, serial).
102 * @return True, if succeeded
103 */
104 static bool testDeviceContext();
105
106 /**
107 * Tests hierarchical device context matching.
108 * @return True, if succeeded
109 */
111
112 /**
113 * Tests context isolation (global vs device-specific cameras).
114 * @return True, if succeeded
115 */
117
118 /**
119 * Tests camera serialization and deserialization (round-trip conversion).
120 * @param testDuration The number of seconds for each test
121 * @return True, if succeeded
122 */
123 static bool testSerializeCamera(const double testDuration);
124};
125
126} // namespace TestIO
127
128} // namespace Test
129
130} // namespace Ocean
131
132#endif // META_OCEAN_TEST_TESTIO_TEST_CAMERA_CALIBRATION_MANAGER_H
This class implements a manager for camera calibrations using a modern JSON-based format.
Definition CameraCalibrationManager.h:90
Helper class that allows creating instances of CameraCalibrationManager for testing.
Definition TestCameraCalibrationManager.h:39
This class implements a camera calibration manager test.
Definition TestCameraCalibrationManager.h:31
static bool testPriorityHandling()
Tests priority handling when multiple calibrations are available.
static bool testResolutionMatching()
Tests exact and interpolated resolution matching.
static bool test(const double testDuration, const TestSelector &selector)
Tests all camera calibration manager functions.
static bool testDeviceContextHierarchy()
Tests hierarchical device context matching.
static bool testDeviceContext()
Tests basic device context functionality (product, version, serial).
static bool testBasicRegistration()
Tests basic camera registration from JSON string.
static bool testCameraLookup()
Tests camera lookup by name.
static bool testErrorHandling()
Tests error handling with invalid JSON and missing data.
static bool testCameraModels()
Tests different camera models (Pinhole and Fisheye).
static bool testSerializeCamera(const double testDuration)
Tests camera serialization and deserialization (round-trip conversion).
static bool testAliasLookup()
Tests camera lookup using aliases.
static bool testDeviceContextIsolation()
Tests context isolation (global vs device-specific cameras).
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
The namespace covering the entire Ocean framework.
Definition Accessor.h:15