Mech-Eye API
2.6.0
API reference documentation for Mech-Eye Industrial 3D Camera
Toggle main menu visibility
Loading...
Searching...
No Matches
area_scan_3d_camera
parameters
Scanning2D.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
* Info: https://www.mech-mind.com/
33
*
34
******************************************************************************/
35
36
#pragma once
37
#include "Parameter.h"
38
39
namespace
mmind {
40
41
namespace
eye {
42
43
// parameters affect the quality of the 2D image.
44
namespace
scanning2d_setting {
45
46
// Scanning 2D Exposure Mode
47
class
ExposureMode
48
{
49
public
:
50
static
constexpr
const
char
* name =
"Scan2DExposureMode"
;
51
52
static
constexpr
const
char
* description =
53
"Sets the exposure mode for capturing the 2D image. Timed: Sets a single exposure time. "
54
"Usually used in stable lighting conditions. Auto: The exposure time is automatically "
55
"adjusted. Usually used in varying lighting conditions. HDR: Sets multiple exposure times "
56
"and merge the images. Usually used for objects with various colors or textures. Flash: "
57
"Uses the projector for supplemental light. Usually used in dark environments."
;
58
59
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
60
61
enum struct
Value {
62
Timed,
63
Auto,
64
HDR,
65
Flash,
66
};
67
};
68
69
// Scanning 2D Exposure Time
70
class
ExposureTime
71
{
72
public
:
73
static
constexpr
const
char
* name =
"Scan2DExposureTime"
;
74
75
static
constexpr
const
char
* description =
76
"Sets the exposure time for capturing the 2D image. Usually, long exposure time is used in "
77
"dark environments, and short exposure time is used in bright environments. "
78
"\"ExposureTime\" is unavailable when \"ExposureMode\" is not set to \"Timed\"."
;
79
80
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
81
82
static
constexpr
Range<float>
range() {
return
{0.1, 999}; }
83
84
static
constexpr
const
char
* unit =
"ms"
;
85
};
86
87
class
SharpenFactor
88
{
89
public
:
90
static
constexpr
const
char
* name =
"Scan2DSharpenFactor"
;
91
92
static
constexpr
const
char
* description =
93
"Use sharpening algorithm to get sharp edge details, it may cause image noise. The higher "
94
"the setting value, the higher the image sharpness."
;
95
96
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
97
98
static
constexpr
double
defaultValue{0.0};
99
100
static
constexpr
Range<float>
range() {
return
{0.0, 5.0}; }
101
};
102
103
class
ExpectedGrayValue
104
{
105
public
:
106
static
constexpr
const
char
* name =
"Scan2DExpectedGrayValue"
;
107
108
static
constexpr
const
char
* description =
109
"This parameter affects the brightness of the 2D image. Increase the value if the 2D image "
110
"is too dark and decrease if too bright. \"ExpectedGrayValue\" is unavailable when "
111
"\"ExposureMode\" is not set to \"Auto\"."
;
112
113
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
114
115
static
constexpr
Range<int>
range() {
return
{0, 255}; }
116
};
117
118
class
ToneMappingEnable
119
{
120
public
:
121
static
constexpr
const
char
* name =
"Scan2DToneMappingEnable"
;
122
123
static
constexpr
const
char
* description =
124
"This function can make the image look more natural. If the 2D image appears very "
125
"different from the actual objects, please enable this function. \"ToneMappingEnable\" is "
126
"unavailable when \"ExposureMode\" is not set to \"HDR\"."
;
127
128
static
constexpr
Parameter::Type
type =
Parameter::Type::_Bool
;
129
};
130
131
class
AutoExposureROI
132
{
133
public
:
134
static
constexpr
const
char
* name =
"Scan2DROI"
;
135
136
static
constexpr
const
char
* description =
137
"If an auto-exposure ROI is set, the exposure time is adjusted based on the lighting, "
138
"object colors, etc., in this region. Please select the area where the target objects are "
139
"located and avoid including irrelevant objects as much as possible. \"AutoExposureROI\" "
140
"is unavailable when \"ExposureMode\" is not set to \"Auto\"."
;
141
142
static
constexpr
Parameter::Type
type =
Parameter::Type::_Roi
;
143
};
144
145
class
HDRExposureSequence
146
{
147
public
:
148
static
constexpr
const
char
* name =
"Scan2DHDRExposureSequence"
;
149
150
static
constexpr
const
char
* description =
151
"Set multiple exposure times, and the captured images are merged to generate a 2D image "
152
"that retains more details in the highlights and shadows. \"HDRExposureSequence\" is "
153
"unavailable when \"ExposureMode\" is not set to \"HDR\"."
;
154
155
static
constexpr
Parameter::Type
type =
Parameter::Type::_FloatArray
;
156
157
static
constexpr
Range<float>
range() {
return
{0.1, 999}; }
158
159
static
constexpr
int
maxSize() {
return
5; }
160
161
static
constexpr
const
char
* unit =
"ms"
;
162
};
163
164
// Depth Source camera Exposure Mode
165
class
DepthSourceExposureMode
166
{
167
public
:
168
static
constexpr
const
char
* name =
"Scan2DPatternRoleExposureMode"
;
169
170
static
constexpr
const
char
* description =
171
"Sets the exposure mode for capturing the 2D images (depth source). The images are used in "
172
"hand-eye calibration, checking intrinsic parameters and setting ROI. Timed: Set a single "
173
"fixed exposure time. Usually used in stable lighting conditions. Flash: Use the projector "
174
"for supplemental light. Usually used in dark environments."
;
175
176
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
177
178
enum struct
Value {
179
Timed,
180
Flash,
181
};
182
};
183
184
// Depth Source camera Exposure Time
185
class
DepthSourceExposureTime
186
{
187
public
:
188
static
constexpr
const
char
* name =
"Scan2DPatternRoleExposureTime"
;
189
190
static
constexpr
const
char
* description =
191
"Sets the exposure time for capturing the 2D images (depth source). Usually, long exposure "
192
"time is used in dark environments, and short exposure time is used in bright "
193
"environments."
;
194
195
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
196
197
static
constexpr
Range<float>
range() {
return
{0.1, 999}; }
198
199
static
constexpr
const
char
* unit =
"ms"
;
200
};
201
202
// 2D Camera Flash Acquisition Mode
203
class
FlashAcquisitionMode
204
{
205
public
:
206
static
constexpr
const
char
* name =
"Scan2DFlashAcquisitionMode"
;
207
208
static
constexpr
const
char
* description =
209
"Selects the mode of acquiring the 2D image when using the projector for supplemental "
210
"light. \n\n* Fast: The 2D image is acquired as part of the 3D data, providing a faster "
211
"acquisition speed. Recommended for applications that use capture2DAnd3D() and require "
212
"short cycle time. \n* Responsive: The 2D image is acquired independently, ensuring the "
213
"correctness of the 2D image acquired by capture2D(). However, it takes longer to acquire "
214
"both 2D and 3D data. Recommended for applications that acquire the 2D and 3D data "
215
"separately.\n\nNote: \n* If the \"Fast\" mode is used with capture2D() and capture3D(), "
216
"as the acquisition of the 2D image requires all 3D data to be acquired first, capture2D() "
217
"must be called after capture3D(). If the scene changes after capture3D() is called, the "
218
"2D image acquired by capture2D() will not match the actual scene.\n* When \"Fast\" is "
219
"selected, the brightness of the 2D image is affected by the \"Scan3DExposureSequence\" "
220
"and \"ProjectorPowerLevel\" / \"LaserPowerLevel\" parameters.\n* When \"Responsive\" is "
221
"selected, the brightness of the 2D image is affected by the \"ProjectorPowerLevel\" / "
222
"\"LaserPowerLevel\" parameters. \n* For the models that do not have this parameter, their "
223
"acquisition mode in the flash exposure mode is the same as the \"Fast\" mode."
;
224
225
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
226
227
enum struct
Value {
228
Responsive,
229
Fast,
230
};
231
};
232
233
// 2D Camera Flash Exposure Time
234
class
FlashExposureTime
235
{
236
public
:
237
static
constexpr
const
char
* name =
"Scan2DFlashExposureTime"
;
238
239
static
constexpr
const
char
* description =
240
"When \"FlashAcquisitionMode\" is set to \"Responsive\", set the exposure time for "
241
"capturing the 2D image. Usually, long exposure time is used in dark environments, and "
242
"short exposure time is used in bright environments. \n\nNote: For the DEEP and LSR "
243
"series, this parameter must be set to a multiple of 4, and the minimum value that can be "
244
"set is 8 ms. The entered value is automatically adjusted."
;
245
246
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
247
248
static
constexpr
Range<float>
range() {
return
{0.1, 99}; }
249
250
static
constexpr
const
char
* unit =
"ms"
;
251
};
252
253
// Scanning 2D Gain
254
class
Gain
255
{
256
public
:
257
static
constexpr
const
char
* name =
"Scan2DGain"
;
258
259
static
constexpr
const
char
* description =
260
"Set camera's gain value during scanning 2D images. Gain is an electronic amplification of "
261
"the image signal. Large gain value is needed only when scanning extremely dark objects."
;
262
263
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
264
265
static
constexpr
Range<double>
range() {
return
{0.0, 16.0}; }
266
267
static
constexpr
const
char
* unit =
"dB"
;
268
};
269
270
class
PatternRoleGain
271
{
272
public
:
273
static
constexpr
const
char
* name =
"Scan2DPatternRoleGain"
;
274
275
static
constexpr
const
char
* description =
276
"Sets camera's gain value for capturing the 2D images (depth source) when "
277
"\"DepthSourceExposureMode\" is set to \"Timed\". "
278
"Gain is an electronic amplification of the image signal. "
279
"A larger gain value is needed only when scanning extremely dark objects."
;
280
281
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
282
283
static
constexpr
Range<double>
range() {
return
{0.0, 16.0}; }
284
285
static
constexpr
const
char
* unit =
"dB"
;
286
};
287
288
class
FlashGain
289
{
290
public
:
291
static
constexpr
const
char
* name =
"Scan2DFlashGain"
;
292
293
static
constexpr
const
char
* description =
294
"Sets camera's gain value for capturing the 2D images (depth source) when "
295
"\"DepthSourceExposureMode\" is set to \"Flash\" "
296
"and \"FlashAcquisitionMode\" is set to \"Responsive\". Gain is an electronic "
297
"amplification of the image signal. "
298
"A larger gain value is needed only when scanning extremely dark objects."
;
299
300
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
301
302
static
constexpr
Range<double>
range() {
return
{0.0, 16.0}; }
303
304
static
constexpr
const
char
* unit =
"dB"
;
305
};
306
307
class
FlashPowerLevel
308
{
309
public
:
310
static
constexpr
const
char
* name =
"Scan2DFlashPowerLevel"
;
311
312
static
constexpr
const
char
* description =
313
"Sets the light brightness for capturing the 2D images (depth source) when "
314
"\"DepthSourceExposureMode\" is set to \"Flash\" "
315
"and \"FlashAcquisitionMode\" is set to \"Responsive\"."
;
316
317
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
318
319
static
constexpr
Range<int>
range() {
return
{20, 100}; }
320
321
static
constexpr
const
char
* unit =
"%"
;
322
};
323
}
// namespace scanning2d_setting
324
325
}
// namespace eye
326
327
}
// namespace mmind
mmind::eye::Parameter::Type
Type
Describes the device parameter data types.
Definition
Parameter.h:30
mmind::eye::Parameter::_Int
@ _Int
Integer type.
Definition
Parameter.h:31
mmind::eye::Parameter::_Roi
@ _Roi
ROI type. See ROI for details.
Definition
Parameter.h:35
mmind::eye::Parameter::_Enum
@ _Enum
Enumeration type.
Definition
Parameter.h:34
mmind::eye::Parameter::_Float
@ _Float
Double type.
Definition
Parameter.h:32
mmind::eye::Parameter::_Bool
@ _Bool
Boolean type.
Definition
Parameter.h:33
mmind::eye::Parameter::_FloatArray
@ _FloatArray
Vector of double types.
Definition
Parameter.h:37
mmind::eye::scanning2d_setting::AutoExposureROI
Definition
Scanning2D.h:132
mmind::eye::scanning2d_setting::DepthSourceExposureMode
Definition
Scanning2D.h:166
mmind::eye::scanning2d_setting::DepthSourceExposureTime
Definition
Scanning2D.h:186
mmind::eye::scanning2d_setting::ExpectedGrayValue
Definition
Scanning2D.h:104
mmind::eye::scanning2d_setting::ExposureMode
Definition
Scanning2D.h:48
mmind::eye::scanning2d_setting::ExposureTime
Definition
Scanning2D.h:71
mmind::eye::scanning2d_setting::FlashAcquisitionMode
Definition
Scanning2D.h:204
mmind::eye::scanning2d_setting::FlashExposureTime
Definition
Scanning2D.h:235
mmind::eye::scanning2d_setting::FlashGain
Definition
Scanning2D.h:289
mmind::eye::scanning2d_setting::FlashPowerLevel
Definition
Scanning2D.h:308
mmind::eye::scanning2d_setting::Gain
Definition
Scanning2D.h:255
mmind::eye::scanning2d_setting::HDRExposureSequence
Definition
Scanning2D.h:146
mmind::eye::scanning2d_setting::PatternRoleGain
Definition
Scanning2D.h:271
mmind::eye::scanning2d_setting::SharpenFactor
Definition
Scanning2D.h:88
mmind::eye::scanning2d_setting::ToneMappingEnable
Definition
Scanning2D.h:119
mmind::eye::Range
Describes a value range.
Definition
CommonTypes.h:29
Generated by
1.17.0