Mech-Eye API 2.4.0
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
Laser.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
36#pragma once
37#include "Parameter.h"
38
39namespace mmind {
40
41namespace eye {
42
43namespace laser_setting {
44
46{
47public:
48 static constexpr const char* name = "LaserPowerLevel";
49
50 static constexpr const char* description =
51 "Set Laser's power level."
52 "High power is often used for scanning dark objects. Low power is often used for scanning "
53 "reflective objects.";
54
55 static constexpr Parameter::Type type = Parameter::Type::_Int;
56
57 static constexpr int step() { return 10; }
58
59 static constexpr Range<int> range() { return {50, 100}; }
60
61 static constexpr const char* unit = "%";
62};
63
65{
66public:
67 static constexpr const char* name = "LaserFringeCodingMode";
68
69 static constexpr const char* description =
70 "Select the pattern of the structured light to be projected.\n\nNote:\n* When "
71 "\"Reflective\" is selected, the following tool and parameters are "
72 "unavailable:\n\"FramePartitionCount\" in the \"mmind::eye::laser_setting\" namespace\n** "
73 "\"FringeMinThreshold\" in the \"mmind::eye::pointcloud_processing_setting\" namespace.";
74
75 static constexpr Parameter::Type type = Parameter::Type::_Enum;
76
77 enum struct Value {
78 Fast,
80 Accurate,
84 };
85};
86
88{
89public:
90 static constexpr const char* name = "LaserProcessingMode";
91
92 static constexpr const char* description =
93 "Select the data processing mode for the \"Reflective\" fringe coding mode.\n\n* Faster: "
94 "provides faster processing speed, but the depth data might have missing points. Suitable "
95 "for scenarios with relatively simple reflective conditions.\n* More Complete: provides "
96 "more complete depth data, but the processing speed is slower. Suitable for scenarios with "
97 "complex reflective conditions, such as a bin whose walls often cause interreflection.";
98
99 static constexpr Parameter::Type type = Parameter::Type::_Enum;
100
101 enum struct Value {
102 Faster,
107 };
108};
109
111{
112public:
113 static constexpr const char* name = "LaserFrameRange";
114
115 static constexpr const char* description = "Modify the Laser's scan range.";
116
117 static constexpr Parameter::Type type = Parameter::Type::_Range;
118
119 static constexpr Range<int> range() { return {0, 100}; }
120};
121
123{
124public:
125 static constexpr const char* name = "LaserFramePartitionCount";
126
127 static constexpr const char* description =
128 "Set Laser's scan partition count."
129 "If the value is more than 1, the scan from start to end will be partitioned to "
130 "multiple "
131 "parts. It is recommended to use mutiple partition for extremely dark "
132 "objects.\n\nNote: "
133 "\"FramePartitionCount\" is unavailable when \"FringeCodingMode\" category is set to "
134 "\"Reflective\".";
135
136 static constexpr Parameter::Type type = Parameter::Type::_Int;
137
138 static constexpr Range<int> range() { return {1, 4}; }
139};
140} // namespace laser_setting
141
142} // namespace eye
143
144} // namespace mmind
Represents a 2D container of data.
Definition Array2D.h:17
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
@ _Range
Range type. See Range for details.
Definition Parameter.h:36