AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
argus_pba.h
Go to the documentation of this file.
1/*************************************************************************/
38#ifndef ARGUS_PBA_H
39#define ARGUS_PBA_H
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/*!***************************************************************************
45 * @defgroup argus_pba Pixel Binning Algorithm
46 * @ingroup argus_api
47 *
48 * @brief Pixel Binning Algorithm (PBA) parameter definitions and API functions.
49 *
50 * @details Defines the generic Pixel Binning Algorithm (PBA) setup parameters
51 * and data structure.
52 *
53 * The PBA module contains filter algorithms that determine the
54 * pixels with the best signal quality and extract an 1D distance
55 * information from the filtered pixels by averaging them in a
56 * specified way.
57 *
58 * Basically, the Pixel Binning Algorithm is a multi-stage filter:
59 *
60 * -# A fixed pre-filter mask is applied to statically disable
61 * specified pixels.
62 *
63 * -# A relative and absolute amplitude filter is applied in the
64 * second stage. The relative filter is determined by a ratio
65 * of the maximum amplitude off all available (i.e. not filtered
66 * in stage 1) pixels. Pixels that have an amplitude below the
67 * relative threshold are dismissed. The same holds true for
68 * the absolute amplitude threshold. All pixel with smaller
69 * amplitude are dismissed.\n
70 * Note that the absolute amplitude threshold is disabled if
71 * the Golden Pixel (see below) is also disabled in order to
72 * prevent invalid filtering for multi-pixel devices.\n
73 * The relative threshold is useful to setup a distance
74 * measurement scenario. All well illuminated pixels are
75 * selected and considered for the final 1D distance. The
76 * absolute threshold is used to dismiss pixels that are below
77 * the noise level. The latter would be considered for the 1D
78 * result if the maximum amplitude is already very low.\n
79 * Those threshold are implemented using a hysteresis behavior.
80 * For its configuration, see the following parameters:
81 * - #argus_cfg_pba_t::RelativeAmplitudeInclusion
82 * - #argus_cfg_pba_t::RelativeAmplitudeExclusion
83 * - #argus_cfg_pba_t::AbsoluteAmplitudeInclusion
84 * - #argus_cfg_pba_t::AbsoluteAmplitudeExclusion
85 * .
86 *
87 * -# An absolute minimum distance filter is applied in addition
88 * to the amplitude filter. This removes all pixel that have
89 * a lower distance than the specified threshold. This is used
90 * to remove invalid pixels that can be detected by a physically
91 * not correct negative distance.\n
92 * For its configuration, see the following parameters:
93 * - #PBA_ENABLE_MIN_DIST_SCOPE
94 * - #argus_cfg_pba_t::AbsoluteDistanceScopeInclusion
95 * - #argus_cfg_pba_t::AbsoluteDistanceScopeExclusion
96 * - #argus_cfg_pba_t::RelativeDistanceScopeInclusion
97 * - #argus_cfg_pba_t::RelativeDistanceScopeExclusion
98 * .
99 *
100 * -# A distance filter is used to distinguish pixels that target
101 * the actual object from pixels that see the brighter background,
102 * e.g. white walls. Thus, the pixel with the minimum distance
103 * is referenced and all pixel that have a distance between
104 * the minimum and the given minimum distance scope are selected
105 * for the 1D distance result. The minimum distance scope is
106 * determined by an relative (to the current minimum distance)
107 * and an absolute value. The larger scope value is the
108 * relevant one, i.e. the relative distance scope can be used
109 * to heed the increasing noise at larger distances.\n
110 * For its configuration, see the following parameters:
111 * - #argus_cfg_pba_t::AbsoluteMinimumDistanceThreshold
112 * .
113 *
114 * -# If all of the above filters fail to determine a single valid
115 * pixel, the Golden Pixel is used as a fallback value. The
116 * Golden Pixel is the pixel that sits right at the focus point
117 * of the optics at large distances. Thus, it is expected to
118 * have the best signal at large distances.\n
119 * For its configuration, see the following parameters:
120 * - #PBA_ENABLE_GOLDPX_FALLBACK_MODE
121 * .
122 *
123 * -# In order to avoid unwanted effects from "out-of-focus" pixels
124 * in application that require a smaller focus, the Golden Pixel
125 * Priority Mode prioritizes a valid signal on the central
126 * Golden Pixel over other pixels. That is, while the Golden
127 * Pixel has a reasonable signal strength, it is the only pixel
128 * considered for the 1D result.\n
129 * For its configuration, see the following parameters:
130 * - #PBA_ENABLE_GOLDPX_FALLBACK_MODE
131 * - #argus_cfg_pba_t::GoldenPixelPriorityAmplitudeInclusion
132 * - #argus_cfg_pba_t::GoldenPixelPriorityAmplitudeExclusion
133 * .
134 * .
135 *
136 * After filtering is done, there may be more than a single pixel
137 * left to determine the 1D signal. Therefore several averaging
138 * methods are implemented to obtain the best 1D result from many
139 * pixels. See #argus_pba_averaging_mode_t for details.
140 *
141 *
142 * @addtogroup argus_pba
143 * @{
144 *****************************************************************************/
145
146#include "argus_def.h"
147
148/*!***************************************************************************
149 * @brief Enable flags for the pixel binning algorithm.
150 *
151 * @details Determines the pixel binning algorithm feature enable status.
152 *
153 * - [0]: #PBA_ENABLE: Enables the pixel binning feature.
154 * - [1]: reserved
155 * - [2]: reserved
156 * - [3]: reserved
157 * - [4]: #PBA_ENABLE_GOLDPX_PRIORITY_MODE: Enables the Golden Pixel
158 * priority mode feature.
159 * - [5]: #PBA_ENABLE_GOLDPX_FALLBACK_MODE: Enables the Golden Pixel
160 * fallback mode feature.
161 * - [6]: #PBA_ENABLE_MIN_DIST_SCOPE: Enables the minimum distance
162 * scope feature.
163 * - [7]: reserved
164 * .
165 *****************************************************************************/
187
188/*!***************************************************************************
189 * @brief The averaging modes for the pixel binning algorithm.
190 *****************************************************************************/
203
204/*!***************************************************************************
205 * @brief The pixel binning algorithm settings data structure.
206 * @details Describes the pixel binning algorithm settings.
207 *****************************************************************************/
527
529#ifdef __cplusplus
530} // extern "C"
531#endif
532#endif /* ARGUS_PBA_H */
This file is part of the AFBR-S50 hardware API.
int32_t q9_22_t
Signed fixed point number: Q9.22.
Definition fp_def.h:538
uint8_t uq0_8_t
Unsigned fixed point number: UQ0.8.
Definition fp_def.h:162
uint16_t uq1_15_t
Unsigned fixed point number: UQ1.15.
Definition fp_def.h:271
uint16_t uq12_4_t
Unsigned fixed point number: UQ12.4.
Definition fp_def.h:231
argus_pba_averaging_mode_t
The averaging modes for the pixel binning algorithm.
Definition argus_pba.h:192
argus_pba_flags_t
Enable flags for the pixel binning algorithm.
Definition argus_pba.h:167
@ PBA_SIMPLE_AVG
Definition argus_pba.h:195
@ PBA_LINEAR_AMPLITUDE_WEIGHTED_AVG
Definition argus_pba.h:200
@ PBA_ENABLE_GOLDPX_PRIORITY_MODE
Definition argus_pba.h:174
@ PBA_ENABLE
Definition argus_pba.h:169
@ PBA_ENABLE_GOLDPX_FALLBACK_MODE
Definition argus_pba.h:181
@ PBA_ENABLE_MIN_DIST_SCOPE
Definition argus_pba.h:184
The pixel binning algorithm settings data structure.
Definition argus_pba.h:209
argus_pba_flags_t Enabled
Definition argus_pba.h:214
uint8_t GoldenPixelOutOfSyncAgeThreshold
Definition argus_pba.h:507
q9_22_t AbsoluteMinimumDistanceThreshold
Definition argus_pba.h:512
uq1_15_t AbsoluteDistanceScopeExclusion
Definition argus_pba.h:476
uq0_8_t RelativeDistanceScopeInclusion
Definition argus_pba.h:403
argus_pba_averaging_mode_t AveragingMode
Definition argus_pba.h:220
uint32_t PrefilterMask
Definition argus_pba.h:524
uq0_8_t RelativeAmplitudeInclusion
Definition argus_pba.h:247
uq12_4_t AbsoluteAmplitudeExclusion
Definition argus_pba.h:336
uq0_8_t RelativeAmplitudeExclusion
Definition argus_pba.h:274
uq12_4_t GoldenPixelPriorityAmplitudeInclusion
Definition argus_pba.h:357
uq12_4_t AbsoluteAmplitudeInclusion
Definition argus_pba.h:305
uq0_8_t RelativeDistanceScopeExclusion
Definition argus_pba.h:428
uq1_15_t AbsoluteDistanceScopeInclusion
Definition argus_pba.h:452
uq12_4_t GoldenPixelPriorityAmplitudeExclusion
Definition argus_pba.h:378
uint8_t GoldenPixelSaturationFilterPixelThreshold
Definition argus_pba.h:493