LibMultiSense
LibMultiSense Documentation
Loading...
Searching...
No Matches
CamConfigMessage.hh
Go to the documentation of this file.
1
40#ifndef LibMultiSense_CamConfigMessage
41#define LibMultiSense_CamConfigMessage
42
43#include <vector>
44
47#include "wire/Protocol.hh"
48
49namespace crl {
50namespace multisense {
51namespace details {
52namespace wire {
53
54class CamConfig {
55public:
58
59 //
60 // Parameters representing the current camera configuration
61
62 uint16_t width;
63 uint16_t height;
65 float gain;
66
67 uint32_t exposure;
68 uint8_t autoExposure;
72
78
79 float fx, fy;
80 float cx, cy;
81 float tx, ty, tz;
82 float roll, pitch, yaw;
83
84 //
85 // Version 2 additions
86
87 int32_t disparities;
88
89 //
90 // Version 3 additions
91
93
94 //
95 // Version 4 additions
96
98
99 //
100 // Version 5 additions
101
106
107 //
108 // Version 6 additions
109
111
112 //
113 // Version 7 additions
114
116 std::vector<ExposureConfig> secondaryExposureConfigs;
117
118 //
119 // Version 8 additions
120
122 float gamma;
123
124 //
125 // Version 9 additions
126
130
131 //
132 // Version 10 additions
133 float gainMax;
134
135 //
136 // Constructors
137
140 width(0),
141 height(0),
142 framesPerSecond(0.0),
143 gain(0.0),
144 exposure(0),
145 autoExposure(0),
149 whiteBalanceRed(0.0),
150 whiteBalanceBlue(0.0),
154 fx(0.0),
155 fy(0.0),
156 cx(0.0),
157 cy(0.0),
158 tx(0.0),
159 ty(0.0),
160 tz(0.0),
161 roll(0.0),
162 pitch(0.0),
163 yaw(0.0),
164 disparities(0),
166 hdrEnabled(false),
171 cameraProfile(0),
176 sharpeningEnable(false),
180 {};
181
182 //
183 // Serialization routine
184
185 template<class Archive>
186 void serialize(Archive& message,
187 const VersionType version)
188 {
189 message & width;
190 message & height;
191
192 message & framesPerSecond;
193 message & gain;
194
195 message & exposure;
196 message & autoExposure;
197 message & autoExposureMax;
198 message & autoExposureDecay;
199 message & autoExposureThresh;
200
201 message & whiteBalanceRed;
202 message & whiteBalanceBlue;
203 message & autoWhiteBalance;
204 message & autoWhiteBalanceDecay;
205 message & autoWhiteBalanceThresh;
206
207 message & fx;
208 message & fy;
209 message & cx;
210 message & cy;
211
212 message & tx;
213 message & ty;
214 message & tz;
215
216 message & roll;
217 message & pitch;
218 message & yaw;
219
220 if (version >= 2)
221 message & disparities;
222 else
223 disparities = -1;
224
225 if (version >= 3)
226 message & stereoPostFilterStrength;
227 else
229
230 if (version >= 4)
231 message & hdrEnabled;
232 else
233 hdrEnabled = false;
234
235 if (version >= 5)
236 {
237 message & autoExposureRoiX;
238 message & autoExposureRoiY;
239 message & autoExposureRoiWidth;
240 message & autoExposureRoiHeight;
241 }
242 else
243 {
248 }
249
250 if (version >= 6)
251 {
252 message & cameraProfile;
253 }
254 else
255 {
256 cameraProfile = 0;
257 }
258
259 if (version >= 7)
260 {
261 message & exposureSource;
262 message & secondaryExposureConfigs;
263 }
264 else
265 {
267 secondaryExposureConfigs = std::vector<ExposureConfig>();
268 }
269
270 if (version >= 8)
271 {
273 message & gamma;
274 }
275 else
276 {
279 }
280
281 if (version >= 9)
282 {
283 message & sharpeningEnable;
284 message & sharpeningPercentage;
285 message & sharpeningLimit;
286 }
287 else
288 {
289 sharpeningEnable = false;
291 sharpeningLimit = 0;
292 }
293
294 if (version >= 10)
295 {
296 message & gainMax;
297 }
298 else
299 {
301 }
302
303 }
304};
305
306}}}} // namespaces
307
308#endif
Copyright 2021-2025 Carnegie Robotics, LLC 4501 Hatfield Street, Pittsburgh, PA 15201 https://www....
Macros and symbols to help portability between different compiler versions.
#define CRL_CONSTEXPR
Copyright 2013-2025 Carnegie Robotics, LLC 4501 Hatfield Street, Pittsburgh, PA 15201 http://www....
CamConfig(utility::BufferStreamReader &r, VersionType v)
static CRL_CONSTEXPR VersionType VERSION
std::vector< ExposureConfig > secondaryExposureConfigs
void serialize(Archive &message, const VersionType version)
static CRL_CONSTEXPR SourceType Default_Exposure_Source
Definition Protocol.hh:332
static CRL_CONSTEXPR IdType ID_DATA_CAM_CONFIG
Definition Protocol.hh:207
static CRL_CONSTEXPR float Default_Target_Intensity
Definition Protocol.hh:333
static CRL_CONSTEXPR float WIRE_IMAGER_GAIN_MAX
Definition Protocol.hh:339
static CRL_CONSTEXPR float Default_Gamma
Definition Protocol.hh:334