Mech-Eye API
2.6.0
API reference documentation for Mech-Eye 3D Laser Profiler
Toggle main menu visibility
Loading...
Searching...
No Matches
profiler
parameters
ScanParameters.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
36
namespace
mmind {
37
38
namespace
eye {
39
40
namespace
trigger_settings {
41
class
DataAcquisitionMethod
42
{
43
public
:
44
static
constexpr
const
char
* name =
"DataAcquisitionMethod"
;
45
46
static
constexpr
const
char
* description =
47
"This parameter determines how to generate data.\n\nFrame_Based: Generates one intensity "
48
"image and one depth map each time data acquisition is triggered.\nNonStop: Continuously "
49
"scans the target object and returns fixed-length data segments after data acquisition is "
50
"triggered.\n\nNote:\n* The length of the intensity image and depth map or the data "
51
"segment is set by the \"ScanLineCount\" parameter in the \"scan_settings\" namespace."
;
52
53
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
54
55
enum struct
Value {
56
Frame_Based = 0,
57
Nonstop = 1,
58
};
59
};
60
61
class
DataAcquisitionTriggerSource
62
{
63
public
:
64
static
constexpr
const
char
* name =
"DataAcquisitionTriggerSource"
;
65
66
static
constexpr
const
char
* description =
67
"Select the source of the signals that trigger the scan of a single frame.\nIf you use "
68
"external input signal to trigger scanning, select \"External\".\nIf you need to trigger "
69
"scanning with software, select \"Software\"."
;
70
71
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
72
73
enum struct
Value {
74
Software,
75
External,
76
};
77
};
78
79
class
LineScanTriggerSource
80
{
81
public
:
82
static
constexpr
const
char
* name =
"LineScanTriggerSource"
;
83
84
static
constexpr
const
char
* description =
85
"Select the source of the signals that trigger the scan of a single line.\nIf you use "
86
"encoder to trigger scanning, select \"Encoder\".\nIf you need to trigger scanning at a "
87
"fixed rate, select \"FixedRate\" and adjust \"SoftwareTriggerRate\"."
;
88
89
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
90
91
enum struct
Value {
92
FixedRate,
93
Encoder,
94
};
95
};
96
97
class
SoftwareTriggerRate
98
{
99
public
:
100
static
constexpr
const
char
* name =
"SoftwareTriggerRate"
;
101
102
static
constexpr
const
char
* description =
103
"When \"LineScanTriggerSource\" is set to \"FixedRate\", set the fixed rate at which "
104
"the laser profiler is triggered to scan.\n\nThe maximum value of this parameter is the "
105
"current \"MaxScanRate\". \"SoftwareTriggerRate\" is unavailable when "
106
"\"LineScanTriggerSource\" is set to \"Encoder\"."
;
107
108
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
109
110
static
constexpr
const
char
* unit =
"Hz"
;
111
};
112
113
class
TravelSpeed
114
{
115
public
:
116
static
constexpr
const
char
* name =
"TravelSpeed"
;
117
118
static
constexpr
const
char
* description =
119
"Enter the travel speed of the target object relative to the profiler to calculate the "
120
"Y-axis resolution."
;
121
122
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
123
124
static
constexpr
const
char
* unit =
"mm/s"
;
125
};
126
127
class
MaxScanRate
128
{
129
public
:
130
static
constexpr
const
char
* name =
"MaxScanRate"
;
131
132
static
constexpr
const
char
* description =
133
"The maximum scan rate that the laser profiler can reach. The maximum scan rate is "
134
"affected by the following parameters: \"ExposureTime\", \"ZDirectionRoi\", and "
135
"\"TriggerDelay\""
;
136
137
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
138
139
static
constexpr
const
char
* unit =
"Hz"
;
140
};
141
142
class
TriggerDelay
143
{
144
public
:
145
static
constexpr
const
char
* name =
"TriggerDelay"
;
146
147
static
constexpr
const
char
* description =
148
"This parameter is only effective for firmware 2.4.0 and above.\n"
149
"Set the delay time between receiving a line scan trigger signal and emitting laser "
150
"light.\n\n"
151
"Note:\n"
152
"* Only adjust this parameter in the following situation: Multiple laser profilers are "
153
"used to scan the same target object, and their FOVs overlap. The laser profilers will "
154
"interfere with each other if they emit laser light at the same time.\n"
155
"* Increasing this parameter will reduce the max scan rate.\n"
156
"* The laser profiler starts exposure 10 μs after emitting laser light to ensure stable "
157
"brightness of the laser lines in the raw image."
;
158
159
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
160
161
static
constexpr
const
char
* unit =
"us"
;
162
};
163
164
class
EncoderTriggerDirection
165
{
166
public
:
167
static
constexpr
const
char
* name =
"EncoderTriggerDirection"
;
168
169
static
constexpr
const
char
* description =
170
"Select the encoder motion direction that triggers scanning.\nChannelALeading: Scanning "
171
"is triggered when channel A is leading.\nChannelBLeading: Scanning is triggered when "
172
"channel B is leading. \nBoth: Scanning is triggered when either channel A or channel B is "
173
"leading."
;
174
175
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
176
177
enum struct
Value {
178
ChannelALeading,
179
ChannelBLeading,
180
Both,
181
};
182
};
183
184
class
EncoderTriggerSignalCountingMode
185
{
186
public
:
187
static
constexpr
const
char
* name =
"EncoderTriggerSignalCountingMode"
;
188
189
static
constexpr
const
char
* description =
190
"Set the number of signals to be counted in an encoder cycle. Counted signals are used to "
191
"trigger scanning.\nNote: This parameter affects the adjustment of "
192
"\"EncoderTriggerInterval\".\n\nMultiple_1: counts 1 signal in an encoder "
193
"cycle.\nMULTIPLE_2: counts 2 signals in an encoder cycle.\nMULTIPLE_4: counts 4 signals "
194
"in an encoder cycle."
;
195
196
static
constexpr
Parameter::Type
type =
Parameter::Type::_Enum
;
197
198
enum struct
Value {
199
Multiple_1,
200
Multiple_2,
201
Multiple_4,
202
};
203
};
204
205
class
EncoderTriggerInterval
206
{
207
public
:
208
static
constexpr
const
char
* name =
"EncoderTriggerInterval"
;
209
210
static
constexpr
const
char
* description =
211
"Set the number of trigger signals needed for scanning one line."
;
212
213
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
214
};
215
216
class
EncoderResolution
217
{
218
public
:
219
static
constexpr
const
char
* name =
"EncoderResolution"
;
220
221
static
constexpr
const
char
* description =
222
"Sets the encoder resolution, which is the travel distance corresponding to one "
223
"quadrature signal. You can also use the Encoder Settings tool to calculate the encoder "
224
"resolution."
;
225
226
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
227
228
static
constexpr
const
char
* unit =
"um"
;
229
};
230
}
// namespace trigger_settings
231
232
namespace
scan_settings {
233
234
class
ScanLineCount
235
{
236
public
:
237
static
constexpr
const
char
* name =
"ScanLineCount"
;
238
239
static
constexpr
const
char
* description =
240
"Set the number of profiles in the acquired data.\n\nWhen the \"DataAcquisitionMethod\" "
241
"parameter in the \"trigger_settings\" namespace is set to \"Frame_Based\", this "
242
"parameter sets the number of profiles needed to generate one intensity image/depth "
243
"map.\nMake sure that the set value can cover one target object completely.\n\nWhen the "
244
"\"DataAcquisitionMethod\" parameter in the \"trigger_settings\" namespace is set to "
245
"\"Nonstop\", this parameter sets the length of the returned data segments."
;
246
247
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
248
};
249
250
class
ScanDistance
251
{
252
public
:
253
static
constexpr
const
char
* name =
"ScanDistance"
;
254
255
static
constexpr
const
char
* description =
256
"Displays the scan distance.\n\n"
257
"Scan Distance (μm) = Scan Line Count × Y-Axis Resolution (μm)"
;
258
259
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
260
261
static
constexpr
const
char
* unit =
"μm"
;
262
};
263
264
class
DataPointsPerProfile
265
{
266
public
:
267
static
constexpr
const
char
* name =
"DataPointsPerProfile"
;
268
269
static
constexpr
const
char
* description =
"The number of data points in a profile."
;
270
271
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
272
273
static
constexpr
const
char
* unit =
""
;
274
};
275
276
class
ExposureDelay
277
{
278
public
:
279
static
constexpr
const
char
* name =
"ExposureDelay"
;
280
281
static
constexpr
const
char
* description =
282
"This parameter is only effective for firmware 2.3.4 and below.\nSet the delay time "
283
"between laser emission and start of exposure.\n\nLarger exposure delay "
284
"results in more stable brightness of the laser lines in the raw image, thus more stable "
285
"quality of the intensity image and depth map. However, the \"MaxScanRate\" will be "
286
"reduced."
;
287
288
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
289
290
static
constexpr
const
char
* unit =
"us"
;
291
};
292
293
class
BatchRetrievalTimeout
294
{
295
public
:
296
static
constexpr
const
char
* name =
"BatchRetrievalTimeout"
;
297
298
static
constexpr
const
char
* description =
299
"Set the timeout period for retrieving a batch of data. If no batches are available for "
300
"retrieval within the set timeout period, the current round of data acquisition is "
301
"automatically stopped.\nFor firmware version 2.4.1 and below, this timeout should be at "
302
"least the time required to scan 16 lines. For firmware version 2.5.0 and above, it should "
303
"be at least the time needed to scan a single line. If line scan is triggered at a slow "
304
"rate, increase this parameter."
;
305
306
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
307
308
static
constexpr
const
char
* unit =
"ms"
;
309
};
310
311
class
CallbackRetrievalTimeout
312
{
313
public
:
314
static
constexpr
const
char
* name =
"CallbackRetrievalTimeout"
;
315
316
static
constexpr
const
char
* description =
317
"Set the timeout period for retrieving data when using a callback function. If none or "
318
"only some of the data is retrieved within the set timeout period, the current round of "
319
"data acquisition is automatically stopped. The amount of data to be retrieved is "
320
"determined by the \"ScanLineCount\" parameter.\nA value of 0 or -1 corresponds to an "
321
"infinite timeout period."
;
322
323
static
constexpr
Parameter::Type
type =
Parameter::Type::_Int
;
324
325
static
constexpr
const
char
* unit =
"ms"
;
326
};
327
328
}
// namespace scan_settings
329
330
namespace
point_cloud_resolutions {
331
class
XAxisResolution
332
{
333
public
:
334
static
constexpr
const
char
* name =
"XAxisResolution"
;
335
336
static
constexpr
const
char
* description =
337
"Sets the scan data resolution in the X direction, which is the distance between two "
338
"neighboring points along the direction of the laser line."
;
339
340
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
341
342
static
constexpr
const
char
* unit =
"um"
;
343
};
344
345
class
YResolution
346
{
347
public
:
348
static
constexpr
const
char
* name =
"YResolution"
;
349
350
static
constexpr
const
char
* description =
351
"Displays the scan data resolution in the Y-axis direction, which is the distance "
352
"between two neighboring points along the travel direction of the target object."
;
353
354
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
355
356
static
constexpr
const
char
* unit =
"um"
;
357
};
358
}
// namespace point_cloud_resolutions
359
360
namespace
correction {
361
class
EnableTiltCorrection
362
{
363
public
:
364
static
constexpr
const
char
* name =
"EnableTiltCorrection"
;
365
366
static
constexpr
const
char
* description =
367
"Enable this parameter to apply the tilt correction result to the profile. Acquire data "
368
"again to see the effect."
;
369
370
static
constexpr
Parameter::Type
type =
Parameter::Type::_Bool
;
371
};
372
373
class
EnableHeightCorrection
374
{
375
public
:
376
static
constexpr
const
char
* name =
"EnableHeightCorrection"
;
377
378
static
constexpr
const
char
* description =
379
"Enable this parameter to apply the height correction result to the profile. Acquire data "
380
"again to see the effect."
;
381
382
static
constexpr
Parameter::Type
type =
Parameter::Type::_Bool
;
383
};
384
385
class
TiltCorrectionAngle
386
{
387
public
:
388
static
constexpr
const
char
* name =
"TiltCorrectionAngle"
;
389
390
static
constexpr
const
char
* description =
"Correct the tilt of the profile around the Y-axis."
;
391
392
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
393
394
static
constexpr
const
char
* unit =
"degree"
;
395
396
static
constexpr
Range<double>
range() {
return
{-90, 90}; }
397
398
static
constexpr
double
step = 0.001;
399
};
400
401
class
HeightCorrectionRatio
402
{
403
public
:
404
static
constexpr
const
char
* name =
"HeightCorrectionRatio"
;
405
406
static
constexpr
const
char
* description =
"Correct the Z values of the profile."
;
407
408
static
constexpr
Parameter::Type
type =
Parameter::Type::_Float
;
409
410
static
constexpr
Range<double>
range() {
return
{0.001, 8}; }
411
412
static
constexpr
double
defaultValue = 1.0;
413
414
static
constexpr
double
step = 0.001;
415
};
416
}
// namespace correction
417
418
namespace
transformation {
419
class
CoordinateTransformation
420
{
421
public
:
422
static
constexpr
const
char
* name =
"CoordinateTransformation"
;
423
424
static
constexpr
const
char
* description =
425
"The CoordinateTransformation, which represents the transformation matrix from the "
426
"camera coordinate system to a custom coordinate system. It can change the xyz values of "
427
"the point cloud."
;
428
429
static
constexpr
Parameter::Type
type =
Parameter::Type::_FloatArray
;
430
};
431
}
// namespace transformation
432
433
}
// namespace eye
434
}
// 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::_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::correction::EnableHeightCorrection
Definition
ScanParameters.h:374
mmind::eye::correction::EnableTiltCorrection
Definition
ScanParameters.h:362
mmind::eye::correction::HeightCorrectionRatio
Definition
ScanParameters.h:402
mmind::eye::correction::TiltCorrectionAngle
Definition
ScanParameters.h:386
mmind::eye::point_cloud_resolutions::XAxisResolution
Definition
ScanParameters.h:332
mmind::eye::point_cloud_resolutions::YResolution
Definition
ScanParameters.h:346
mmind::eye::scan_settings::BatchRetrievalTimeout
Definition
ScanParameters.h:294
mmind::eye::scan_settings::CallbackRetrievalTimeout
Definition
ScanParameters.h:312
mmind::eye::scan_settings::DataPointsPerProfile
Definition
ScanParameters.h:265
mmind::eye::scan_settings::ExposureDelay
Definition
ScanParameters.h:277
mmind::eye::scan_settings::ScanDistance
Definition
ScanParameters.h:251
mmind::eye::scan_settings::ScanLineCount
Definition
ScanParameters.h:235
mmind::eye::transformation::CoordinateTransformation
Definition
ScanParameters.h:420
mmind::eye::trigger_settings::DataAcquisitionMethod
Definition
ScanParameters.h:42
mmind::eye::trigger_settings::DataAcquisitionTriggerSource
Definition
ScanParameters.h:62
mmind::eye::trigger_settings::EncoderResolution
Definition
ScanParameters.h:217
mmind::eye::trigger_settings::EncoderTriggerDirection
Definition
ScanParameters.h:165
mmind::eye::trigger_settings::EncoderTriggerInterval
Definition
ScanParameters.h:206
mmind::eye::trigger_settings::EncoderTriggerSignalCountingMode
Definition
ScanParameters.h:185
mmind::eye::trigger_settings::LineScanTriggerSource
Definition
ScanParameters.h:80
mmind::eye::trigger_settings::MaxScanRate
Definition
ScanParameters.h:128
mmind::eye::trigger_settings::SoftwareTriggerRate
Definition
ScanParameters.h:98
mmind::eye::trigger_settings::TravelSpeed
Definition
ScanParameters.h:114
mmind::eye::trigger_settings::TriggerDelay
Definition
ScanParameters.h:143
mmind::eye::Range
Describes a value range.
Definition
CommonTypes.h:29
Generated by
1.17.0