Time-of-Flight Library(ToF) 3.4.0
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 mixed pixel is enabled
131 * @return Enabled
132 */
134 return tof_processing_config_get_mixed_pixel_enabled(this->ptr_, TOF_ERROR_HANDLER{});
135 }
136
137 /** Set wether mixed pixel is enabled
138 * @param enabled Enabled
139 */
140 void set_mixed_pixel_enabled(bool enabled) {
141 return tof_processing_config_set_mixed_pixel_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
142 }
143
144 /** Get location of the mixed pixel look up table file
145 * @return File location
146 */
147 const char* get_mixed_pixel_lut_file() const {
148 return tof_processing_config_get_mixed_pixel_lut_file(this->ptr_, TOF_ERROR_HANDLER{});
149 }
150
151 /** Set location of the mixed pixel look up table file
152 * @param file_location File location
153 */
154 void set_mixed_pixel_lut_file(StringView file_location) {
155 return tof_processing_config_set_mixed_pixel_lut_file(this->ptr_, file_location, TOF_ERROR_HANDLER{});
156 }
157
158 /** Get minimum amplitude that pixel needs to have to apply mixed pixel to it
159 * @return Minimum amplitude
160 */
161 double get_mixed_pixel_amp_min() const {
162 return tof_processing_config_get_mixed_pixel_amp_min(this->ptr_, TOF_ERROR_HANDLER{});
163 }
164
165 /** Set minimum amplitude that pixel needs to have to apply mixed pixel to it
166 * @param amp_min Minimum amplitude
167 */
168 void set_mixed_pixel_amp_min(double amp_min) {
169 return tof_processing_config_set_mixed_pixel_amp_min(this->ptr_, amp_min, TOF_ERROR_HANDLER{});
170 }
171
172 /** Get what output is selected
173 * @return Sort mode
174 */
175 MpSortMode get_mixed_pixel_sort_mode() const {
176 return static_cast<MpSortMode>(tof_processing_config_get_mixed_pixel_sort_mode(this->ptr_, TOF_ERROR_HANDLER{}));
177 }
178
179 /** Set what output is selected
180 * @param sort_mode Sort mode
181 */
182 void set_mixed_pixel_sort_mode(MpSortMode sort_mode) {
183 return tof_processing_config_set_mixed_pixel_sort_mode(this->ptr_, static_cast<tof_mp_sort_mode>(sort_mode), TOF_ERROR_HANDLER{});
184 }
185
186 /** Get the amplitude ratio for detecting MPI
187 * @return Amplitude ratio
188 */
189 double get_mixed_pixel_aratio() const {
190 return tof_processing_config_get_mixed_pixel_aratio(this->ptr_, TOF_ERROR_HANDLER{});
191 }
192
193 /** Set the amplitude ratio for detecting MPI
194 * @param aratio Amplitude ratio
195 */
196 void set_mixed_pixel_aratio(double aratio) {
197 return tof_processing_config_set_mixed_pixel_aratio(this->ptr_, aratio, TOF_ERROR_HANDLER{});
198 }
199
200 /** Get the phase difference for detecting MPI
201 * @return Phase difference
202 */
204 return tof_processing_config_get_mixed_pixel_phi_diff(this->ptr_, TOF_ERROR_HANDLER{});
205 }
206
207 /** Set the phase difference for detecting MPI
208 * @param phi_diff Phase difference
209 */
210 void set_mixed_pixel_phi_diff(double phi_diff) {
211 return tof_processing_config_set_mixed_pixel_phi_diff(this->ptr_, phi_diff, TOF_ERROR_HANDLER{});
212 }
213
214 /** Get the threshold to classify a pixel as an aggressor
215 * @return Aggressor threshold
216 */
218 return tof_processing_config_get_mixed_pixel_aggressor_threshold(this->ptr_, TOF_ERROR_HANDLER{});
219 }
220
221 /** Set the threshold to classify a pixel as an aggressor
222 * @param threshold Aggressor threshold
223 */
224 void set_mixed_pixel_aggressor_threshold(double threshold) {
225 return tof_processing_config_set_mixed_pixel_aggressor_threshold(this->ptr_, threshold, TOF_ERROR_HANDLER{});
226 }
227
228 /** Get the size of the morphological filter to remove small bright pixels
229 * @return Minimum aggressor size
230 */
232 return tof_processing_config_get_mixed_pixel_min_aggressor_size(this->ptr_, TOF_ERROR_HANDLER{});
233 }
234
235 /** Set the size of the morphological filter to remove small bright pixels
236 * @param size Minimum aggressor size
237 */
239 return tof_processing_config_set_mixed_pixel_min_aggressor_size(this->ptr_, size, TOF_ERROR_HANDLER{});
240 }
241
242 /** Get The maximum error when using three modulation frequencies
243 * @return The error
244 */
246 return tof_processing_config_get_mixed_pixel_max_error_3f(this->ptr_, TOF_ERROR_HANDLER{});
247 }
248
249 /** Set The maximum error when using three modulation frequencies
250 * @param max_error_3f The error
251 */
252 void set_mixed_pixel_max_error_3f(double max_error_3f) {
253 return tof_processing_config_set_mixed_pixel_max_error_3f(this->ptr_, max_error_3f, TOF_ERROR_HANDLER{});
254 }
255
256 /** Get The maximum amplitude for adaptive sorting
257 * @return Maximum amplitude
258 */
260 return tof_processing_config_get_mixed_pixel_adaptive_amp_max(this->ptr_, TOF_ERROR_HANDLER{});
261 }
262
263 /** Set The maximum amplitude for adaptive sorting
264 * @param adaptive_amp_max Maximum amplitude
265 */
266 void set_mixed_pixel_adaptive_amp_max(double adaptive_amp_max) {
267 return tof_processing_config_set_mixed_pixel_adaptive_amp_max(this->ptr_, adaptive_amp_max, TOF_ERROR_HANDLER{});
268 }
269
270 /** Get The minimum amplitude for adaptive sorting
271 * @return Minimum amplitude
272 */
274 return tof_processing_config_get_mixed_pixel_adaptive_amp_min(this->ptr_, TOF_ERROR_HANDLER{});
275 }
276
277 /** Set The minimum amplitude for adaptive sorting
278 * @param adaptive_amp_min Minimum amplitude
279 */
280 void set_mixed_pixel_adaptive_amp_min(double adaptive_amp_min) {
281 return tof_processing_config_set_mixed_pixel_adaptive_amp_min(this->ptr_, adaptive_amp_min, TOF_ERROR_HANDLER{});
282 }
283
284 /** Get The minimum return amplitude ratio for adaptive sorting
285 * @return Minimum return ratio
286 */
288 return tof_processing_config_get_mixed_pixel_aratio_min(this->ptr_, TOF_ERROR_HANDLER{});
289 }
290
291 /** Set The minimum return amplitude ratio for adaptive sorting
292 * @param aratio_min Minimum return ratio
293 */
294 void set_mixed_pixel_aratio_min(double aratio_min) {
295 return tof_processing_config_set_mixed_pixel_aratio_min(this->ptr_, aratio_min, TOF_ERROR_HANDLER{});
296 }
297
298 /** Get The maximum phase difference before a return is not classified as
299 * aggressor
300 * @return Phase offset before not a aggressor return
301 */
303 return tof_processing_config_get_mixed_pixel_aggressor_phi_offset(this->ptr_, TOF_ERROR_HANDLER{});
304 }
305
306 /** Set The maximum phase difference before a return is not classified as
307 * aggressor
308 * @param aggressor_phi_offset Phase offset before not a aggressor return
309 */
310 void set_mixed_pixel_aggressor_phi_offset(double aggressor_phi_offset) {
311 return tof_processing_config_set_mixed_pixel_aggressor_phi_offset(this->ptr_, aggressor_phi_offset, TOF_ERROR_HANDLER{});
312 }
313
314 /** Get whether hdr is enabled. High dynamic range allows you to separate
315 * depth with high intensity difference. This is mostly useful when the sensor
316 * is being saturated.
317 * @return Enabled
318 */
319 bool get_hdr_enabled() const {
320 return tof_processing_config_get_hdr_enabled(this->ptr_, TOF_ERROR_HANDLER{});
321 }
322
323 /** Set whether hdr is enabled. High dynamic range allows you to separate
324 * depth with high intensity difference. This is mostly useful when the sensor
325 * is being saturated.
326 * @param enabled Enabled
327 */
328 void set_hdr_enabled(bool enabled) {
329 return tof_processing_config_set_hdr_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
330 }
331
332 /** Get whether averaging is enabled. The average process allows you to
333 * average multiple frames together at the cost of frame rate
334 * @return Enabled
335 */
336 bool get_average_enabled() const {
337 return tof_processing_config_get_average_enabled(this->ptr_, TOF_ERROR_HANDLER{});
338 }
339
340 /** Set whether averaging is enabled. The average process allows you to
341 * average multiple frames together at the cost of frame rate
342 * @param enabled Enabled
343 */
344 void set_average_enabled(bool enabled) {
345 return tof_processing_config_set_average_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
346 }
347
348 /** Get the number of frames to average together
349 * @return Number of frames
350 */
351 size_t get_average_nframes() const {
352 return tof_processing_config_get_average_nframes(this->ptr_, TOF_ERROR_HANDLER{});
353 }
354
355 /** Set the number of frames to average together
356 * @param nframes Number of frames
357 */
358 void set_average_nframes(size_t nframes) {
359 return tof_processing_config_set_average_nframes(this->ptr_, nframes, TOF_ERROR_HANDLER{});
360 }
361
362 /** Get whether the temporal filter is enabled. The temporal filter is a
363 * running average as long as the values are within sigma standard deviations
364 * of each other
365 * @return Enabled
366 */
367 bool get_temporal_enabled() const {
368 return tof_processing_config_get_temporal_enabled(this->ptr_, TOF_ERROR_HANDLER{});
369 }
370
371 /** Set whether the temporal filter is enabled. The temporal filter is a
372 * running average as long as the values are within sigma standard deviations
373 * of each other
374 * @param enabled Enabled
375 */
376 void set_temporal_enabled(bool enabled) {
377 return tof_processing_config_set_temporal_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
378 }
379
380 /** Get the number of standard deviations before resetting the running
381 * average
382 * @return The standard deviation
383 */
384 double get_temporal_sigma() const {
385 return tof_processing_config_get_temporal_sigma(this->ptr_, TOF_ERROR_HANDLER{});
386 }
387
388 /** Set the number of standard deviations before resetting the running
389 * average
390 * @param sigma The standard deviation
391 */
392 void set_temporal_sigma(double sigma) {
393 return tof_processing_config_set_temporal_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
394 }
395
396 /** Get the maximum number of frames to average together
397 * @return Number of frames
398 */
399 size_t get_temporal_nframes() const {
400 return tof_processing_config_get_temporal_nframes(this->ptr_, TOF_ERROR_HANDLER{});
401 }
402
403 /** Set the maximum number of frames to average together
404 * @param nframes Number of frames
405 */
406 void set_temporal_nframes(size_t nframes) {
407 return tof_processing_config_set_temporal_nframes(this->ptr_, nframes, TOF_ERROR_HANDLER{});
408 }
409
410 /** Get whether the gaussian blur is enabled. This is a standard gaussian blur
411 * applied over the depth image
412 * @return Enabled
413 */
414 bool get_gaussian_enabled() const {
415 return tof_processing_config_get_gaussian_enabled(this->ptr_, TOF_ERROR_HANDLER{});
416 }
417
418 /** Set whether the gaussian blur is enabled. This is a standard gaussian blur
419 * applied over the depth image
420 * @param enabled Enabled
421 */
422 void set_gaussian_enabled(bool enabled) {
423 return tof_processing_config_set_gaussian_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
424 }
425
426 /** Get the gaussian region size
427 * @return Region size, 3x3 and 5x5 are supported
428 */
429 size_t get_gaussian_size() const {
430 return tof_processing_config_get_gaussian_size(this->ptr_, TOF_ERROR_HANDLER{});
431 }
432
433 /** Set the gaussian region size
434 * @param size Region size, 3x3 and 5x5 are supported
435 */
436 void set_gaussian_size(size_t size) {
437 return tof_processing_config_set_gaussian_size(this->ptr_, size, TOF_ERROR_HANDLER{});
438 }
439
440 /** Get the gaussian sigma
441 * @return The standard deviation
442 */
443 double get_gaussian_sigma() const {
444 return tof_processing_config_get_gaussian_sigma(this->ptr_, TOF_ERROR_HANDLER{});
445 }
446
447 /** Set the gaussian sigma
448 * @param sigma The standard deviation
449 */
450 void set_gaussian_sigma(double sigma) {
451 return tof_processing_config_set_gaussian_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
452 }
453
454 /** Get whether the median filter is enabled. This is a standard median filter
455 * applied over the depth image
456 * @return Enabled
457 */
458 bool get_median_enabled() const {
459 return tof_processing_config_get_median_enabled(this->ptr_, TOF_ERROR_HANDLER{});
460 }
461
462 /** Set whether the median filter is enabled. This is a standard median filter
463 * applied over the depth image
464 * @param enabled Enabled
465 */
466 void set_median_enabled(bool enabled) {
467 return tof_processing_config_set_median_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
468 }
469
470 /** Get the median region size
471 * @return Region size, 3x3 and 5x5 are supported
472 */
473 size_t get_median_size() const {
474 return tof_processing_config_get_median_size(this->ptr_, TOF_ERROR_HANDLER{});
475 }
476
477 /** Set the median region size
478 * @param size Region size, 3x3 and 5x5 are supported
479 */
480 void set_median_size(size_t size) {
481 return tof_processing_config_set_median_size(this->ptr_, size, TOF_ERROR_HANDLER{});
482 }
483
484 /** Get whether the bilateral filter is enabled. This filter averages the
485 * current pixel with neighboring ones if they're within the specified
486 * standard deviation
487 * @return Enabled
488 */
490 return tof_processing_config_get_bilateral_enabled(this->ptr_, TOF_ERROR_HANDLER{});
491 }
492
493 /** Set whether the bilateral filter is enabled. This filter averages the
494 * current pixel with neighboring ones if they're within the specified
495 * standard deviation
496 * @param enabled Enabled
497 */
498 void set_bilateral_enabled(bool enabled) {
499 return tof_processing_config_set_bilateral_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
500 }
501
502 /** Get the bilateral region size
503 * @return Region size, 3x3 and 5x5 are supported
504 */
505 size_t get_bilateral_size() const {
506 return tof_processing_config_get_bilateral_size(this->ptr_, TOF_ERROR_HANDLER{});
507 }
508
509 /** Set the bilateral region size
510 * @param size Region size, 3x3 and 5x5 are supported
511 */
512 void set_bilateral_size(size_t size) {
513 return tof_processing_config_set_bilateral_size(this->ptr_, size, TOF_ERROR_HANDLER{});
514 }
515
516 /** Get the bilateral standard deviation
517 * @return The standard deviation
518 */
519 double get_bilateral_sigma() const {
520 return tof_processing_config_get_bilateral_sigma(this->ptr_, TOF_ERROR_HANDLER{});
521 }
522
523 /** Set the bilateral standard deviation
524 * @param sigma The standard deviation
525 */
526 void set_bilateral_sigma(double sigma) {
527 return tof_processing_config_set_bilateral_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
528 }
529
530 /** Get Whether the local means filter is enabled.
531 * @return Enabled
532 */
534 return tof_processing_config_get_local_means_enabled(this->ptr_, TOF_ERROR_HANDLER{});
535 }
536
537 /** Set Whether the local means filter is enabled.
538 * @param enabled Enabled
539 */
540 void set_local_means_enabled(bool enabled) {
541 return tof_processing_config_set_local_means_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
542 }
543
544 /** Get The local means region size
545 * @return Region size
546 */
547 size_t get_local_means_size() const {
548 return tof_processing_config_get_local_means_size(this->ptr_, TOF_ERROR_HANDLER{});
549 }
550
551 /** Set The local means region size
552 * @param size Region size
553 */
554 void set_local_means_size(size_t size) {
555 return tof_processing_config_set_local_means_size(this->ptr_, size, TOF_ERROR_HANDLER{});
556 }
557
558 /** Get The local means standard deviation for how close values are
559 * @return The stand deviation
560 */
561 double get_local_means_sigma() const {
562 return tof_processing_config_get_local_means_sigma(this->ptr_, TOF_ERROR_HANDLER{});
563 }
564
565 /** Set The local means standard deviation for how close values are
566 * @param sigma The stand deviation
567 */
568 void set_local_means_sigma(double sigma) {
569 return tof_processing_config_set_local_means_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
570 }
571
572 /** Get whether flying pixel filter is enabled. The flying pixel filters out
573 * pixels when more than x edges are farther than x size away
574 * @return Enabled
575 */
576 bool get_flying_enabled() const {
577 return tof_processing_config_get_flying_enabled(this->ptr_, TOF_ERROR_HANDLER{});
578 }
579
580 /** Set whether flying pixel filter is enabled. The flying pixel filters out
581 * pixels when more than x edges are farther than x size away
582 * @param enabled Enabled
583 */
584 void set_flying_enabled(bool enabled) {
585 return tof_processing_config_set_flying_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
586 }
587
588 /** Get the shape of which surrounding pixels are checked
589 * @return The shape
590 */
591 FlyingShape get_flying_shape() const {
592 return static_cast<FlyingShape>(tof_processing_config_get_flying_shape(this->ptr_, TOF_ERROR_HANDLER{}));
593 }
594
595 /** Set the shape of which surrounding pixels are checked
596 * @param shape The shape
597 */
598 void set_flying_shape(FlyingShape shape) {
599 return tof_processing_config_set_flying_shape(this->ptr_, static_cast<tof_flying_shape>(shape), TOF_ERROR_HANDLER{});
600 }
601
602 /** Get the maximum distance allowed between surrounding pixels
603 * @return Maximum distance
604 */
605 size_t get_flying_distance() const {
606 return tof_processing_config_get_flying_distance(this->ptr_, TOF_ERROR_HANDLER{});
607 }
608
609 /** Set the maximum distance allowed between surrounding pixels
610 * @param distance Maximum distance
611 */
612 void set_flying_distance(size_t distance) {
613 return tof_processing_config_set_flying_distance(this->ptr_, distance, TOF_ERROR_HANDLER{});
614 }
615
616 /** Get the number of edges allowed to be larger than maximum distance
617 * @return Maximum edges
618 */
619 size_t get_flying_edges() const {
620 return tof_processing_config_get_flying_edges(this->ptr_, TOF_ERROR_HANDLER{});
621 }
622
623 /** Set the number of edges allowed to be larger than maximum distance
624 * @param edges Maximum edges
625 */
626 void set_flying_edges(size_t edges) {
627 return tof_processing_config_set_flying_edges(this->ptr_, edges, TOF_ERROR_HANDLER{});
628 }
629
630 /** Get whether the amplitude threshold filter is enabled. This filter filters
631 * out pixels outside of the specified values
632 * @return Enabled
633 */
635 return tof_processing_config_get_amp_threshold_enabled(this->ptr_, TOF_ERROR_HANDLER{});
636 }
637
638 /** Set whether the amplitude threshold filter is enabled. This filter filters
639 * out pixels outside of the specified values
640 * @param enabled Enabled
641 */
642 void set_amp_threshold_enabled(bool enabled) {
643 return tof_processing_config_set_amp_threshold_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
644 }
645
646 /** Get the minimum amplitude allowed
647 * @return Minimum value
648 */
649 double get_amp_threshold_min() const {
650 return tof_processing_config_get_amp_threshold_min(this->ptr_, TOF_ERROR_HANDLER{});
651 }
652
653 /** Set the minimum amplitude allowed
654 * @param min Minimum value
655 */
656 void set_amp_threshold_min(double min) {
657 return tof_processing_config_set_amp_threshold_min(this->ptr_, min, TOF_ERROR_HANDLER{});
658 }
659
660 /** Get the maximum amplitude allowed
661 * @return Maximum value
662 */
663 double get_amp_threshold_max() const {
664 return tof_processing_config_get_amp_threshold_max(this->ptr_, TOF_ERROR_HANDLER{});
665 }
666
667 /** Set the maximum amplitude allowed
668 * @param max Maximum value
669 */
670 void set_amp_threshold_max(double max) {
671 return tof_processing_config_set_amp_threshold_max(this->ptr_, max, TOF_ERROR_HANDLER{});
672 }
673
674 /** Get whether the distance threshold filter is enabled. This filter filters
675 * out pixels outside of the specified values
676 * @return Enabled
677 */
679 return tof_processing_config_get_dist_threshold_enabled(this->ptr_, TOF_ERROR_HANDLER{});
680 }
681
682 /** Set whether the distance threshold filter is enabled. This filter filters
683 * out pixels outside of the specified values
684 * @param enabled Enabled
685 */
686 void set_dist_threshold_enabled(bool enabled) {
687 return tof_processing_config_set_dist_threshold_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
688 }
689
690 /** Get the minimum distance allowed
691 * @return Minimum value
692 */
693 double get_dist_threshold_min() const {
694 return tof_processing_config_get_dist_threshold_min(this->ptr_, TOF_ERROR_HANDLER{});
695 }
696
697 /** Set the minimum distance allowed
698 * @param min Minimum value
699 */
700 void set_dist_threshold_min(double min) {
701 return tof_processing_config_set_dist_threshold_min(this->ptr_, min, TOF_ERROR_HANDLER{});
702 }
703
704 /** Get the maximum distance allowed
705 * @return Maximum value
706 */
707 double get_dist_threshold_max() const {
708 return tof_processing_config_get_dist_threshold_max(this->ptr_, TOF_ERROR_HANDLER{});
709 }
710
711 /** Set the maximum distance allowed
712 * @param max Maximum value
713 */
714 void set_dist_threshold_max(double max) {
715 return tof_processing_config_set_dist_threshold_max(this->ptr_, max, TOF_ERROR_HANDLER{});
716 }
717
718 /** Get how much to scale the radial value by
719 * @return Radial scale
720 */
721 float get_radial_scale() const {
722 return tof_processing_config_get_radial_scale(this->ptr_, TOF_ERROR_HANDLER{});
723 }
724
725 /** Set how much to scale the radial value by
726 * @param scale Radial scale
727 */
728 void set_radial_scale(float scale) {
729 return tof_processing_config_set_radial_scale(this->ptr_, scale, TOF_ERROR_HANDLER{});
730 }
731
732 /** Get how much to add to the radial value
733 * @return Radial addition
734 */
735 float get_radial_add() const {
736 return tof_processing_config_get_radial_add(this->ptr_, TOF_ERROR_HANDLER{});
737 }
738
739 /** Set how much to add to the radial value
740 * @param addition Radial addition
741 */
742 void set_radial_add(float addition) {
743 return tof_processing_config_set_radial_add(this->ptr_, addition, TOF_ERROR_HANDLER{});
744 }
745
746 /** Get how much to scale the intensity value by
747 * @return Intensity scale
748 */
749 float get_intensity_scale() const {
750 return tof_processing_config_get_intensity_scale(this->ptr_, TOF_ERROR_HANDLER{});
751 }
752
753 /** Set how much to scale the intensity value by
754 * @param scale Intensity scale
755 */
756 void set_intensity_scale(float scale) {
757 return tof_processing_config_set_intensity_scale(this->ptr_, scale, TOF_ERROR_HANDLER{});
758 }
759
760 /** Get how much to add to the intensity value
761 * @return Intensity addition
762 */
763 float get_intensity_add() const {
764 return tof_processing_config_get_intensity_add(this->ptr_, TOF_ERROR_HANDLER{});
765 }
766
767 /** Set how much to add to the intensity value
768 * @param addition Intensity addition
769 */
770 void set_intensity_add(float addition) {
771 return tof_processing_config_set_intensity_add(this->ptr_, addition, TOF_ERROR_HANDLER{});
772 }
773
774 /** Get the characterization addition component. The characterization function
775 * computes the sigma for the temporal and bilateral filter
776 * @return addition
777 */
778 double get_char_add() const {
779 return tof_processing_config_get_char_add(this->ptr_, TOF_ERROR_HANDLER{});
780 }
781
782 /** Set the characterization addition component. The characterization function
783 * computes the sigma for the temporal and bilateral filter
784 * @param addition addition
785 */
786 void set_char_add(double addition) {
787 return tof_processing_config_set_char_add(this->ptr_, addition, TOF_ERROR_HANDLER{});
788 }
789
790 /** Get the characterization multiplication component. The characterization
791 * function computes the sigma for the temporal and bilateral filter
792 * @return Multiplication
793 */
794 double get_char_mult() const {
795 return tof_processing_config_get_char_mult(this->ptr_, TOF_ERROR_HANDLER{});
796 }
797
798 /** Set the characterization multiplication component. The characterization
799 * function computes the sigma for the temporal and bilateral filter
800 * @param multiplication Multiplication
801 */
802 void set_char_mult(double multiplication) {
803 return tof_processing_config_set_char_mult(this->ptr_, multiplication, TOF_ERROR_HANDLER{});
804 }
805
806 /** Get whether software binning is enabled
807 * @return Enabled
808 */
809 bool get_binning_enabled() const {
810 return tof_processing_config_get_binning_enabled(this->ptr_, TOF_ERROR_HANDLER{});
811 }
812
813 /** Set whether software binning is enabled
814 * @param enabled Enabled
815 */
816 void set_binning_enabled(bool enabled) {
817 return tof_processing_config_set_binning_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
818 }
819
820 /** Get the size of the area to bin, 2 would bin a 2x2 area
821 * @return The bin size
822 */
823 size_t get_binning_size() const {
824 return tof_processing_config_get_binning_size(this->ptr_, TOF_ERROR_HANDLER{});
825 }
826
827 /** Set the size of the area to bin, 2 would bin a 2x2 area
828 * @param size The bin size
829 */
830 void set_binning_size(size_t size) {
831 return tof_processing_config_set_binning_size(this->ptr_, size, TOF_ERROR_HANDLER{});
832 }
833
834 /** Get the binning mode to use
835 * @return The binning mode
836 */
837 BinningMode get_binning_mode() const {
838 return static_cast<BinningMode>(tof_processing_config_get_binning_mode(this->ptr_, TOF_ERROR_HANDLER{}));
839 }
840
841 /** Set the binning mode to use
842 * @param mode The binning mode
843 */
844 void set_binning_mode(BinningMode mode) {
845 return tof_processing_config_set_binning_mode(this->ptr_, static_cast<tof_binning_mode>(mode), TOF_ERROR_HANDLER{});
846 }
847
848 /** Get The maximum standard deviation to use, only used in the smart binning
849 * mode
850 * @return The standard deviation
851 */
852 float get_binning_sigma() const {
853 return tof_processing_config_get_binning_sigma(this->ptr_, TOF_ERROR_HANDLER{});
854 }
855
856 /** Set The maximum standard deviation to use, only used in the smart binning
857 * mode
858 * @param sigma The standard deviation
859 */
860 void set_binning_sigma(float sigma) {
861 return tof_processing_config_set_binning_sigma(this->ptr_, sigma, TOF_ERROR_HANDLER{});
862 }
863
864 /** Get the dimension of the xyz output
865 * @return The dimension
866 */
867 XyzDimension get_xyz_dimension() const {
868 return static_cast<XyzDimension>(tof_processing_config_get_xyz_dimension(this->ptr_, TOF_ERROR_HANDLER{}));
869 }
870
871 /** Set the dimension of the xyz output
872 * @param dimension The dimension
873 */
874 void set_xyz_dimension(XyzDimension dimension) {
875 return tof_processing_config_set_xyz_dimension(this->ptr_, static_cast<tof_xyz_dimension>(dimension), TOF_ERROR_HANDLER{});
876 }
877
878 /** Get whether rigid transformation is enabled
879 * @return Enabled
880 */
882 return tof_processing_config_get_rigid_transformation_enabled(this->ptr_, TOF_ERROR_HANDLER{});
883 }
884
885 /** Set whether rigid transformation is enabled
886 * @param enabled Enabled
887 */
889 return tof_processing_config_set_rigid_transformation_enabled(this->ptr_, enabled, TOF_ERROR_HANDLER{});
890 }
891
892 /** Get the rigid transformation 4x4 matrix
893 * @return 4x4 transformation matrix
894 */
895 std::array<float, 16> get_rigid_transformation_matrix() const {
896 std::array<float, 16> array;
897 auto data = tof_processing_config_get_rigid_transformation_matrix(this->ptr_, TOF_ERROR_HANDLER{});
898 std::copy(data, data + array.size(), array.data());
899 return array;
900 }
901
902 /** Set the rigid transformation 4x4 matrix
903 * @param matrix 4x4 transformation matrix
904 */
905 void set_rigid_transformation_matrix(const std::array<float, 16> &matrix) {
906 return tof_processing_config_set_rigid_transformation_matrix(this->ptr_, matrix.data(), TOF_ERROR_HANDLER{});
907 }
908
909};
910
911} // tof
912} // chronoptics
913
914#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 size of the morphological filter to remove small bright pixels.
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.
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_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.
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 size of the morphological filter to remove small bright pixels.
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.
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.
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_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.