Mech-Eye API 2.3.3
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
MechEyeDataType.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
33#pragma once
34#include <string>
35#include <vector>
36
37namespace mmind {
38
39namespace api {
40
82
87{
88 std::string model;
89 std::string id;
90 std::string
92 std::string firmwareVersion;
93 std::string ipAddress;
94 uint16_t port;
95};
96
105
110{
111 double distortion[5] = {};
113 double cameraMatrix[4] = {};
114};
115
120struct Pose
121{
122 double rotation[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
123 double translation[3] = {0, 0, 0};
124};
125
131{
133 textureCameraIntri;
136
140};
141
146{
147 unsigned colorMapWidth;
148 unsigned colorMapHeight;
149 unsigned depthMapWidth;
150 unsigned depthMapHeight;
151};
152
156struct ROI
157{
158 ROI() = default;
159 ROI(int x, int y, int width, int height) : x(x), y(y), width(width), height(height) {}
160 unsigned x;
161 unsigned y;
162 unsigned width;
163 unsigned height;
164};
165
170{
171 DepthRange() = default;
172 DepthRange(int lower, int upper) : lower(lower), upper(upper) {}
173 int lower;
175 int upper;
177};
178
182enum class ExposureMode {
183 HDR,
185 Timed,
186};
187
191enum class CaptureMode {
192 Raw,
193 Depth,
194};
195
199enum class TriggerSource {
200 Software,
201 Encoder,
202};
203
207enum class ImageAnalogGain {
208 AnalogGain_1_0,
209 AnalogGain_1_3,
210 AnalogGain_1_9,
211 AnalogGain_2_8,
212 AnalogGain_5_5,
213};
214
215enum class ImageAnalogGainFor8030 {
216 AnalogGain_1_0,
217 AnalogGain_1_3,
218 AnalogGain_2_0,
219 AnalogGain_3_0,
220};
221
225enum class ROIMode {
226 Mode_1_1,
227 Mode_1_2,
228 Mode_1_4,
229 Mode_1_8,
230 Mode_1_16,
231};
232
236enum class EncoderTriggerMode {
237 Positive,
239 Negative,
241 Duplex,
244};
245
249enum class EncoderMultiplier {
250 Multiple_1,
251 Multiple_2,
252 Multiple_4,
253};
254
258enum class FilterType {
259 None,
260 Smoothing,
261 Smoothing_edge_preserving,
262 Median,
263};
264
268enum class MeanFilterWindow {
269 Window_Size_0,
270 Window_Size_2,
271 Window_Size_4,
272 Window_Size_8,
273 Window_Size_16,
274 Window_Size_32,
275 Window_Size_64,
276};
277
281enum class MedianFilterWindow {
282 Window_Size_0,
283 Window_Size_3,
284 Window_Size_5,
285 Window_Size_7,
286 Window_Size_9,
287};
288
292enum class ProfileStrategy {
293 Standard,
294 Near,
295 Far,
296 Continous,
297 Invalid,
298};
299
300} // namespace api
301} // namespace mmind
This struct defines camera intrinsic parameters.
double cameraMatrix[4]
Camera matrix, which arrange in [fx, fy, cx, cy].
This struct defines the depth range.
This struct defines device intrinsic parameters, including texture camera and depth camera.
CameraIntri depthCameraIntri
The intrinsic parameters of the camera for capturing color map.
Pose depthToTexture
The intrinsic parameters of the camera for capturing depth map.
This struct defines camera map resolution.
unsigned colorMapHeight
The height of the color map.
unsigned depthMapWidth
The width of the depth map.
unsigned colorMapWidth
The width of the color map.
unsigned depthMapHeight
The height of the depth map.
This struct describes the device temperature information.
float projectorModuleTemperature
projector module temperature in degrees Celsius.
float cpuTemperature
CPU temperature in the device motherboard in degrees Celsius.
This enumeration defines the types of errors.
@ MMIND_STATUS_SUCCESS
Success status.
@ MMIND_STATUS_PARAMETER_SET_ERROR
Error setting parameter to device.
@ MMIND_STATUS_INVALID_INTRINSICS_PARAMETER
Error invalid intrinsics parameters.
@ MMIND_STATUS_CAPTURE_NO_FRAME
Error no frame is captured.
@ MMIND_STATUS_INVALID_DEVICE
Error invalid device.
@ MMIND_HANDEYE_CALIBRATION_POSE_INVALID
Error invalid pose..
@ MMIND_STATUS_DEVICE_OFFLINE
Error offline device. Please check the status of the device.
@ MMIND_HANDEYE_CALIBRATION_PATTERN_IMAGE_ERROR
Error occurred while processing the 2D image with feature detection results.
@ MMIND_HANDEYE_CALIBRATION_POSES_INSUFFICIENT
Error insufficient calibration poses.
@ MMIND_STATUS_PARAMETER_GET_ERROR
Error reading parameter from device.
@ MMIND_STATUS_FIRMWARE_NOT_SUPPORTED
Error not supported camera firmware. Please use MechEye Viewer to upgrade.
@ MMIND_STATUS_INVALID_INPUT_FRAME
Error invalid input frame.
This struct defines device information.
std::string ipAddress
IP address of the device.
std::string model
Device model name, such as Mech-Eye Nano.
std::string firmwareVersion
The version of the firmware which can be upgraded.
std::string hardwareVersion
The version of the hardware which is pre-determined from the factory.
This struct defines rigid body transformations, including rotation matrix and translation vector.
double rotation[3][3]
3*3 rotation matrix.
double translation[3]
3*1 translation vector in [x(mm), y(mm), z(mm)].
This struct defines camera region of interest.
unsigned y
The row coordinates of the upper left point of the region of interest.
unsigned height
The height of the region of interest.
unsigned x
The column coordinates of the upper left point of the region of interest.
unsigned width
The width of the region of interest.