Time-of-Flight Library(ToF) 3.13.2
 
camera_config.h
1#ifndef _CHRONOPTICS_TOF_CAMERA_CONFIG_H_
2#define _CHRONOPTICS_TOF_CAMERA_CONFIG_H_
3
4#include <chronoptics/tof/processing_config.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10/** ToF cameras made by Chronoptics
11 */
12enum tof_camera_type {
13 TOF_CAMERA_TYPE_OPT8241 = 1, /** Original Moa and first generation Kea camera with opt sensor */
14 TOF_CAMERA_TYPE_OPT8241_EXT = 4, /** First generation Kea camera with opt sensor and external modulation */
15 TOF_CAMERA_TYPE_MLX75027 = 6, /** Newer generation Kea cameras with mlx sensor */
16 TOF_CAMERA_TYPE_VD55H1 = 9, /** Kea st camera */
17};
18
19/** Operating mode of the cameras' sensor
20 */
21enum tof_sensor_mode {
22 TOF_SENSOR_MODE_NORMAL = 0, /** Normal mode ToF sensor mod (A - B) */
23 TOF_SENSOR_MODE_COMMON = 1, /** Common mode (A + B) */
24 TOF_SENSOR_MODE_EXTERNAL_DEMOD = 4, /** Use external demodulation */
25 TOF_SENSOR_MODE_EXTERNAL_SIGNAL = 5, /** Use the light source as an input */
26 TOF_SENSOR_MODE_TAP_A = 8, /** Only tap a is read out */
27 TOF_SENSOR_MODE_TAP_B = 9, /** Only tap b is read out */
28 TOF_SENSOR_MODE_TAP_AB = 10, /** Both A and B tap are read out, this means double the data transmission */
29 TOF_SENSOR_MODE_TAP_AB_HDR = 12, /** Both A and B tap are read out for both a short and long integration time */
30};
31
32/** The trigger mode of the camera
33 */
34enum tof_trigger_mode {
35 TOF_TRIGGER_MODE_CONTINUOUS = 0, /** The camera is continuously running and outputting frames */
36 TOF_TRIGGER_MODE_HARDWARE = 1, /** The camera waits for a hardware trigger */
37 TOF_TRIGGER_MODE_SOFTWARE = 2, /** The camera waits for a software trigger */
38};
39
40/** The amount of light power to output
41 */
42enum tof_light_power {
43 TOF_LIGHT_POWER_FULL = 0, /** Full, 100% light power, all 4 vcsels operating */
44 TOF_LIGHT_POWER_HALF = 1, /** Half, 50% light power, 2 vcsels operating */
45 TOF_LIGHT_POWER_ZERO = 2, /** Zero, 0% light power, 0 vcsels operating */
46};
47
48/** Region of interest
49 */
50typedef struct tof_roi* tof_roi_t;
51
52/** Destruct tof_roi */
53TOF_EXPORT void tof_roi_delete(tof_roi_t ptr);
54
55/** Get the number of rows in the image sensor
56 * @param ptr Pointer to class
57 * @param error Pointer to error
58 * @return Number of rows
59 */
60TOF_EXPORT int32_t tof_roi_sensor_rows(const tof_roi_t ptr, tof_error_t *error);
61
62/** Get the number of columns in the image sensor
63 * @param ptr Pointer to class
64 * @param error Pointer to error
65 * @return Number of columsn
66 */
67TOF_EXPORT int32_t tof_roi_sensor_cols(const tof_roi_t ptr, tof_error_t *error);
68
69/** Get the row offset in pixels
70 * @param ptr Pointer to class
71 * @param error Pointer to error
72 * @return Row offset
73 */
74TOF_EXPORT int32_t tof_roi_get_row_offset(const tof_roi_t ptr, tof_error_t *error);
75
76/** Set the row offset in pixels
77 * @param ptr Pointer to class
78 * @param row_offset Row offset
79 * @param error Pointer to error
80 */
81TOF_EXPORT void tof_roi_set_row_offset(tof_roi_t ptr, int32_t row_offset, tof_error_t *error);
82
83/** Get the column offset in pixels
84 * @param ptr Pointer to class
85 * @param error Pointer to error
86 * @return Column offset
87 */
88TOF_EXPORT int32_t tof_roi_get_col_offset(const tof_roi_t ptr, tof_error_t *error);
89
90/** Set the column offset in pixels
91 * @param ptr Pointer to class
92 * @param col_offset Column offset
93 * @param error Pointer to error
94 */
95TOF_EXPORT void tof_roi_set_col_offset(tof_roi_t ptr, int32_t col_offset, tof_error_t *error);
96
97/** Get the number of rows in the output image
98 * @param ptr Pointer to class
99 * @param error Pointer to error
100 * @return Image rows
101 */
102TOF_EXPORT int32_t tof_roi_get_img_rows(const tof_roi_t ptr, tof_error_t *error);
103
104/** Set the number of rows in the output image
105 * @param ptr Pointer to class
106 * @param img_rows Image rows
107 * @param error Pointer to error
108 */
109TOF_EXPORT void tof_roi_set_img_rows(tof_roi_t ptr, int32_t img_rows, tof_error_t *error);
110
111/** Get the number of columns in the output image
112 * @param ptr Pointer to class
113 * @param error Pointer to error
114 * @return Image columns
115 */
116TOF_EXPORT int32_t tof_roi_get_img_cols(const tof_roi_t ptr, tof_error_t *error);
117
118/** Set the number of columns in the output image
119 * @param ptr Pointer to class
120 * @param img_cols Image columns
121 * @param error Pointer to error
122 */
123TOF_EXPORT void tof_roi_set_img_cols(tof_roi_t ptr, int32_t img_cols, tof_error_t *error);
124
125/** This class allows you to view/edit the camera settings
126 */
127typedef struct tof_camera_config* tof_camera_config_t;
128
129/** Destruct tof_camera_config */
130TOF_EXPORT void tof_camera_config_delete(tof_camera_config_t ptr);
131
132/** Read camera config from disk
133 * @param ptr Pointer to class
134 * @param file_location Location of camera config on disk
135 * @param error Pointer to error
136 * @return New object
137 */
138TOF_EXPORT tof_camera_config_t tof_camera_config_new_from_disk(const char* file_location, tof_error_t *error);
139
140/** Write camera config to disk
141 * @param ptr Pointer to class
142 * @param file_location Location to save camera config to
143 * @param error Pointer to error
144 */
145TOF_EXPORT void tof_camera_config_write(const tof_camera_config_t ptr, const char* file_location, tof_error_t *error);
146
147/** Get the camera type
148 * @param ptr Pointer to class
149 * @param error Pointer to error
150 * @return Camera type
151 */
152TOF_EXPORT enum tof_camera_type tof_camera_config_get_type(const tof_camera_config_t ptr, tof_error_t *error);
153
154/** Reset camera config to default
155 * @param ptr Pointer to class
156 * @param error Pointer to error
157 */
158TOF_EXPORT void tof_camera_config_reset(tof_camera_config_t ptr, tof_error_t *error);
159
160/** Get the amount of frames in the config. Having multiple frames allows you to
161 * configure different modulation frequencies or integration times per frame.
162 * @param ptr Pointer to class
163 * @param error Pointer to error
164 * @return Frame size
165 */
166TOF_EXPORT size_t tof_camera_config_frame_size(const tof_camera_config_t ptr, tof_error_t *error);
167
168/** Add a default frame to the camera config
169 * @param ptr Pointer to class
170 * @param error Pointer to error
171 */
172TOF_EXPORT void tof_camera_config_add_frame(tof_camera_config_t ptr, tof_error_t *error);
173
174/** Generate default processing config from camera configuration
175 * @param ptr Pointer to class
176 * @param error Pointer to error
177 * @return The default processing config
178 */
179TOF_EXPORT tof_processing_config_t tof_camera_config_default_processing(const tof_camera_config_t ptr, tof_error_t *error);
180
181/** Erase specified frame
182 * @param ptr Pointer to class
183 * @param frame Frame number
184 * @param error Pointer to error
185 */
186TOF_EXPORT void tof_camera_config_erase_frame(tof_camera_config_t ptr, size_t frame, tof_error_t *error);
187
188/** Get the phase shifts. Value ranges from 0.0 to 1.0 which translates to 0-2
189 * pi
190 * @param ptr Pointer to class
191 * @param frame Frame number
192 * @param phase_shifts Phase shifts
193 * @param capacity The amount of data the above pointer can hold
194 * @param error Pointer to error
195 * @return Number of pointers filled or complete array size
196 */
197TOF_EXPORT size_t tof_camera_config_get_phase_shifts(const tof_camera_config_t ptr, size_t frame, float* phase_shifts, size_t capacity, tof_error_t *error);
198
199/** Set the phase shifts. Value ranges from 0.0 to 1.0 which translates to 0-2
200 * pi
201 * @param ptr Pointer to class
202 * @param frame Frame number
203 * @param phase_shifts Phase shifts
204 * @param phase_shifts_size The size of the above array
205 * @param error Pointer to error
206 */
207TOF_EXPORT void tof_camera_config_set_phase_shifts(tof_camera_config_t ptr, size_t frame, const float* phase_shifts, size_t phase_shifts_size, tof_error_t *error);
208
209/** Get the integration time
210 * @param ptr Pointer to class
211 * @param frame Frame number
212 * @param integration_time Integration time in micro seconds
213 * @param capacity The amount of data the above pointer can hold
214 * @param error Pointer to error
215 * @return Number of pointers filled or complete array size
216 */
217TOF_EXPORT size_t tof_camera_config_get_integration_time(const tof_camera_config_t ptr, size_t frame, uint32_t* integration_time, size_t capacity, tof_error_t *error);
218
219/** Set the integration time
220 * @param ptr Pointer to class
221 * @param frame Frame number
222 * @param integration_time Integration time in micro seconds
223 * @param integration_time_size The size of the above array
224 * @param error Pointer to error
225 */
226TOF_EXPORT void tof_camera_config_set_integration_time(tof_camera_config_t ptr, size_t frame, const uint32_t* integration_time, size_t integration_time_size, tof_error_t *error);
227
228/** Get the mode to set the camera's depth sensor to
229 * @param ptr Pointer to class
230 * @param frame Frame number
231 * @param error Pointer to error
232 * @return Sensor mode
233 */
234TOF_EXPORT enum tof_sensor_mode tof_camera_config_get_sensor_mode(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
235
236/** Set the mode to set the camera's depth sensor to
237 * @param ptr Pointer to class
238 * @param frame Frame number
239 * @param sensor_mode Sensor mode
240 * @param error Pointer to error
241 */
242TOF_EXPORT void tof_camera_config_set_sensor_mode(tof_camera_config_t ptr, size_t frame, enum tof_sensor_mode sensor_mode, tof_error_t *error);
243
244/** Get the modulation frequency
245 * @param ptr Pointer to class
246 * @param frame Frame number
247 * @param error Pointer to error
248 * @return Modulation frequency in MHz
249 */
250TOF_EXPORT float tof_camera_config_get_modulation_frequency(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
251
252/** Set the modulation frequency
253 * @param ptr Pointer to class
254 * @param frame Frame number
255 * @param modulation_frequency Modulation frequency in MHz
256 * @param error Pointer to error
257 */
258TOF_EXPORT void tof_camera_config_set_modulation_frequency(tof_camera_config_t ptr, size_t frame, float modulation_frequency, tof_error_t *error);
259
260/** Get the duty cycle
261 * @param ptr Pointer to class
262 * @param frame Frame number
263 * @param error Pointer to error
264 * @return Duty cycle 0.0 to 1.0
265 */
266TOF_EXPORT float tof_camera_config_get_duty_cycle(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
267
268/** Set the duty cycle
269 * @param ptr Pointer to class
270 * @param frame Frame number
271 * @param duty_cycle Duty cycle 0.0 to 1.0
272 * @param error Pointer to error
273 */
274TOF_EXPORT void tof_camera_config_set_duty_cycle(tof_camera_config_t ptr, size_t frame, float duty_cycle, tof_error_t *error);
275
276/** Get the region of interest
277 * @param ptr Pointer to class
278 * @param frame Frame number
279 * @param error Pointer to error
280 * @return Region of interest
281 */
282TOF_EXPORT tof_roi_t tof_camera_config_get_roi(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
283
284/** Set the region of interest
285 * @param ptr Pointer to class
286 * @param frame Frame number
287 * @param roi Region of interest
288 * @param error Pointer to error
289 */
290TOF_EXPORT void tof_camera_config_set_roi(tof_camera_config_t ptr, size_t frame, tof_roi_t roi, tof_error_t *error);
291
292/** Get the amount of binning
293 * @param ptr Pointer to class
294 * @param frame Frame number
295 * @param error Pointer to error
296 * @return Amount of binning 0=none, 1=x2, 2=x4, 3=x8
297 */
298TOF_EXPORT uint8_t tof_camera_config_get_binning(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
299
300/** Set the amount of binning
301 * @param ptr Pointer to class
302 * @param frame Frame number
303 * @param binning Amount of binning 0=none, 1=x2, 2=x4, 3=x8
304 * @param error Pointer to error
305 */
306TOF_EXPORT void tof_camera_config_set_binning(tof_camera_config_t ptr, size_t frame, uint8_t binning, tof_error_t *error);
307
308/** Get is the image flipped
309 * @param ptr Pointer to class
310 * @param frame Frame number
311 * @param error Pointer to error
312 * @return Image is flipped
313 */
314TOF_EXPORT bool tof_camera_config_get_flip(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
315
316/** Set is the image flipped
317 * @param ptr Pointer to class
318 * @param frame Frame number
319 * @param flip Image is flipped
320 * @param error Pointer to error
321 */
322TOF_EXPORT void tof_camera_config_set_flip(tof_camera_config_t ptr, size_t frame, bool flip, tof_error_t *error);
323
324/** Get is the image mirrored
325 * @param ptr Pointer to class
326 * @param frame Frame number
327 * @param error Pointer to error
328 * @return Image is mirrored
329 */
330TOF_EXPORT bool tof_camera_config_get_mirror(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
331
332/** Set is the image mirrored
333 * @param ptr Pointer to class
334 * @param frame Frame number
335 * @param mirror Image is mirrored
336 * @param error Pointer to error
337 */
338TOF_EXPORT void tof_camera_config_set_mirror(tof_camera_config_t ptr, size_t frame, bool mirror, tof_error_t *error);
339
340/** Get the image sensor gain
341 * @param ptr Pointer to class
342 * @param error Pointer to error
343 * @return Image sensor gain
344 */
345TOF_EXPORT float tof_camera_config_get_gain(const tof_camera_config_t ptr, tof_error_t *error);
346
347/** Set the image sensor gain
348 * @param ptr Pointer to class
349 * @param gain Image sensor gain
350 * @param error Pointer to error
351 */
352TOF_EXPORT void tof_camera_config_set_gain(tof_camera_config_t ptr, float gain, tof_error_t *error);
353
354/** Get the kind of camera synchronization
355 * @param ptr Pointer to class
356 * @param error Pointer to error
357 * @return The kind of sync mode. 0 waits for the vsync pulse before starting
358 * the next frame. 1 optional vsync 2 is no frame syncing
359 */
360TOF_EXPORT int32_t tof_camera_config_get_sync_mode(const tof_camera_config_t ptr, tof_error_t *error);
361
362/** Set the kind of camera synchronization
363 * @param ptr Pointer to class
364 * @param sync_mode The kind of sync mode. 0 waits for the vsync pulse before
365 * starting the next frame. 1 optional vsync 2 is no frame syncing
366 * @param error Pointer to error
367 */
368TOF_EXPORT void tof_camera_config_set_sync_mode(tof_camera_config_t ptr, int32_t sync_mode, tof_error_t *error);
369
370/** Get the maximum integration time possible
371 * @param ptr Pointer to class
372 * @param frame Frame number
373 * @param maximum_integration_time Maximum integration time in micro seconds
374 * @param capacity The amount of data the above pointer can hold
375 * @param error Pointer to error
376 * @return Number of pointers filled or complete array size
377 */
378TOF_EXPORT size_t tof_camera_config_maximum_integration_time(tof_camera_config_t ptr, size_t frame, uint32_t* maximum_integration_time, size_t capacity, tof_error_t *error);
379
380/** Get the DAC gain
381 * @param ptr Pointer to class
382 * @param dac The DAC gain
383 * @param capacity The amount of data the above pointer can hold
384 * @param error Pointer to error
385 * @return Number of pointers filled or complete array size
386 */
387TOF_EXPORT size_t tof_camera_config_get_dac(const tof_camera_config_t ptr, uint16_t* dac, size_t capacity, tof_error_t *error);
388
389/** Set the DAC gain
390 * @param ptr Pointer to class
391 * @param dac The DAC gain
392 * @param dac_size The size of the above array
393 * @param error Pointer to error
394 */
395TOF_EXPORT void tof_camera_config_set_dac(tof_camera_config_t ptr, const uint16_t* dac, size_t dac_size, tof_error_t *error);
396
397/** Get the mipi speed for the MLX75027
398 * @param ptr Pointer to class
399 * @param error Pointer to error
400 * @return The mipi speed. Can only be the values 300, 600, 704, 800 and 960
401 */
402TOF_EXPORT int32_t tof_camera_config_get_mlx_mipi_speed(const tof_camera_config_t ptr, tof_error_t *error);
403
404/** Set the mipi speed for the MLX75027
405 * @param ptr Pointer to class
406 * @param mipi_speed The mipi speed. Can only be the values 300, 600, 704, 800
407 * and 960
408 * @param error Pointer to error
409 */
410TOF_EXPORT void tof_camera_config_set_mlx_mipi_speed(tof_camera_config_t ptr, int32_t mipi_speed, tof_error_t *error);
411
412/** Get the mipi speed
413 * @param ptr Pointer to class
414 * @param error Pointer to error
415 * @return The mipi speed
416 */
417TOF_EXPORT int32_t tof_camera_config_get_mipi_speed(const tof_camera_config_t ptr, tof_error_t *error);
418
419/** Set the mipi speed
420 * @param ptr Pointer to class
421 * @param mipi_speed The mipi speed
422 * @param error Pointer to error
423 */
424TOF_EXPORT void tof_camera_config_set_mipi_speed(tof_camera_config_t ptr, int32_t mipi_speed, tof_error_t *error);
425
426/** Get the preheat time
427 * @param ptr Pointer to class
428 * @param frame Frame number
429 * @param error Pointer to error
430 * @return The preheat time
431 */
432TOF_EXPORT uint32_t tof_camera_config_get_mlx_preheat(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
433
434/** Set the preheat time
435 * @param ptr Pointer to class
436 * @param frame Frame number
437 * @param preheat The preheat time
438 * @param error Pointer to error
439 */
440TOF_EXPORT void tof_camera_config_set_mlx_preheat(tof_camera_config_t ptr, size_t frame, uint32_t preheat, tof_error_t *error);
441
442/** Get enable preheat
443 * @param ptr Pointer to class
444 * @param frame Frame number
445 * @param error Pointer to error
446 * @return Enable preheating
447 */
448TOF_EXPORT bool tof_camera_config_get_mlx_preheat_enable(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
449
450/** Set enable preheat
451 * @param ptr Pointer to class
452 * @param frame Frame number
453 * @param enable Enable preheating
454 * @param error Pointer to error
455 */
456TOF_EXPORT void tof_camera_config_set_mlx_preheat_enable(tof_camera_config_t ptr, size_t frame, bool enable, tof_error_t *error);
457
458/** Set the Nios hex for the keaB cameras
459 * @param ptr Pointer to class
460 * @param file_location File location of the nios hex file
461 * @param error Pointer to error
462 */
463TOF_EXPORT void tof_camera_config_set_opt_kea_nios_hex(tof_camera_config_t ptr, const char* file_location, tof_error_t *error);
464
465/** Get the opt8241 number of sub and quad frames
466 * @param ptr Pointer to class
467 * @param error Pointer to error
468 * @return[2] Number of subs and quads respectively
469 */
470TOF_EXPORT int32_t* tof_camera_config_get_opt_kea_sub_quad(const tof_camera_config_t ptr, tof_error_t *error);
471
472/** Set the opt8241 number of sub and quad frames
473 * @param ptr Pointer to class
474 * @param subs_quads[2] Number of subs and quads respectively
475 * @param error Pointer to error
476 */
477TOF_EXPORT void tof_camera_config_set_opt_kea_sub_quad(tof_camera_config_t ptr, const int32_t* subs_quads, tof_error_t *error);
478
479/** Get the processing configuration for when the depth is calculated on camera
480 * @param ptr Pointer to class
481 * @param error Pointer to error
482 * @return The pipeline processing to be done on camera
483 */
484TOF_EXPORT tof_processing_config_t tof_camera_config_get_processing(const tof_camera_config_t ptr, tof_error_t *error);
485
486/** Set the processing configuration for when the depth is calculated on camera
487 * @param ptr Pointer to class
488 * @param processing The pipeline processing to be done on camera
489 * @param error Pointer to error
490 */
491TOF_EXPORT void tof_camera_config_set_processing(tof_camera_config_t ptr, tof_processing_config_t processing, tof_error_t *error);
492
493/** Get the time this depth frame will take. This is useful when you want a
494 * steady but lower framerate.
495 * @param ptr Pointer to class
496 * @param frame Frame number
497 * @param error Pointer to error
498 * @return Frame time in micro seconds
499 */
500TOF_EXPORT uint32_t tof_camera_config_get_frame_time(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
501
502/** Set the time this depth frame will take. This is useful when you want a
503 * steady but lower framerate.
504 * @param ptr Pointer to class
505 * @param frame Frame number
506 * @param frame_time Frame time in micro seconds
507 * @param error Pointer to error
508 */
509TOF_EXPORT void tof_camera_config_set_frame_time(tof_camera_config_t ptr, size_t frame, uint32_t frame_time, tof_error_t *error);
510
511/** Get phase offset for illumination and sensor. The phase offsets are two
512 * floating point values corresponding to the phase delay for the illumination
513 * and sensor respectively. The values should be between 0.0 and 1.0 where 0.0
514 * is no phase offset and 1.0 is 360 degree phase offset
515 * @param ptr Pointer to class
516 * @param frame Frame number
517 * @param error Pointer to error
518 * @return[2] Image is mirrored
519 */
520TOF_EXPORT float* tof_camera_config_get_global_phase_offset(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
521
522/** Set phase offset for illumination and sensor. The phase offsets are two
523 * floating point values corresponding to the phase delay for the illumination
524 * and sensor respectively. The values should be between 0.0 and 1.0 where 0.0
525 * is no phase offset and 1.0 is 360 degree phase offset
526 * @param ptr Pointer to class
527 * @param frame Frame number
528 * @param phase_offset[2] Image is mirrored
529 * @param error Pointer to error
530 */
531TOF_EXPORT void tof_camera_config_set_global_phase_offset(tof_camera_config_t ptr, size_t frame, const float* phase_offset, tof_error_t *error);
532
533/** Get the illumination mode
534 * @param ptr Pointer to class
535 * @param frame Frame number
536 * @param error Pointer to error
537 * @return Illumination mode. 0 is actively modulating, 2 is active low
538 * (illumination disabled) and 3 is active high
539 */
540TOF_EXPORT uint8_t tof_camera_config_get_illumination_mode(const tof_camera_config_t ptr, size_t frame, tof_error_t *error);
541
542/** Set the illumination mode
543 * @param ptr Pointer to class
544 * @param frame Frame number
545 * @param illumination_mode Illumination mode. 0 is actively modulating, 2 is
546 * active low (illumination disabled) and 3 is active high
547 * @param error Pointer to error
548 */
549TOF_EXPORT void tof_camera_config_set_illumination_mode(tof_camera_config_t ptr, size_t frame, uint8_t illumination_mode, tof_error_t *error);
550
551/** Get the image offsets. This configuration is only for sensors with column
552 * phase offsets.
553 * @param ptr Pointer to class
554 * @param frame Frame number
555 * @param image_offsets The image offset per column in 0.0 to 1.0
556 * @param capacity The amount of data the above pointer can hold
557 * @param error Pointer to error
558 * @return Number of pointers filled or complete array size
559 */
560TOF_EXPORT size_t tof_camera_config_get_image_offsets(const tof_camera_config_t ptr, size_t frame, float* image_offsets, size_t capacity, tof_error_t *error);
561
562/** Set the image offsets. This configuration is only for sensors with column
563 * phase offsets.
564 * @param ptr Pointer to class
565 * @param frame Frame number
566 * @param image_offsets The image offset per column in 0.0 to 1.0
567 * @param image_offsets_size The size of the above array
568 * @param error Pointer to error
569 */
570TOF_EXPORT void tof_camera_config_set_image_offsets(tof_camera_config_t ptr, size_t frame, const float* image_offsets, size_t image_offsets_size, tof_error_t *error);
571
572/** Get the width of the rgb sensor
573 * @param ptr Pointer to class
574 * @param error Pointer to error
575 * @return Width in pixels
576 */
577TOF_EXPORT size_t tof_camera_config_get_rgb_width(tof_camera_config_t ptr, tof_error_t *error);
578
579/** Get the height of the rgb sensor
580 * @param ptr Pointer to class
581 * @param error Pointer to error
582 * @return Height in pixels
583 */
584TOF_EXPORT size_t tof_camera_config_get_rgb_height(tof_camera_config_t ptr, tof_error_t *error);
585
586/** Get the trigger mode
587 * @param ptr Pointer to class
588 * @param error Pointer to error
589 * @return The trigger mode of the camera
590 */
591TOF_EXPORT enum tof_trigger_mode tof_camera_config_get_trigger_mode(const tof_camera_config_t ptr, tof_error_t *error);
592
593/** Set the trigger mode
594 * @param ptr Pointer to class
595 * @param trigger_mode The trigger mode of the camera
596 * @param error Pointer to error
597 */
598TOF_EXPORT void tof_camera_config_set_trigger_mode(tof_camera_config_t ptr, enum tof_trigger_mode trigger_mode, tof_error_t *error);
599
600/** Get the maximum theoretical fps the camera can run
601 * @param ptr Pointer to class
602 * @param error Pointer to error
603 * @return The fps in Hz
604 */
605TOF_EXPORT float tof_camera_config_get_depth_fps(tof_camera_config_t ptr, tof_error_t *error);
606
607/** Get the configuration name
608 * @param ptr Pointer to class
609 * @param error Pointer to error
610 * @return Name
611 */
612TOF_EXPORT const char* tof_camera_config_get_name(const tof_camera_config_t ptr, tof_error_t *error);
613
614/** Set the configuration name
615 * @param ptr Pointer to class
616 * @param name Name
617 * @param error Pointer to error
618 */
619TOF_EXPORT void tof_camera_config_set_name(tof_camera_config_t ptr, const char* name, tof_error_t *error);
620
621/** Get the description
622 * @param ptr Pointer to class
623 * @param error Pointer to error
624 * @return Description
625 */
626TOF_EXPORT const char* tof_camera_config_get_description(const tof_camera_config_t ptr, tof_error_t *error);
627
628/** Set the description
629 * @param ptr Pointer to class
630 * @param description Description
631 * @param error Pointer to error
632 */
633TOF_EXPORT void tof_camera_config_set_description(tof_camera_config_t ptr, const char* description, tof_error_t *error);
634
635/** Get the light power
636 * @param ptr Pointer to class
637 * @param error Pointer to error
638 * @return Light power
639 */
640TOF_EXPORT enum tof_light_power tof_camera_config_get_light_power(const tof_camera_config_t ptr, tof_error_t *error);
641
642/** Set the light power
643 * @param ptr Pointer to class
644 * @param light_power Light power
645 * @param error Pointer to error
646 */
647TOF_EXPORT void tof_camera_config_set_light_power(tof_camera_config_t ptr, enum tof_light_power light_power, tof_error_t *error);
648
649/** Light power is set
650 * @param ptr Pointer to class
651 * @param error Pointer to error
652 * @return Has light power
653 */
654TOF_EXPORT bool tof_camera_config_has_light_power(tof_camera_config_t ptr, tof_error_t *error);
655
656/** Test whether camera configurations are equal
657 * @param lhs First camera config
658 * @param rhs Second camera config
659 * @param error Pointer to error
660 * @return Camera configurations are equal
661 */
662TOF_EXPORT bool tof_camera_config_equal(const tof_camera_config_t lhs, const tof_camera_config_t rhs, tof_error_t *error);
663
664/** Get the name of the light power
665 * @param light_power Light Power
666 * @param error Pointer to error
667 * @return Name
668 */
669TOF_EXPORT const char* tof_light_power_name(enum tof_light_power light_power, tof_error_t *error);
670
671#ifdef __cplusplus
672}
673#endif
674
675#endif