Time-of-Flight Library(ToF) 3.11.1
 
processing_config.hpp
1#ifndef _CHRONOPTICS_TOF_PROCESSING_CONFIG_HPP_
2#define _CHRONOPTICS_TOF_PROCESSING_CONFIG_HPP_
3
4#include <chronoptics/tof/processing_config.h>
5
6#include <chronoptics/tof/base.hpp>
7
8namespace chronoptics {
9namespace tof {
10
11/** The shape of which surrounding pixels are checked in the flying pixel filter
12 */
13enum class FlyingShape {
14 PLUS = 0, /** Four neighboring pixels in a plus shape */
15 BOX = 1, /** All eight neighboring pixels */
16};
17
18/** Mixed pixel sort mode. The mode you want to use depends on your application.
19 */
20enum class MpSortMode {
21 DARKEST = 0, /** Choose darkest path */
22 SHORTEST = 1, /** Return the surface of a translucent object, resolve corners or checkerboard lens flare */
23 BRIGHTEST = 2, /** Mixed pixels between foreground and background, get the best SNR */
24 LONGEST = 3, /** Correct lens flare from close bright objects */
25 AGGRESSOR = 4, /** Correct lens flare */
26 ADAPTIVE_SHORT_V0 = 5, /** Adaptive shortest */
27 ADAPTIVE_SHORT_V1 = 6, /** Adaptive shortest version two */
28 AGGRESSOR_V2 = 7, /** Correct lens flare version two */
29};
30
31/** What kind of binning to do
32 */
33enum class BinningMode {
34 NORMAL = 0, /** Normal binning, a BxB grid averaged to a single pixel */
35 SMART = 1, /** Smart binning, take into account the standard deviation around a chosen pixel. Similar to local means but reduces the image size */
36};
37
38/** In what dimension the xyz is exported
39 */
40enum class XyzDimension {
41 MILLIMETER = 0, /** Export in millimeters */
42 METER = 1, /** Export in meters */
43};
44
45/** Processing that can be done
46*/
47class ProcessingConfig : public detail::Base<tof_processing_config, tof_processing_config_delete> {
48 public:
49 /** Construct from pointer */
50 ProcessingConfig(tof_processing_config_t ptr) {
51 this->ptr_ = ptr;
52 }
53
54 /** Create default processing config
55 */
57 this->ptr_ = tof_processing_config_new_default(TOF_ERROR_HANDLER{});
58 }
59
60 /** Load processing config from disk
61 * @param file_location Location of processing config
62 */
63 ProcessingConfig(StringView file_location) {
64 this->ptr_ = tof_processing_config_new_from_disk(file_location, TOF_ERROR_HANDLER{});
65 }
66
67 /** Write processing config to disk
68 * @param file_location Location where to save the processing config
69 */
70 void write(StringView file_location) const {
71 return tof_processing_config_write(this->ptr_, file_location, TOF_ERROR_HANDLER{});
72 }
73
74 /** Get whether processing on the gpu is enabled
75 * @return Enabled
76 */
77 bool get_gpu() const {
78 return tof_processing_config_get_gpu(this->ptr_, TOF_ERROR_HANDLER{});
79 }
80
81 /** Set whether processing on the gpu is enabled
82 * @param gpu Enabled
83 */
84 void set_gpu(bool gpu) {
85 return tof_processing_config_set_gpu(this->ptr_, gpu, TOF_ERROR_HANDLER{});
86 }
87
88 /** Get whether the calibration is applied
89 * @return Enabled
90 */
92 return tof_processing_config_get_calibration_enabled(this->ptr_, TOF_ERROR_HANDLER{});
93 }
94
95 /** Set whether the calibration is applied
96 * @param enabled Enabled
97 */
98 void set_calibration_enabled(bool enabled) {
99 return tof_processing_config_set_calibration_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
100 }
101
102 /** Get whether phase unwrapping is enabled
103 * @return Enabled
104 */
106 return tof_processing_config_get_phase_unwrapping_enabled(this->ptr_, TOF_ERROR_HANDLER{});
107 }
108
109 /** Set whether phase unwrapping is enabled
110 * @param enabled Enabled
111 */
112 void set_phase_unwrapping_enabled(bool enabled) {
113 return tof_processing_config_set_phase_unwrapping_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
114 }
115
116 /** Get The maximum distance between ideal location and actual
117 * @return Max offset, range [0, 1]
118 */
120 return tof_processing_config_get_phase_unwrapping_max_offset(this->ptr_, TOF_ERROR_HANDLER{});
121 }
122
123 /** Set The maximum distance between ideal location and actual
124 * @param max_offset Max offset, range [0, 1]
125 */
126 void set_phase_unwrapping_max_offset(double max_offset) {
127 return tof_processing_config_set_phase_unwrapping_max_offset(this->ptr_, max_offset, TOF_ERROR_HANDLER{});
128 }
129
130 /** Get wether mpi detect is enabled
131 * @return Enabled
132 */
134 return tof_processing_config_get_mpi_detect_enabled(this->ptr_, TOF_ERROR_HANDLER{});
135 }
136
137 /** Set wether mpi detect is enabled
138 * @param enabled Enabled
139 */
140 void set_mpi_detect_enabled(bool enabled) {
141 return tof_processing_config_set_mpi_detect_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
142 }
143
144 /** Get The amplitude ratio value
145 * @return The maximum ratio
146 */
147 float get_mpi_detect_aratio() const {
148 return tof_processing_config_get_mpi_detect_aratio(this->ptr_, TOF_ERROR_HANDLER{});
149 }
150
151 /** Set The amplitude ratio value
152 * @param aratio The maximum ratio
153 */
154 void set_mpi_detect_aratio(float aratio) {
155 return tof_processing_config_set_mpi_detect_aratio(this->ptr_, aratio, TOF_ERROR_HANDLER{});
156 }
157
158 /** Get the phase difference ratio
159 * @return The maximum phase difference
160 */
162 return tof_processing_config_get_mpi_detect_phi_diff(this->ptr_, TOF_ERROR_HANDLER{});
163 }
164
165 /** Set the phase difference ratio
166 * @param phi_diff The maximum phase difference
167 */
168 void set_mpi_detect_phi_diff(float phi_diff) {
169 return tof_processing_config_set_mpi_detect_phi_diff(this->ptr_, phi_diff, TOF_ERROR_HANDLER{});
170 }
171
172 /** Get wether mixed pixel is enabled
173 * @return Enabled
174 */
176 return tof_processing_config_get_mixed_pixel_enabled(this->ptr_, TOF_ERROR_HANDLER{});
177 }
178
179 /** Set wether mixed pixel is enabled
180 * @param enabled Enabled
181 */
182 void set_mixed_pixel_enabled(bool enabled) {
183 return tof_processing_config_set_mixed_pixel_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
184 }
185
186 /** Get location of the mixed pixel look up table file
187 * @return File location
188 */
189 const char* get_mixed_pixel_lut_file() const {
190 return tof_processing_config_get_mixed_pixel_lut_file(this->ptr_, TOF_ERROR_HANDLER{});
191 }
192
193 /** Set location of the mixed pixel look up table file
194 * @param file_location File location
195 */
196 void set_mixed_pixel_lut_file(StringView file_location) {
197 return tof_processing_config_set_mixed_pixel_lut_file(this->ptr_, file_location, TOF_ERROR_HANDLER{});
198 }
199
200 /** Get minimum amplitude that pixel needs to have to apply mixed pixel to it
201 * @return Minimum amplitude
202 */
203 double get_mixed_pixel_amp_min() const {
204 return tof_processing_config_get_mixed_pixel_amp_min(this->ptr_, TOF_ERROR_HANDLER{});
205 }
206
207 /** Set minimum amplitude that pixel needs to have to apply mixed pixel to it
208 * @param amp_min Minimum amplitude
209 */
210 void set_mixed_pixel_amp_min(double amp_min) {
211 return tof_processing_config_set_mixed_pixel_amp_min(this->ptr_, amp_min, TOF_ERROR_HANDLER{});
212 }
213
214 /** Get what output is selected
215 * @return Sort mode
216 */
217 MpSortMode get_mixed_pixel_sort_mode() const {
218 return static_cast<MpSortMode>(tof_processing_config_get_mixed_pixel_sort_mode(this->ptr_, TOF_ERROR_HANDLER{}));
219 }
220
221 /** Set what output is selected
222 * @param sort_mode Sort mode
223 */
224 void set_mixed_pixel_sort_mode(MpSortMode sort_mode) {
225 return tof_processing_config_set_mixed_pixel_sort_mode(this->ptr_, static_cast<tof_mp_sort_mode>(sort_mode), TOF_ERROR_HANDLER{});
226 }
227
228 /** Get the amplitude ratio for detecting MPI
229 * @return Amplitude ratio
230 */
231 double get_mixed_pixel_aratio() const {
232 return tof_processing_config_get_mixed_pixel_aratio(this->ptr_, TOF_ERROR_HANDLER{});
233 }
234
235 /** Set the amplitude ratio for detecting MPI
236 * @param aratio Amplitude ratio
237 */
238 void set_mixed_pixel_aratio(double aratio) {
239 return tof_processing_config_set_mixed_pixel_aratio(this->ptr_, aratio, TOF_ERROR_HANDLER{});
240 }
241
242 /** Get the phase difference for detecting MPI
243 * @return Phase difference
244 */
246 return tof_processing_config_get_mixed_pixel_phi_diff(this->ptr_, TOF_ERROR_HANDLER{});
247 }
248
249 /** Set the phase difference for detecting MPI
250 * @param phi_diff Phase difference
251 */
252 void set_mixed_pixel_phi_diff(double phi_diff) {
253 return tof_processing_config_set_mixed_pixel_phi_diff(this->ptr_, phi_diff, TOF_ERROR_HANDLER{});
254 }
255
256 /** Get the threshold to classify a pixel as an aggressor
257 * @return Aggressor threshold
258 */
260 return tof_processing_config_get_mixed_pixel_aggressor_threshold(this->ptr_, TOF_ERROR_HANDLER{});
261 }
262
263 /** Set the threshold to classify a pixel as an aggressor
264 * @param threshold Aggressor threshold
265 */
266 void set_mixed_pixel_aggressor_threshold(double threshold) {
267 return tof_processing_config_set_mixed_pixel_aggressor_threshold(this->ptr_, threshold, TOF_ERROR_HANDLER{});
268 }
269
270 /** Get the minimum amount of bright pixels before a bright spot is classified
271 * as an aggressor
272 * @return Minimum aggressor size
273 */
275 return tof_processing_config_get_mixed_pixel_min_aggressor_size(this->ptr_, TOF_ERROR_HANDLER{});
276 }
277
278 /** Set the minimum amount of bright pixels before a bright spot is classified
279 * as an aggressor
280 * @param size Minimum aggressor size
281 */
283 return tof_processing_config_set_mixed_pixel_min_aggressor_size(this->ptr_, size, TOF_ERROR_HANDLER{});
284 }
285
286 /** Get the maximum error when using three modulation frequencies
287 * @return The error
288 */
290 return tof_processing_config_get_mixed_pixel_max_error_3f(this->ptr_, TOF_ERROR_HANDLER{});
291 }
292
293 /** Set the maximum error when using three modulation frequencies
294 * @param max_error_3f The error
295 */
296 void set_mixed_pixel_max_error_3f(double max_error_3f) {
297 return tof_processing_config_set_mixed_pixel_max_error_3f(this->ptr_, max_error_3f, TOF_ERROR_HANDLER{});
298 }
299
300 /** Get the maximum amplitude for adaptive sorting
301 * @return Maximum amplitude
302 */
304 return tof_processing_config_get_mixed_pixel_adaptive_amp_max(this->ptr_, TOF_ERROR_HANDLER{});
305 }
306
307 /** Set the maximum amplitude for adaptive sorting
308 * @param adaptive_amp_max Maximum amplitude
309 */
310 void set_mixed_pixel_adaptive_amp_max(double adaptive_amp_max) {
311 return tof_processing_config_set_mixed_pixel_adaptive_amp_max(this->ptr_, adaptive_amp_max, TOF_ERROR_HANDLER{});
312 }
313
314 /** Get the minimum amplitude for adaptive sorting
315 * @return Minimum amplitude
316 */
318 return tof_processing_config_get_mixed_pixel_adaptive_amp_min(this->ptr_, TOF_ERROR_HANDLER{});
319 }
320
321 /** Set the minimum amplitude for adaptive sorting
322 * @param adaptive_amp_min Minimum amplitude
323 */
324 void set_mixed_pixel_adaptive_amp_min(double adaptive_amp_min) {
325 return tof_processing_config_set_mixed_pixel_adaptive_amp_min(this->ptr_, adaptive_amp_min, TOF_ERROR_HANDLER{});
326 }
327
328 /** Get the minimum return amplitude ratio for adaptive sorting
329 * @return Minimum return ratio
330 */
332 return tof_processing_config_get_mixed_pixel_aratio_min(this->ptr_, TOF_ERROR_HANDLER{});
333 }
334
335 /** Set the minimum return amplitude ratio for adaptive sorting
336 * @param aratio_min Minimum return ratio
337 */
338 void set_mixed_pixel_aratio_min(double aratio_min) {
339 return tof_processing_config_set_mixed_pixel_aratio_min(this->ptr_, aratio_min, TOF_ERROR_HANDLER{});
340 }
341
342 /** Get The maximum phase difference before a return is not classified as
343 * aggressor
344 * @return Phase offset before not a aggressor return
345 */
347 return tof_processing_config_get_mixed_pixel_aggressor_phi_offset(this->ptr_, TOF_ERROR_HANDLER{});
348 }
349
350 /** Set The maximum phase difference before a return is not classified as
351 * aggressor
352 * @param aggressor_phi_offset Phase offset before not a aggressor return
353 */
354 void set_mixed_pixel_aggressor_phi_offset(double aggressor_phi_offset) {
355 return tof_processing_config_set_mixed_pixel_aggressor_phi_offset(this->ptr_, aggressor_phi_offset, TOF_ERROR_HANDLER{});
356 }
357
358 /** Get whether hdr is enabled. High dynamic range allows you to separate
359 * depth with high intensity difference. This is mostly useful when the sensor
360 * is being saturated.
361 * @return Enabled
362 */
363 bool get_hdr_enabled() const {
364 return tof_processing_config_get_hdr_enabled(this->ptr_, TOF_ERROR_HANDLER{});
365 }
366
367 /** Set whether hdr is enabled. High dynamic range allows you to separate
368 * depth with high intensity difference. This is mostly useful when the sensor
369 * is being saturated.
370 * @param enabled Enabled
371 */
372 void set_hdr_enabled(bool enabled) {
373 return tof_processing_config_set_hdr_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
374 }
375
376 /** Get whether averaging is enabled. The average process allows you to
377 * average multiple frames together at the cost of frame rate
378 * @return Enabled
379 */
380 bool get_average_enabled() const {
381 return tof_processing_config_get_average_enabled(this->ptr_, TOF_ERROR_HANDLER{});
382 }
383
384 /** Set whether averaging is enabled. The average process allows you to
385 * average multiple frames together at the cost of frame rate
386 * @param enabled Enabled
387 */
388 void set_average_enabled(bool enabled) {
389 return tof_processing_config_set_average_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
390 }
391
392 /** Get the number of frames to average together
393 * @return Number of frames
394 */
395 size_t get_average_nframes() const {
396 return tof_processing_config_get_average_nframes(this->ptr_, TOF_ERROR_HANDLER{});
397 }
398
399 /** Set the number of frames to average together
400 * @param nframes Number of frames
401 */
402 void set_average_nframes(size_t nframes) {
403 return tof_processing_config_set_average_nframes(this->ptr_, nframes, TOF_ERROR_HANDLER{});
404 }
405
406 /** Get whether the temporal filter is enabled. The temporal filter is a
407 * running average as long as the values are within sigma standard deviations
408 * of each other
409 * @return Enabled
410 */
411 bool get_temporal_enabled() const {
412 return tof_processing_config_get_temporal_enabled(this->ptr_, TOF_ERROR_HANDLER{});
413 }
414
415 /** Set whether the temporal filter is enabled. The temporal filter is a
416 * running average as long as the values are within sigma standard deviations
417 * of each other
418 * @param enabled Enabled
419 */
420 void set_temporal_enabled(bool enabled) {
421 return tof_processing_config_set_temporal_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
422 }
423
424 /** Get the number of standard deviations before resetting the running average
425 * @return The standard deviation
426 */
427 double get_temporal_sigma() const {
428 return tof_processing_config_get_temporal_sigma(this->ptr_, TOF_ERROR_HANDLER{});
429 }
430
431 /** Set the number of standard deviations before resetting the running average
432 * @param sigma The standard deviation
433 */
434 void set_temporal_sigma(double sigma) {
435 return tof_processing_config_set_temporal_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
436 }
437
438 /** Get the maximum number of frames to average together
439 * @return Number of frames
440 */
441 size_t get_temporal_nframes() const {
442 return tof_processing_config_get_temporal_nframes(this->ptr_, TOF_ERROR_HANDLER{});
443 }
444
445 /** Set the maximum number of frames to average together
446 * @param nframes Number of frames
447 */
448 void set_temporal_nframes(size_t nframes) {
449 return tof_processing_config_set_temporal_nframes(this->ptr_, nframes, TOF_ERROR_HANDLER{});
450 }
451
452 /** Get whether the gaussian blur is enabled. This is a standard gaussian blur
453 * applied over the depth image
454 * @return Enabled
455 */
456 bool get_gaussian_enabled() const {
457 return tof_processing_config_get_gaussian_enabled(this->ptr_, TOF_ERROR_HANDLER{});
458 }
459
460 /** Set whether the gaussian blur is enabled. This is a standard gaussian blur
461 * applied over the depth image
462 * @param enabled Enabled
463 */
464 void set_gaussian_enabled(bool enabled) {
465 return tof_processing_config_set_gaussian_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
466 }
467
468 /** Get the gaussian region size
469 * @return Region size, 3x3 and 5x5 are supported
470 */
471 size_t get_gaussian_size() const {
472 return tof_processing_config_get_gaussian_size(this->ptr_, TOF_ERROR_HANDLER{});
473 }
474
475 /** Set the gaussian region size
476 * @param size Region size, 3x3 and 5x5 are supported
477 */
478 void set_gaussian_size(size_t size) {
479 return tof_processing_config_set_gaussian_size(this->ptr_, size, TOF_ERROR_HANDLER{});
480 }
481
482 /** Get the gaussian sigma
483 * @return The standard deviation
484 */
485 double get_gaussian_sigma() const {
486 return tof_processing_config_get_gaussian_sigma(this->ptr_, TOF_ERROR_HANDLER{});
487 }
488
489 /** Set the gaussian sigma
490 * @param sigma The standard deviation
491 */
492 void set_gaussian_sigma(double sigma) {
493 return tof_processing_config_set_gaussian_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
494 }
495
496 /** Get whether the median filter is enabled. This is a standard median filter
497 * applied over the depth image
498 * @return Enabled
499 */
500 bool get_median_enabled() const {
501 return tof_processing_config_get_median_enabled(this->ptr_, TOF_ERROR_HANDLER{});
502 }
503
504 /** Set whether the median filter is enabled. This is a standard median filter
505 * applied over the depth image
506 * @param enabled Enabled
507 */
508 void set_median_enabled(bool enabled) {
509 return tof_processing_config_set_median_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
510 }
511
512 /** Get the median region size
513 * @return Region size, 3x3 and 5x5 are supported
514 */
515 size_t get_median_size() const {
516 return tof_processing_config_get_median_size(this->ptr_, TOF_ERROR_HANDLER{});
517 }
518
519 /** Set the median region size
520 * @param size Region size, 3x3 and 5x5 are supported
521 */
522 void set_median_size(size_t size) {
523 return tof_processing_config_set_median_size(this->ptr_, size, TOF_ERROR_HANDLER{});
524 }
525
526 /** Get whether the bilateral filter is enabled. This filter averages the
527 * current pixel with neighboring ones if they're within the specified
528 * standard deviation
529 * @return Enabled
530 */
532 return tof_processing_config_get_bilateral_enabled(this->ptr_, TOF_ERROR_HANDLER{});
533 }
534
535 /** Set whether the bilateral filter is enabled. This filter averages the
536 * current pixel with neighboring ones if they're within the specified
537 * standard deviation
538 * @param enabled Enabled
539 */
540 void set_bilateral_enabled(bool enabled) {
541 return tof_processing_config_set_bilateral_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
542 }
543
544 /** Get the bilateral region size
545 * @return Region size, 3x3 and 5x5 are supported
546 */
547 size_t get_bilateral_size() const {
548 return tof_processing_config_get_bilateral_size(this->ptr_, TOF_ERROR_HANDLER{});
549 }
550
551 /** Set the bilateral region size
552 * @param size Region size, 3x3 and 5x5 are supported
553 */
554 void set_bilateral_size(size_t size) {
555 return tof_processing_config_set_bilateral_size(this->ptr_, size, TOF_ERROR_HANDLER{});
556 }
557
558 /** Get the bilateral standard deviation
559 * @return The standard deviation
560 */
561 double get_bilateral_sigma() const {
562 return tof_processing_config_get_bilateral_sigma(this->ptr_, TOF_ERROR_HANDLER{});
563 }
564
565 /** Set the bilateral standard deviation
566 * @param sigma The standard deviation
567 */
568 void set_bilateral_sigma(double sigma) {
569 return tof_processing_config_set_bilateral_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
570 }
571
572 /** Get Whether the local means filter is enabled.
573 * @return Enabled
574 */
576 return tof_processing_config_get_local_means_enabled(this->ptr_, TOF_ERROR_HANDLER{});
577 }
578
579 /** Set Whether the local means filter is enabled.
580 * @param enabled Enabled
581 */
582 void set_local_means_enabled(bool enabled) {
583 return tof_processing_config_set_local_means_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
584 }
585
586 /** Get The local means region size
587 * @return Region size
588 */
589 size_t get_local_means_size() const {
590 return tof_processing_config_get_local_means_size(this->ptr_, TOF_ERROR_HANDLER{});
591 }
592
593 /** Set The local means region size
594 * @param size Region size
595 */
596 void set_local_means_size(size_t size) {
597 return tof_processing_config_set_local_means_size(this->ptr_, size, TOF_ERROR_HANDLER{});
598 }
599
600 /** Get The local means standard deviation for how close values are
601 * @return The stand deviation
602 */
603 double get_local_means_sigma() const {
604 return tof_processing_config_get_local_means_sigma(this->ptr_, TOF_ERROR_HANDLER{});
605 }
606
607 /** Set The local means standard deviation for how close values are
608 * @param sigma The stand deviation
609 */
610 void set_local_means_sigma(double sigma) {
611 return tof_processing_config_set_local_means_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
612 }
613
614 /** Get whether flying pixel filter is enabled. The flying pixel filters out
615 * pixels when more than x edges are farther than x size away
616 * @return Enabled
617 */
618 bool get_flying_enabled() const {
619 return tof_processing_config_get_flying_enabled(this->ptr_, TOF_ERROR_HANDLER{});
620 }
621
622 /** Set whether flying pixel filter is enabled. The flying pixel filters out
623 * pixels when more than x edges are farther than x size away
624 * @param enabled Enabled
625 */
626 void set_flying_enabled(bool enabled) {
627 return tof_processing_config_set_flying_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
628 }
629
630 /** Get the shape of which surrounding pixels are checked
631 * @return The shape
632 */
633 FlyingShape get_flying_shape() const {
634 return static_cast<FlyingShape>(tof_processing_config_get_flying_shape(this->ptr_, TOF_ERROR_HANDLER{}));
635 }
636
637 /** Set the shape of which surrounding pixels are checked
638 * @param shape The shape
639 */
640 void set_flying_shape(FlyingShape shape) {
641 return tof_processing_config_set_flying_shape(this->ptr_, static_cast<tof_flying_shape>(shape), TOF_ERROR_HANDLER{});
642 }
643
644 /** Get the maximum distance allowed between surrounding pixels
645 * @return Maximum distance
646 */
647 size_t get_flying_distance() const {
648 return tof_processing_config_get_flying_distance(this->ptr_, TOF_ERROR_HANDLER{});
649 }
650
651 /** Set the maximum distance allowed between surrounding pixels
652 * @param distance Maximum distance
653 */
654 void set_flying_distance(size_t distance) {
655 return tof_processing_config_set_flying_distance(this->ptr_, distance, TOF_ERROR_HANDLER{});
656 }
657
658 /** Get the number of edges allowed to be larger than maximum distance
659 * @return Maximum edges
660 */
661 size_t get_flying_edges() const {
662 return tof_processing_config_get_flying_edges(this->ptr_, TOF_ERROR_HANDLER{});
663 }
664
665 /** Set the number of edges allowed to be larger than maximum distance
666 * @param edges Maximum edges
667 */
668 void set_flying_edges(size_t edges) {
669 return tof_processing_config_set_flying_edges(this->ptr_, edges, TOF_ERROR_HANDLER{});
670 }
671
672 /** Get whether the amplitude threshold filter is enabled. This filter filters
673 * out pixels outside of the specified values
674 * @return Enabled
675 */
677 return tof_processing_config_get_amp_threshold_enabled(this->ptr_, TOF_ERROR_HANDLER{});
678 }
679
680 /** Set whether the amplitude threshold filter is enabled. This filter filters
681 * out pixels outside of the specified values
682 * @param enabled Enabled
683 */
684 void set_amp_threshold_enabled(bool enabled) {
685 return tof_processing_config_set_amp_threshold_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
686 }
687
688 /** Get the minimum amplitude allowed
689 * @return Minimum value
690 */
691 double get_amp_threshold_min() const {
692 return tof_processing_config_get_amp_threshold_min(this->ptr_, TOF_ERROR_HANDLER{});
693 }
694
695 /** Set the minimum amplitude allowed
696 * @param min Minimum value
697 */
698 void set_amp_threshold_min(double min) {
699 return tof_processing_config_set_amp_threshold_min(this->ptr_, min, TOF_ERROR_HANDLER{});
700 }
701
702 /** Get the maximum amplitude allowed
703 * @return Maximum value
704 */
705 double get_amp_threshold_max() const {
706 return tof_processing_config_get_amp_threshold_max(this->ptr_, TOF_ERROR_HANDLER{});
707 }
708
709 /** Set the maximum amplitude allowed
710 * @param max Maximum value
711 */
712 void set_amp_threshold_max(double max) {
713 return tof_processing_config_set_amp_threshold_max(this->ptr_, max, TOF_ERROR_HANDLER{});
714 }
715
716 /** Get whether the distance threshold filter is enabled. This filter filters
717 * out pixels outside of the specified values
718 * @return Enabled
719 */
721 return tof_processing_config_get_dist_threshold_enabled(this->ptr_, TOF_ERROR_HANDLER{});
722 }
723
724 /** Set whether the distance threshold filter is enabled. This filter filters
725 * out pixels outside of the specified values
726 * @param enabled Enabled
727 */
728 void set_dist_threshold_enabled(bool enabled) {
729 return tof_processing_config_set_dist_threshold_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
730 }
731
732 /** Get the minimum distance allowed
733 * @return Minimum value
734 */
735 double get_dist_threshold_min() const {
736 return tof_processing_config_get_dist_threshold_min(this->ptr_, TOF_ERROR_HANDLER{});
737 }
738
739 /** Set the minimum distance allowed
740 * @param min Minimum value
741 */
742 void set_dist_threshold_min(double min) {
743 return tof_processing_config_set_dist_threshold_min(this->ptr_, min, TOF_ERROR_HANDLER{});
744 }
745
746 /** Get the maximum distance allowed
747 * @return Maximum value
748 */
749 double get_dist_threshold_max() const {
750 return tof_processing_config_get_dist_threshold_max(this->ptr_, TOF_ERROR_HANDLER{});
751 }
752
753 /** Set the maximum distance allowed
754 * @param max Maximum value
755 */
756 void set_dist_threshold_max(double max) {
757 return tof_processing_config_set_dist_threshold_max(this->ptr_, max, TOF_ERROR_HANDLER{});
758 }
759
760 /** Get how much to scale the radial value by
761 * @return Radial scale
762 */
763 float get_radial_scale() const {
764 return tof_processing_config_get_radial_scale(this->ptr_, TOF_ERROR_HANDLER{});
765 }
766
767 /** Set how much to scale the radial value by
768 * @param scale Radial scale
769 */
770 void set_radial_scale(float scale) {
771 return tof_processing_config_set_radial_scale(this->ptr_, scale, TOF_ERROR_HANDLER{});
772 }
773
774 /** Get how much to add to the radial value
775 * @return Radial addition
776 */
777 float get_radial_add() const {
778 return tof_processing_config_get_radial_add(this->ptr_, TOF_ERROR_HANDLER{});
779 }
780
781 /** Set how much to add to the radial value
782 * @param addition Radial addition
783 */
784 void set_radial_add(float addition) {
785 return tof_processing_config_set_radial_add(this->ptr_, addition, TOF_ERROR_HANDLER{});
786 }
787
788 /** Get how much to scale the intensity value by
789 * @return Intensity scale
790 */
791 float get_intensity_scale() const {
792 return tof_processing_config_get_intensity_scale(this->ptr_, TOF_ERROR_HANDLER{});
793 }
794
795 /** Set how much to scale the intensity value by
796 * @param scale Intensity scale
797 */
798 void set_intensity_scale(float scale) {
799 return tof_processing_config_set_intensity_scale(this->ptr_, scale, TOF_ERROR_HANDLER{});
800 }
801
802 /** Get how much to add to the intensity value
803 * @return Intensity addition
804 */
805 float get_intensity_add() const {
806 return tof_processing_config_get_intensity_add(this->ptr_, TOF_ERROR_HANDLER{});
807 }
808
809 /** Set how much to add to the intensity value
810 * @param addition Intensity addition
811 */
812 void set_intensity_add(float addition) {
813 return tof_processing_config_set_intensity_add(this->ptr_, addition, TOF_ERROR_HANDLER{});
814 }
815
816 /** Get the characterization addition component. The characterization function
817 * computes the sigma for the temporal and bilateral filter
818 * @return addition
819 */
820 double get_char_add() const {
821 return tof_processing_config_get_char_add(this->ptr_, TOF_ERROR_HANDLER{});
822 }
823
824 /** Set the characterization addition component. The characterization function
825 * computes the sigma for the temporal and bilateral filter
826 * @param addition addition
827 */
828 void set_char_add(double addition) {
829 return tof_processing_config_set_char_add(this->ptr_, addition, TOF_ERROR_HANDLER{});
830 }
831
832 /** Get the characterization multiplication component. The characterization
833 * function computes the sigma for the temporal and bilateral filter
834 * @return Multiplication
835 */
836 double get_char_mult() const {
837 return tof_processing_config_get_char_mult(this->ptr_, TOF_ERROR_HANDLER{});
838 }
839
840 /** Set the characterization multiplication component. The characterization
841 * function computes the sigma for the temporal and bilateral filter
842 * @param multiplication Multiplication
843 */
844 void set_char_mult(double multiplication) {
845 return tof_processing_config_set_char_mult(this->ptr_, multiplication, TOF_ERROR_HANDLER{});
846 }
847
848 /** Get whether software binning is enabled
849 * @return Enabled
850 */
851 bool get_binning_enabled() const {
852 return tof_processing_config_get_binning_enabled(this->ptr_, TOF_ERROR_HANDLER{});
853 }
854
855 /** Set whether software binning is enabled
856 * @param enabled Enabled
857 */
858 void set_binning_enabled(bool enabled) {
859 return tof_processing_config_set_binning_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
860 }
861
862 /** Get the size of the area to bin, 2 would bin a 2x2 area
863 * @return The bin size
864 */
865 size_t get_binning_size() const {
866 return tof_processing_config_get_binning_size(this->ptr_, TOF_ERROR_HANDLER{});
867 }
868
869 /** Set the size of the area to bin, 2 would bin a 2x2 area
870 * @param size The bin size
871 */
872 void set_binning_size(size_t size) {
873 return tof_processing_config_set_binning_size(this->ptr_, size, TOF_ERROR_HANDLER{});
874 }
875
876 /** Get the binning mode to use
877 * @return The binning mode
878 */
879 BinningMode get_binning_mode() const {
880 return static_cast<BinningMode>(tof_processing_config_get_binning_mode(this->ptr_, TOF_ERROR_HANDLER{}));
881 }
882
883 /** Set the binning mode to use
884 * @param mode The binning mode
885 */
886 void set_binning_mode(BinningMode mode) {
887 return tof_processing_config_set_binning_mode(this->ptr_, static_cast<tof_binning_mode>(mode), TOF_ERROR_HANDLER{});
888 }
889
890 /** Get The maximum standard deviation to use, only used in the smart binning
891 * mode
892 * @return The standard deviation
893 */
894 float get_binning_sigma() const {
895 return tof_processing_config_get_binning_sigma(this->ptr_, TOF_ERROR_HANDLER{});
896 }
897
898 /** Set The maximum standard deviation to use, only used in the smart binning
899 * mode
900 * @param sigma The standard deviation
901 */
902 void set_binning_sigma(float sigma) {
903 return tof_processing_config_set_binning_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
904 }
905
906 /** Get the dimension of the xyz output
907 * @return The dimension
908 */
909 XyzDimension get_xyz_dimension() const {
910 return static_cast<XyzDimension>(tof_processing_config_get_xyz_dimension(this->ptr_, TOF_ERROR_HANDLER{}));
911 }
912
913 /** Set the dimension of the xyz output
914 * @param dimension The dimension
915 */
916 void set_xyz_dimension(XyzDimension dimension) {
917 return tof_processing_config_set_xyz_dimension(this->ptr_, static_cast<tof_xyz_dimension>(dimension), TOF_ERROR_HANDLER{});
918 }
919
920 /** Get whether rigid transformation is enabled
921 * @return Enabled
922 */
924 return tof_processing_config_get_rigid_transformation_enabled(this->ptr_, TOF_ERROR_HANDLER{});
925 }
926
927 /** Set whether rigid transformation is enabled
928 * @param enabled Enabled
929 */
931 return tof_processing_config_set_rigid_transformation_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
932 }
933
934 /** Get the rigid transformation 4x4 matrix
935 * @return 4x4 transformation matrix
936 */
937 std::array<float, 16> get_rigid_transformation_matrix() const {
938 std::array<float, 16> array;
939 auto data = tof_processing_config_get_rigid_transformation_matrix(this->ptr_, TOF_ERROR_HANDLER{});
940 std::copy(data, data + array.size(), array.data());
941 return array;
942 }
943
944 /** Set the rigid transformation 4x4 matrix
945 * @param matrix 4x4 transformation matrix
946 */
947 void set_rigid_transformation_matrix(const std::array<float, 16> &matrix) {
948 return tof_processing_config_set_rigid_transformation_matrix(this->ptr_, matrix.data(), TOF_ERROR_HANDLER{});
949 }
950
951};
952
953} // tof
954} // chronoptics
955
956#endif
Processing that can be done.
void set_mixed_pixel_max_error_3f(double max_error_3f)
Set the maximum error when using three modulation frequencies.
size_t get_average_nframes() const
Get the number of frames to average together.
void set_bilateral_size(size_t size)
Set the bilateral region size.
void set_mixed_pixel_enabled(bool enabled)
Set wether mixed pixel is enabled.
size_t get_flying_edges() const
Get the number of edges allowed to be larger than maximum distance.
double get_bilateral_sigma() const
Get the bilateral standard deviation.
void set_hdr_enabled(bool enabled)
Set whether hdr is enabled.
bool get_phase_unwrapping_enabled() const
Get whether phase unwrapping is enabled.
double get_mixed_pixel_adaptive_amp_min() const
Get the minimum amplitude for adaptive sorting.
bool get_hdr_enabled() const
Get whether hdr is enabled.
void set_rigid_transformation_matrix(const std::array< float, 16 > &matrix)
Set the rigid transformation 4x4 matrix.
void set_temporal_nframes(size_t nframes)
Set the maximum number of frames to average together.
bool get_binning_enabled() const
Get whether software binning is enabled.
void set_amp_threshold_enabled(bool enabled)
Set whether the amplitude threshold filter is enabled.
bool get_mixed_pixel_enabled() const
Get wether mixed pixel is enabled.
float get_intensity_add() const
Get how much to add to the intensity value.
double get_mixed_pixel_aggressor_threshold() const
Get the threshold to classify a pixel as an aggressor.
bool get_gpu() const
Get whether processing on the gpu is enabled.
FlyingShape get_flying_shape() const
Get the shape of which surrounding pixels are checked.
float get_radial_add() const
Get how much to add to the radial value.
double get_mixed_pixel_aratio_min() const
Get the minimum return amplitude ratio for adaptive sorting.
std::array< float, 16 > get_rigid_transformation_matrix() const
Get the rigid transformation 4x4 matrix.
void set_temporal_sigma(double sigma)
Set the number of standard deviations before resetting the running average.
double get_temporal_sigma() const
Get the number of standard deviations before resetting the running average.
void set_binning_sigma(float sigma)
Set The maximum standard deviation to use, only used in the smart binning mode.
void set_mixed_pixel_min_aggressor_size(int32_t size)
Set the minimum amount of bright pixels before a bright spot is classified as an aggressor.
bool get_local_means_enabled() const
Get Whether the local means filter is enabled.
void set_local_means_size(size_t size)
Set The local means region size.
void set_gaussian_sigma(double sigma)
Set the gaussian sigma.
void set_average_nframes(size_t nframes)
Set the number of frames to average together.
ProcessingConfig()
Create default processing config.
float get_intensity_scale() const
Get how much to scale the intensity value by.
double get_char_mult() const
Get the characterization multiplication component.
void set_binning_enabled(bool enabled)
Set whether software binning is enabled.
bool get_rigid_transformation_enabled() const
Get whether rigid transformation is enabled.
void set_mixed_pixel_sort_mode(MpSortMode sort_mode)
Set what output is selected.
float get_mpi_detect_aratio() const
Get The amplitude ratio value.
double get_gaussian_sigma() const
Get the gaussian sigma.
void set_mixed_pixel_aggressor_phi_offset(double aggressor_phi_offset)
Set The maximum phase difference before a return is not classified as aggressor.
double get_mixed_pixel_aggressor_phi_offset() const
Get The maximum phase difference before a return is not classified as aggressor.
double get_mixed_pixel_adaptive_amp_max() const
Get the maximum amplitude for adaptive sorting.
double get_mixed_pixel_aratio() const
Get the amplitude ratio for detecting MPI.
void set_radial_add(float addition)
Set how much to add to the radial value.
size_t get_gaussian_size() const
Get the gaussian region size.
bool get_flying_enabled() const
Get whether flying pixel filter is enabled.
void set_amp_threshold_max(double max)
Set the maximum amplitude allowed.
void set_char_add(double addition)
Set the characterization addition component.
void set_flying_enabled(bool enabled)
Set whether flying pixel filter is enabled.
void set_char_mult(double multiplication)
Set the characterization multiplication component.
void set_flying_edges(size_t edges)
Set the number of edges allowed to be larger than maximum distance.
double get_phase_unwrapping_max_offset() const
Get The maximum distance between ideal location and actual.
void set_flying_distance(size_t distance)
Set the maximum distance allowed between surrounding pixels.
bool get_temporal_enabled() const
Get whether the temporal filter is enabled.
void set_mpi_detect_enabled(bool enabled)
Set wether mpi detect is enabled.
void set_binning_size(size_t size)
Set the size of the area to bin, 2 would bin a 2x2 area.
bool get_bilateral_enabled() const
Get whether the bilateral filter is enabled.
size_t get_local_means_size() const
Get The local means region size.
float get_binning_sigma() const
Get The maximum standard deviation to use, only used in the smart binning mode.
bool get_median_enabled() const
Get whether the median filter is enabled.
bool get_amp_threshold_enabled() const
Get whether the amplitude threshold filter is enabled.
float get_mpi_detect_phi_diff() const
Get the phase difference ratio.
void set_amp_threshold_min(double min)
Set the minimum amplitude allowed.
void set_median_enabled(bool enabled)
Set whether the median filter is enabled.
void set_mixed_pixel_aggressor_threshold(double threshold)
Set the threshold to classify a pixel as an aggressor.
void set_phase_unwrapping_enabled(bool enabled)
Set whether phase unwrapping is enabled.
void set_rigid_transformation_enabled(bool enabled)
Set whether rigid transformation is enabled.
MpSortMode get_mixed_pixel_sort_mode() const
Get what output is selected.
BinningMode get_binning_mode() const
Get the binning mode to use.
void set_gaussian_size(size_t size)
Set the gaussian region size.
int32_t get_mixed_pixel_min_aggressor_size() const
Get the minimum amount of bright pixels before a bright spot is classified as an aggressor.
double get_mixed_pixel_max_error_3f() const
Get the maximum error when using three modulation frequencies.
void set_mixed_pixel_aratio_min(double aratio_min)
Set the minimum return amplitude ratio for adaptive sorting.
void set_local_means_sigma(double sigma)
Set The local means standard deviation for how close values are.
void write(StringView file_location) const
Write processing config to disk.
void set_intensity_scale(float scale)
Set how much to scale the intensity value by.
void set_mixed_pixel_phi_diff(double phi_diff)
Set the phase difference for detecting MPI.
bool get_calibration_enabled() const
Get whether the calibration is applied.
void set_temporal_enabled(bool enabled)
Set whether the temporal filter is enabled.
void set_local_means_enabled(bool enabled)
Set Whether the local means filter is enabled.
size_t get_binning_size() const
Get the size of the area to bin, 2 would bin a 2x2 area.
void set_calibration_enabled(bool enabled)
Set whether the calibration is applied.
double get_mixed_pixel_amp_min() const
Get minimum amplitude that pixel needs to have to apply mixed pixel to it.
void set_xyz_dimension(XyzDimension dimension)
Set the dimension of the xyz output.
bool get_average_enabled() const
Get whether averaging is enabled.
void set_radial_scale(float scale)
Set how much to scale the radial value by.
void set_mixed_pixel_amp_min(double amp_min)
Set minimum amplitude that pixel needs to have to apply mixed pixel to it.
void set_phase_unwrapping_max_offset(double max_offset)
Set The maximum distance between ideal location and actual.
void set_dist_threshold_enabled(bool enabled)
Set whether the distance threshold filter is enabled.
double get_dist_threshold_max() const
Get the maximum distance allowed.
XyzDimension get_xyz_dimension() const
Get the dimension of the xyz output.
void set_mixed_pixel_adaptive_amp_max(double adaptive_amp_max)
Set the maximum amplitude for adaptive sorting.
bool get_gaussian_enabled() const
Get whether the gaussian blur is enabled.
size_t get_flying_distance() const
Get the maximum distance allowed between surrounding pixels.
bool get_mpi_detect_enabled() const
Get wether mpi detect is enabled.
const char * get_mixed_pixel_lut_file() const
Get location of the mixed pixel look up table file.
void set_mixed_pixel_aratio(double aratio)
Set the amplitude ratio for detecting MPI.
ProcessingConfig(StringView file_location)
Load processing config from disk.
bool get_dist_threshold_enabled() const
Get whether the distance threshold filter is enabled.
void set_dist_threshold_min(double min)
Set the minimum distance allowed.
double get_amp_threshold_max() const
Get the maximum amplitude allowed.
void set_mpi_detect_aratio(float aratio)
Set The amplitude ratio value.
double get_local_means_sigma() const
Get The local means standard deviation for how close values are.
void set_median_size(size_t size)
Set the median region size.
void set_mixed_pixel_adaptive_amp_min(double adaptive_amp_min)
Set the minimum amplitude for adaptive sorting.
void set_mpi_detect_phi_diff(float phi_diff)
Set the phase difference ratio.
void set_mixed_pixel_lut_file(StringView file_location)
Set location of the mixed pixel look up table file.
void set_intensity_add(float addition)
Set how much to add to the intensity value.
void set_gpu(bool gpu)
Set whether processing on the gpu is enabled.
void set_dist_threshold_max(double max)
Set the maximum distance allowed.
void set_flying_shape(FlyingShape shape)
Set the shape of which surrounding pixels are checked.
ProcessingConfig(tof_processing_config_t ptr)
Construct from pointer.
double get_amp_threshold_min() const
Get the minimum amplitude allowed.
void set_binning_mode(BinningMode mode)
Set the binning mode to use.
void set_average_enabled(bool enabled)
Set whether averaging is enabled.
void set_bilateral_enabled(bool enabled)
Set whether the bilateral filter is enabled.
double get_mixed_pixel_phi_diff() const
Get the phase difference for detecting MPI.
float get_radial_scale() const
Get how much to scale the radial value by.
double get_char_add() const
Get the characterization addition component.
void set_bilateral_sigma(double sigma)
Set the bilateral standard deviation.
size_t get_median_size() const
Get the median region size.
void set_gaussian_enabled(bool enabled)
Set whether the gaussian blur is enabled.
double get_dist_threshold_min() const
Get the minimum distance allowed.
size_t get_temporal_nframes() const
Get the maximum number of frames to average together.
size_t get_bilateral_size() const
Get the bilateral region size.