Mech-Eye API 2.3.3
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-2024, 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.\n\nNote: multiple exposure time is unavailable when "
58 "\"FringeCodingMode\" is set to \"Reflective\".";
59
60 static constexpr Parameter::Type type = Parameter::Type::_FloatArray;
61
62 static constexpr Range<double> range() { return {0.1, 99}; }
63
64 static constexpr int maxSize() { return 3; }
65
66 static constexpr const char* unit = "ms";
67};
68
69// Scanning 3D Gain
70class Gain
71{
72public:
73 static constexpr const char* name = "Scan3DGain";
74
75 static constexpr const char* description =
76 "Set camera's gain value during scanning 3D images. Gain is an electronic amplification of "
77 "the image signal. Large gain value is needed only when scanning extremely dark objects.";
78
79 static constexpr Parameter::Type type = Parameter::Type::_Float;
80
81 static constexpr Range<double> range() { return {0.0, 16.0}; }
82
83 static constexpr const char* unit = "dB";
84};
85
86// Scanning 3D ROI
87class ROI
88{
89public:
90 static constexpr const char* name = "Scan3DROI";
91
92 static constexpr const char* description =
93 "Set the ROI for the depth map and point cloud. Points outside the selected region are "
94 "removed. All values are zero if an ROI is not set.";
95
96 static constexpr Parameter::Type type = Parameter::Type::_Roi;
97};
98
99// Depth Range
101{
102public:
103 static constexpr const char* name = "DepthRange";
104
105 static constexpr const char* description =
106 "Set the depth range in the camera reference frame. Points outside this range are removed "
107 "from the depth map and point cloud.";
108
109 static constexpr Parameter::Type type = Parameter::Type::_Range;
110
111 static constexpr Range<int> range() { return {1, 5000}; }
112
113 static constexpr const char* unit = "mm";
114};
115
116} // namespace scanning3d_setting
117
118} // namespace eye
119
120} // namespace mmind
Represents a 2D container of data.
Definition Array2D.h:17
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