Mech-Eye API 2.2.1
API reference documentation for Mech-Eye Industrial 3D Camera
All Classes Functions Variables Enumerations Enumerator Pages
PointCloudProcessing.h
1/*******************************************************************************
2 * BSD 3-Clause License
3 *
4 * Copyright (c) 2016-2023, Mech-Mind Robotics
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
39namespace mmind {
40
41namespace eye {
42
43// Process the generated point cloud. Please perform image capturing again after adjusting the
44// parameters to see the result.
45namespace pointcloud_processing_setting {
46
47// Point Cloud Surface Smoothing
49{
50public:
51 static constexpr const char* name = "PointCloudSurfaceSmoothing";
52
53 static constexpr const char* description =
54 "Reduces the depth fluctuation in the point cloud and improves its resemblance to the "
55 "actual object surface. Surface smoothing causes loss of object surface details. The more "
56 "intense the smoothing, the more details are lost.";
57
58 static constexpr Parameter::Type type = Parameter::Type::_Enum;
59
60 enum struct Value {
61 Off,
62 Weak,
63 Normal,
64 Strong,
65 };
66};
67
68// Point Cloud Noise Removal
70{
71public:
72 static constexpr const char* name = "PointCloudNoiseRemoval";
73
74 static constexpr const char* description =
75 "Removes the noise in the point cloud, thus reducing the impact on the precision and "
76 "accuracy of subsequent calculation. Noise is the scattered points close to the object "
77 "surface. Noise removal might remove some sharp object features. The more intense the "
78 "noise removal, the more object features might be removed. If this function removes the "
79 "needed object features, please reduce the intensity. However, more noise will be "
80 "retained.";
81
82 static constexpr Parameter::Type type = Parameter::Type::_Enum;
83
84 enum struct Value {
85 Off,
86 Weak,
87 Normal,
88 Strong,
89 };
90};
91
92// Point Cloud Outlier Removal
94{
95public:
96 static constexpr const char* name = "PointCloudOutlierRemoval";
97
98 static constexpr const char* description =
99 "Removes the outliers in the point cloud. Outliers are clustered points away from the "
100 "object point cloud. If the object point cloud contains clustered points that have depth "
101 "difference from other parts of the object, high intensities of outlier removal might "
102 "remove these points.";
103
104 static constexpr Parameter::Type type = Parameter::Type::_Enum;
105
106 enum struct Value {
107 Off,
108 Weak,
109 Normal,
110 Strong,
111 };
112};
113
114// Point Cloud Gap Filling
116{
117public:
118 static constexpr const char* name = "PointCloudGapFilling";
119
120 static constexpr const char* description = "";
121
122 static constexpr Parameter::Type type = Parameter::Type::_Enum;
123
124 enum struct Value {
125 Off,
126 Weak,
127 Normal,
128 Strong,
129 };
130};
131
132// Point Cloud Edge Preservation
134{
135public:
136 static constexpr const char* name = "PointCloudEdgePreservation";
137
138 static constexpr const char* description =
139 "Preserves the sharpness of object edges during surface smoothing. Sharp: Preserves the "
140 "sharpness of object edges as much as possible. However, the effect of surface smoothing "
141 "will be reduced. Normal: Balances between edge preservation and surface smoothing. "
142 "Smooth: Does not preserve the edges.The object surface will be well smoothed, but the "
143 "object edges will be distorted.";
144
145 static constexpr Parameter::Type type = Parameter::Type::_Enum;
146
147 enum struct Value {
148 Sharp,
149 Normal,
150 Smooth,
151
152 };
153};
154
156{
157public:
158 static constexpr const char* name = "EnableDistortionCorrection";
159
160 static constexpr const char* description = "";
161
162 static constexpr Parameter::Type type = Parameter::Type::_Bool;
163};
164
166{
167public:
168 static constexpr const char* name = "DistortionCorrection";
169
170 static constexpr const char* description = "";
171
172 static constexpr Parameter::Type type = Parameter::Type::_Int;
173
174 static constexpr Range<int> range() { return {1, 10}; }
175
176 static constexpr const char* unit = "";
177};
178
179// Stripe Contrast Threshold
181{
182public:
183 static constexpr const char* name = "FringeContrastThreshold";
184
185 static constexpr const char* description =
186 "If the level of noise is still high after adjusting Outlier "
187 "Removal and Noise Removal, please increase the value of this "
188 "parameter. However, the points of dark objects might be lost.";
189
190 static constexpr Parameter::Type type = Parameter::Type::_Int;
191
192 static constexpr Range<int> range() { return {1, 100}; }
193
194 static constexpr const char* unit = "";
195};
196
197// Minimum Fringe Intensity Threshold
199{
200public:
201 static constexpr const char* name = "FringeMinThreshold";
202
203 static constexpr const char* description =
204 "Set the signal minimum threshold for effective pixels. Pixels with intensity less than "
205 "this threshold will be ignored. A higher value will result in more image noise to be "
206 "filtered but may also cause the point cloud of dark objects to be removed.";
207
208 static constexpr Parameter::Type type = Parameter::Type::_Int;
209
210 static constexpr Range<int> range() { return {1, 100}; }
211
212 static constexpr const char* unit = "";
213};
214
215} // namespace pointcloud_processing_setting
216} // namespace eye
217} // 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
Describes a value range.
Definition CommonTypes.h:11