Mech-Eye API 2.5.2
API reference documentation for Mech-Eye 3D Laser Profiler
Loading...
Searching...
No Matches
ProfileExtractionParameters.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_extraction {
39
41{
42public:
43 static constexpr const char* name = "MinGrayscaleValue";
44
45 static constexpr const char* description =
46 "Set the minimum grayscale value of the valid pixels in the raw image. Pixels with "
47 "grayscale values smaller than this value will not participate in profile "
48 "extraction.\n\nNote: \n* The minimum value of \"Min Grayscale Value\" is affected by "
49 "\"Digital Gain\".";
50
51 static constexpr Parameter::Type type = Parameter::Type::_Int;
52};
53
55{
56public:
57 static constexpr const char* name = "MinSpotIntensity";
58
59 static constexpr const char* description =
60 "This parameter is only effective for firmware 2.2.1 and below."
61 "For firmware 2.3.0 and above, adjustment of this parameter does not take effect.\n"
62 "Set the minimum intensity for the spots. Spots with intensity values smaller than this "
63 "value will be excluded. The intensity of a spot is the average grayscale value of all the "
64 "valid pixels in the pixel column of the laser line.\nThe spots of laser lines produced by "
65 "stray light or interreflection usually have low intensities. Setting an appropriate "
66 "minimum intensity can remove these spots.\n\nNote: The minimum value of \"Min Spot "
67 "Intensity\" is affected by \"Min Grayscale Value\".";
68
69 static constexpr Parameter::Type type = Parameter::Type::_Int;
70};
71
73{
74public:
75 static constexpr const char* name = "MaxSpotIntensity";
76
77 static constexpr const char* description =
78 "This parameter is only effective for firmware 2.2.1 and below."
79 "For firmware 2.3.0 and above, adjustment of this parameter does not take effect.\n"
80 "Set the maximum intensity for the spots. Spots with intensity values greater than this "
81 "value will be excluded. The intensity of a spot is the average grayscale value of all the "
82 "valid pixels in the pixel column of the laser line.\nSetting an appropriate maximum "
83 "intensity can remove abnormally bright spots produced by specular reflection.\n\nNote: "
84 "The minimum value of \"Max Spot Intensity\" is affected by \"Min Grayscale Value\".";
85
86 static constexpr Parameter::Type type = Parameter::Type::_Int;
87};
88
90{
91public:
92 static constexpr const char* name = "MinLaserLineWidth";
93
94 static constexpr const char* description =
95 "Set the minimum width for the laser lines. If the width of a pixel column in a laser line "
96 "is smaller than this value, this pixel column in this laser line does not participate in "
97 "profile extraction.\nLaser line width is a property of each pixel column in a laser line. "
98 "It is equal to the number of valid pixels in such a pixel column.\nSetting appropriate "
99 "minimum and maximum widths can exclude the laser lines produced by stray light or "
100 "interreflection, which are usually too wide or too narrow.";
101
102 static constexpr Parameter::Type type = Parameter::Type::_Int;
103};
104
106{
107public:
108 static constexpr const char* name = "MaxLaserLineWidth";
109
110 static constexpr const char* description =
111 "Set the maximum width for the laser lines. If the width of a pixel column in a laser line "
112 "is greater than this value, this pixel column in this laser line does not participate in "
113 "profile extraction.\nLaser line width is a property of each pixel column in a laser line. "
114 "It is equal to the number of valid pixels in such a pixel column.\nSetting appropriate "
115 "minimum and maximum widths can exclude the laser lines produced by stray light or "
116 "interreflection, which are usually too wide or too narrow.";
117
118 static constexpr Parameter::Type type = Parameter::Type::_Int;
119};
120
122{
123public:
124 static constexpr const char* name = "SpotSelection";
125
126 static constexpr const char* description =
127 "If a pixel column contains multiple laser lines, the laser line used for profile "
128 "extraction is selected according to the value of this parameter.\nStrongest: selects the "
129 "laser line with the highest intensity for profile extraction.\nNearest: selects the laser "
130 "line closest to the laser profiler for profile extraction.\nFarthest: selects the laser "
131 "line farthest from the laser profiler for profile extraction.\nInvalid: regards the pixel "
132 "column as invalid. The profile therefore has a gap. Usually used for complex situations "
133 "where selection is difficult to make.";
134
135 static constexpr Parameter::Type type = Parameter::Type::_Enum;
136
137 enum struct Value {
138 Strongest,
139 Nearest,
140 Farthest,
141 Invalid,
142 };
143};
144
146{
147public:
148 static constexpr const char* name = "EdgeSelection";
149
150 static constexpr const char* description =
151 "Select the location for extracting the profile in each laser line.\nTop edge: extracts "
152 "the profile from the top edge of the laser line.\nCenter: extracts the profile from the "
153 "center of the laser line.\nBottom edge: extracts the profile from the bottom edge of the "
154 "laser line.\nIf the target object is a transparent/translucent object, such as glue, you "
155 "can select \"Top edge\".";
156
157 static constexpr Parameter::Type type = Parameter::Type::_Enum;
158
159 enum struct Value { Center, TopEdge, BottomEdge };
160};
161
163{
164public:
165 static constexpr const char* name = "MinSharpness";
166
167 static constexpr const char* description =
168 "Set the minimum sharpness of the laser lines. Sharpness is the clearness of the edges of "
169 "a laser line. Increasing this parameter can exclude the laser lines produced by stray "
170 "light or interreflection, which are usually too dark and blurry.";
171
172 static constexpr Parameter::Type type = Parameter::Type::_Int;
173};
174
176{
177public:
178 static constexpr const char* name = "BrightnessAdjustment";
179
180 static constexpr const char* description =
181 "Adjusts the brightness of the intensity image. A greater value of this parameter results "
182 "in a brighter intensity image. The initial brightness of the intensity image is "
183 "Scale_1_0_0.";
184
185 static constexpr Parameter::Type type = Parameter::Type::_Enum;
186
187 enum struct Value {
188 Scale_0_5_0, /* 0.5 */
189 Scale_0_7_5, /* 0.75 */
190 Scale_1_0_0, /* 1.0 */
191 Scale_1_5_0, /* 1.5 */
192 Scale_2_0_0, /* 2.0 */
193 };
194};
195
197{
198public:
199 static constexpr const char* name = "ExtractionSensitivityMode";
200
201 static constexpr const char* description =
202 "Sets the sensitivity to fine variations in the laser lines.\nStable: delivers higher "
203 "point cloud quality.\nBalanced: offers a good compromise between point cloud quality and "
204 "responsiveness to laser line details.\nSensitive: improves detection of narrower and "
205 "closely spaced laser lines, and is more effective at distinguishing overlapping laser "
206 "lines. However, it might cause depth fluctuations in the point cloud.\n\nWhen the \"Edge "
207 "Selection\" parameter is set to \"Top edge\" or \"Bottom edge\", setting this parameter "
208 "value to \"Sensitive\" allows the extracted profile to be closer to the edge of the laser "
209 "line.";
210
211 static constexpr Parameter::Type type = Parameter::Type::_Enum;
212
213 enum struct Value { Stable, Balanced, Sensitive };
214};
215
216} // namespace profile_extraction
217} // namespace eye
218} // 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