Mech-Eye API 2.2.0
API reference documentation for Mech-Eye Industrial 3D Camera
All Classes Functions Variables Enumerations Enumerator Pages
Scanning3D.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#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 Sequence
48{
49public:
50 static constexpr const char* name = "Scan3DExposureSequence";
51
52 static constexpr const char* description =
53 "Set the exposure time and exposure multiplier for acquiring depth information. Usually, "
54 "long exposure time is used for dark objects, and short exposure time is used for light "
55 "objects. If the size of array is greater than 1, multiple exposure times must be set. "
56 "Using multiple exposure times can improve the completeness of depth data but also "
57 "increases processing time.";
58
59 static constexpr Parameter::Type type = Parameter::Type::_FloatArray;
60
61 static constexpr Range<double> range() { return {0.1, 99}; }
62
63 static constexpr int maxSize() { return 3; }
64
65 static constexpr const char* unit = "ms";
66};
67
68// Scanning 3D Gain
69class Gain
70{
71public:
72 static constexpr const char* name = "Scan3DGain";
73
74 static constexpr const char* description =
75 "Set camera's gain value during scanning 3D images. Gain is an electronic amplification of "
76 "the image signal. Large gain value is needed only when scanning extremely dark objects.";
77
78 static constexpr Parameter::Type type = Parameter::Type::_Float;
79
80 static constexpr Range<double> range() { return {0.0, 16.0}; }
81
82 static constexpr const char* unit = "dB";
83};
84
85// Scanning 3D ROI
86class ROI
87{
88public:
89 static constexpr const char* name = "Scan3DROI";
90
91 static constexpr const char* description =
92 "Set the ROI for the depth map and point cloud. Points outside the selected region are "
93 "removed. All values are zero if an ROI is not set.";
94
95 static constexpr Parameter::Type type = Parameter::Type::_Roi;
96};
97
98// Depth Range
100{
101public:
102 static constexpr const char* name = "DepthRange";
103
104 static constexpr const char* description =
105 "Set the depth range in the camera reference frame. Points outside this range are removed "
106 "from the depth map and point cloud.";
107
108 static constexpr Parameter::Type type = Parameter::Type::_Range;
109
110 static constexpr Range<int> range() { return {1, 5000}; }
111
112 static constexpr const char* unit = "mm";
113};
114
115} // namespace scanning3d_setting
116
117} // namespace eye
118
119} // namespace mmind
Type
Describes the device parameter data types.
Definition Parameter.h:30
@ _Roi
ROI type. See ROI for details.
Definition Parameter.h:35
@ _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:11