Mech-Eye API 2.5.2
API reference documentation for Mech-Eye 3D Laser Profiler
Loading...
Searching...
No Matches
ProfileProcessingParameters.h
1/*******************************************************************************
2 *BSD 3-Clause License
3 *
4 *Copyright (c) 2016-2025, Mech-Mind Robotics Technologies Co., Ltd.
5 *All rights reserved.
6 *
7 *Redistribution and use in source and binary forms, with or without
8 *modification, are permitted provided that the following conditions are met:
9 *
10 *1. Redistributions of source code must retain the above copyright notice, this
11 * list of conditions and the following disclaimer.
12 *
13 *2. Redistributions in binary form must reproduce the above copyright notice,
14 * this list of conditions and the following disclaimer in the documentation
15 * and/or other materials provided with the distribution.
16 *
17 *3. Neither the name of the copyright holder nor the names of its
18 * contributors may be used to endorse or promote products derived from
19 * this software without specific prior written permission.
20 *
21 *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 *DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 *DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 *SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 *CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 *OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 *OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 ******************************************************************************/
32
33#pragma once
34#include "Parameter.h"
35
36namespace mmind {
37namespace eye {
38namespace profile_processing {
39
40class Filter
41{
42public:
43 static constexpr const char* name = "Filter";
44
45 static constexpr const char* description =
46 "Set the type of filters. Filtering the profile can reduce noise and smooth the profile.\n"
47 "None: does not perform filtering. Select this option when the profile does not contain "
48 "noticeable noise.\nMean (edge preserving): performs mean filtering with edge "
49 "preservation. Features with abrupt depth variations (such as object edges) are well "
50 "preserved, but the smoothing effect around object edges is slightly worse. Suitable for "
51 "objects that have features with abrupt depth variations. When selecting this option, set "
52 "\"MeanFilterWindowSize\".\nMedian: performs median filtering, suitable for reducing noise "
53 "with depth values significantly different from surrounding points. When selecting this "
54 "option, set \"MedianFilterWindowSize\".";
55
56 static constexpr Parameter::Type type = Parameter::Type::_Enum;
57
58 enum struct Value {
59 None,
60 Mean,
61 Median,
62 };
63};
64
66{
67public:
68 static constexpr const char* name = "MeanFilterWindowSize";
69
70 static constexpr const char* description =
71 "Set the window size of the mean filter.\nLarger window size results in higher intensity "
72 "of smoothing but may also distort object features.\n\nNote:\n* \"MeanFilterWindowSize\" "
73 "is unavailable when \"Filter\" is not set to \"Mean\".";
74
75 static constexpr Parameter::Type type = Parameter::Type::_Enum;
76
77 enum struct Value {
78 WindowSize_2,
79 WindowSize_4,
80 WindowSize_8,
81 WindowSize_16,
82 WindowSize_32,
83 };
84};
85
87{
88public:
89 static constexpr const char* name = "MedianFilterWindowSize";
90
91 static constexpr const char* description =
92 "Set the window size of the median filter.\nLarger window size removes more "
93 "noise.\n\nNote:\n* \"MedianFilterWindowSize\" is unavailable when \"Filter\" is not set "
94 "to \"Median\".";
95
96 static constexpr Parameter::Type type = Parameter::Type::_Enum;
97
98 enum struct Value {
99 WindowSize_3,
100 WindowSize_5,
101 WindowSize_7,
102 WindowSize_9,
103 };
104};
105
107{
108public:
109 static constexpr const char* name = "GapFilling";
110
111 static constexpr const char* description =
112 "Set the size of the gaps that can be filled in the profile.\nWhen the number of "
113 "consecutive data points in a gap in the profile is no greater than this value, this gap "
114 "will be filled. The data used for filling is calculated based on the difference between "
115 "the two neighboring points (that is, based on linear interpolation).";
116
117 static constexpr Parameter::Type type = Parameter::Type::_Int;
118};
119
121{
122public:
123 static constexpr const char* name = "GapFillingEdgePreservation";
124
125 static constexpr const char* description =
126 "Set the degree of preservation of object edges when filling gaps.\n\nIf you need to "
127 "preserve features with abrupt depth variations, such as object edges, you can increase "
128 "this parameter, but the amount of gaps being filled will decrease.";
129
130 static constexpr Parameter::Type type = Parameter::Type::_Int;
131};
132
134{
135public:
136 static constexpr const char* name = "Resampling";
137
138 static constexpr const char* description =
139 "Select the point to be retained during resampling. \nMultiple points with different Z "
140 "values may exist at the same location on the X-axis. This parameter is used to select the "
141 "point to be retained in such a situation.\n\nNearest: retains the point closest to the "
142 "laser profiler.\nFarthest: retains the point farthest from the laser profiler.\nIf the "
143 "needed feature is at the bottom of the target object (such as the inner bottom of a "
144 "cylindrical container), you can select \"Farthest\"";
145
146 static constexpr Parameter::Type type = Parameter::Type::_Enum;
147
148 enum struct Value {
149 Nearest,
150 Farthest,
151 };
152};
153
155{
156public:
157 static constexpr const char* name = "ResamplingEdgePreservation";
158
159 static constexpr const char* description =
160 "Set the degree of preservation of object edges during resampling. \nIf you need to "
161 "preserve features with abrupt depth variations, such as object edges, you can increase "
162 "this parameter.";
163
164 static constexpr Parameter::Type type = Parameter::Type::_Int;
165};
166
168{
169public:
170 static constexpr const char* name = "EnableOutlierRemoval";
171
172 static constexpr const char* description =
173 "Enable this parameter to adjust and apply the outlier removal setting. Acquire data again "
174 "to see the effect.";
175
176 static constexpr Parameter::Type type = Parameter::Type::_Bool;
177};
178
180{
181public:
182 static constexpr const char* name = "OutlierRemovalIntensity";
183
184 static constexpr const char* description =
185 "Sets the intensity of outlier removal.\nHigher intensity removes more outliers but may "
186 "also remove some object features.";
187
188 static constexpr Parameter::Type type = Parameter::Type::_Enum;
189
190 enum struct Value { VeryLow, Low, Medium, High, VeryHigh };
191};
192
193} // namespace profile_processing
194
195namespace profile_alignment {
196
198{
199public:
200 static constexpr const char* name = "EnableZAxisAlignment";
201
202 static constexpr const char* description =
203 "Set this parameter to apply the Z-axis profile alignment settings. Acquire data again "
204 "to see the effect. \nNOTE: The profile alignment function can only be applied after all "
205 "profiles have been retrieved. Therefore, the profile data must be retrieved with a "
206 "callback function instead of polling.";
207 static constexpr Parameter::Type type = Parameter::Type::_Bool;
208};
209
211{
212public:
213 static constexpr const char* name = "EnableXAxisAlignment";
214
215 static constexpr const char* description =
216 "Set this parameter to apply the X-axis profile alignment settings. Acquire data again "
217 "to see the effect. \nNOTE: The profile alignment function can only be applied after all "
218 "profiles have been retrieved. Therefore, the profile data must be retrieved with a "
219 "callback function instead of polling.";
220 static constexpr Parameter::Type type = Parameter::Type::_Bool;
221};
222
223} // namespace profile_alignment
224
225namespace filters {
227{
228public:
229 static constexpr const char* name = "EnableBlindSpotFiltering";
230
231 static constexpr const char* description =
232 "Check this parameter to apply the blind spot filtering settings. Acquire data again to "
233 "see the effect. \nNOTE: The blind spot filtering function can only be applied after all "
234 "profiles have been retrieved. Therefore, the profile data must be retrieved with a "
235 "callback function instead of polling.";
236
237 static constexpr Parameter::Type type = Parameter::Type::_Bool;
238};
239
241{
242public:
243 static constexpr const char* name = "EnableNoiseRemoval";
244
245 static constexpr const char* description =
246 "Check this parameter to adjust and apply the noise removal setting. Acquire data again to "
247 "see the effect. \nNOTE: The noise removal function can only be applied after all "
248 "profiles have been retrieved. Therefore, the profile data must be retrieved with a "
249 "callback function instead of polling.";
250
251 static constexpr Parameter::Type type = Parameter::Type::_Bool;
252};
253
255{
256public:
257 static constexpr const char* name = "NoiseRemovalIntensity";
258
259 static constexpr const char* description =
260 "Sets the intensity of noise removal.\n\nHigher intensity removes more noise but may also "
261 "remove some object features.";
262
263 static constexpr Parameter::Type type = Parameter::Type::_Enum;
264
265 enum struct Value { Low, Medium, High };
266};
267
268} // namespace filters
269} // namespace eye
270} // namespace mmind
Type
Describes the device parameter data types.
Definition Parameter.h:30
@ _Int
Integer type.
Definition Parameter.h:31
@ _Enum
Enumeration type.
Definition Parameter.h:34
@ _Bool
Boolean type.
Definition Parameter.h:33