Mech-Eye API 2.6.0
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
Scanning3D.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#pragma once
36#include "Parameter.h"
37
38namespace mmind {
39
40namespace eye {
41
42// Parameters affect the images used for calculating depth data, thus affecting the quality of the
43// depth map and point cloud.
44namespace scanning3d_setting {
45
46// Scanning 3D Exposure Count
48{
49public:
50 static constexpr const char* name = "Scan3DExposureCount";
51
52 static constexpr const char* description =
53 "Sets the number of exposure times. If the value of ExposureCount is greater than 1, "
54 "multiple exposure times must be set. "
55 "All images captured with different exposure times are used for calculating depth.";
56
57 static constexpr Parameter::Type type = Parameter::Type::_Int;
58
59 static constexpr Range<int> range() { return {1, 2}; }
60};
61
62// Scanning 3D Exposure Sequence
64{
65public:
66 static constexpr const char* name = "Scan3DExposureSequence";
67
68 static constexpr const char* description =
69 "Set the exposure time and exposure multiplier for acquiring depth information. Usually, "
70 "long exposure time is used for dark objects, and short exposure time is used for light "
71 "objects. If the size of array is greater than 1, multiple exposure times must be set. "
72 "Using multiple exposure times can improve the completeness of depth data but also "
73 "increases processing time.\n\nNote: multiple exposure time is unavailable when "
74 "\"FringeCodingMode\" is set to \"Reflective\".";
75
76 static constexpr Parameter::Type type = Parameter::Type::_FloatArray;
77
78 static constexpr Range<double> range() { return {0.1, 99}; }
79
80 static constexpr int maxSize() { return 3; }
81
82 static constexpr const char* unit = "ms";
83};
84
85// Scanning 3D Gain
86class Gain
87{
88public:
89 static constexpr const char* name = "Scan3DGain";
90
91 static constexpr const char* description =
92 "Set camera's gain value during scanning 3D images. Gain is an electronic amplification of "
93 "the image signal. Large gain value is needed only when scanning extremely dark objects.";
94
95 static constexpr Parameter::Type type = Parameter::Type::_Float;
96
97 static constexpr Range<double> range() { return {0.0, 16.0}; }
98
99 static constexpr const char* unit = "dB";
100};
101
102// Scanning 3D Exposure Group Selector
104{
105public:
106 static constexpr const char* name = "GroupExposureSelector";
107
108 static constexpr const char* description =
109 "Selects the exposure group for configuring \"GroupScan3DExposureTime\", "
110 "\"GroupScan3DGain\", and \"GroupDlpPowerLevel\".";
111
112 static constexpr Parameter::Type type = Parameter::Type::_Enum;
113
114 enum struct Value {
115 Exposure1,
116 Exposure2,
117 };
118};
119
120// Scanning 3D Exposure Time (Group)
122{
123public:
124 static constexpr const char* name = "GroupScan3DExposureTime";
125
126 static constexpr const char* description =
127 "Set the exposure time for the selected exposure group. Use "
128 "\"GroupExposureSelector\" to select the exposure group.";
129
130 static constexpr Parameter::Type type = Parameter::Type::_Float;
131
132 static constexpr Range<double> range() { return {0.1, 99}; }
133
134 static constexpr const char* unit = "ms";
135};
136
137// Scanning 3D Gain (Group)
139{
140public:
141 static constexpr const char* name = "GroupScan3DGain";
142
143 static constexpr const char* description =
144 "Sets the gain for the selected exposure group. "
145 "Use \"GroupExposureSelector\" to select the exposure group.";
146
147 static constexpr Parameter::Type type = Parameter::Type::_Float;
148
149 static constexpr Range<double> range() { return {0.0, 16.0}; }
150
151 static constexpr const char* unit = "dB";
152};
153
154// DLP Power Level (Group)
156{
157public:
158 static constexpr const char* name = "GroupDlpPowerLevel";
159
160 static constexpr const char* description =
161 "Sets the DLP projector power level for the selected exposure group. "
162 "Use \"GroupExposureSelector\" to select the exposure group.";
163
164 static constexpr Parameter::Type type = Parameter::Type::_Int;
165
166 static constexpr Range<int> range() { return {20, 100}; }
167
168 static constexpr const char* unit = "%";
169};
170
171// Scanning 3D ROI
172class ROI
173{
174public:
175 static constexpr const char* name = "Scan3DROI";
176
177 static constexpr const char* description =
178 "Set the ROI for the depth map and point cloud. Points outside the selected region are "
179 "removed. All values are zero if an ROI is not set.";
180
181 static constexpr Parameter::Type type = Parameter::Type::_Roi;
182};
183
184// Depth Range
186{
187public:
188 static constexpr const char* name = "DepthRange";
189
190 static constexpr const char* description =
191 "Set the depth range in the camera reference frame. Points outside this range are removed "
192 "from the depth map and point cloud.";
193
194 static constexpr Parameter::Type type = Parameter::Type::_Range;
195
196 static constexpr Range<int> range() { return {1, 5000}; }
197
198 static constexpr const char* unit = "mm";
199};
200
201} // namespace scanning3d_setting
202
203} // namespace eye
204
205} // namespace mmind
Type
Describes the device parameter data types.
Definition Parameter.h:30
@ _Int
Integer type.
Definition Parameter.h:31
@ _Roi
ROI type. See ROI for details.
Definition Parameter.h:35
@ _Enum
Enumeration type.
Definition Parameter.h:34
@ _Range
Range type. See Range for details.
Definition Parameter.h:36
@ _Float
Double type.
Definition Parameter.h:32
@ _FloatArray
Vector of double types.
Definition Parameter.h:37
Describes a value range.
Definition CommonTypes.h:29