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