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