Mech-Eye API
2.6.0
API reference documentation for Mech-Eye Industrial 3D Camera
Toggle main menu visibility
Loading...
Searching...
No Matches
area_scan_3d_camera
Frame2D.h
1
/*******************************************************************************
2
* BSD 3-Clause License
3
*
4
* Copyright (c) 2016-2025, Mech-Mind Robotics Technologies Co., Ltd.
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 <memory>
38
#include "api_global.h"
39
#include "CameraProperties.h"
40
#include "Array2D.h"
41
42
namespace
mmind {
43
44
namespace
eye {
45
49
struct
Gray
50
{
51
uint8_t
gray
{0};
52
};
53
57
struct
ColorBGR
58
{
59
uint8_t
b
{0};
60
uint8_t
g
{0};
61
uint8_t
r
{0};
62
};
63
64
using
GrayScale2DImage = Array2D<Gray>;
65
using
Color2DImage = Array2D<ColorBGR>;
66
72
class
MMIND_API_EXPORT
Frame2D
73
{
74
public
:
78
Frame2D
();
79
83
~Frame2D
();
84
88
Frame2D
(
const
Frame2D
& other)
noexcept
;
89
93
Frame2D
&
operator=
(
const
Frame2D
& other)
noexcept
;
94
98
Size
imageSize
()
const
;
99
103
bool
isEmpty
()
const
;
104
108
ColorTypeOf2DCamera
colorType
()
const
;
109
113
uint64_t
frameId
()
const
;
114
118
void
clear
();
119
128
GrayScale2DImage
getGrayScaleImage
()
const
;
129
138
Color2DImage
getColorImage
()
const
;
139
140
private
:
141
friend
class
CameraImpl;
142
friend
class
Frame2DAnd3D;
143
friend
class
InternalInterfaces;
144
145
std::shared_ptr<class Frame2DImpl> _impl;
146
Frame2D
(std::shared_ptr<Frame2DImpl>& frameImpl);
147
};
148
149
}
// namespace eye
150
}
// namespace mmind
mmind::eye::Frame2D::colorType
ColorTypeOf2DCamera colorType() const
Gets the color type of the 2D camera in the 3D camera.
mmind::eye::Frame2D::frameId
uint64_t frameId() const
The ID of the Frame2D frame.
mmind::eye::Frame2D::Frame2D
Frame2D(const Frame2D &other) noexcept
Constructor.
mmind::eye::Frame2D::getColorImage
Color2DImage getColorImage() const
Gets the image data of the Frame2D with the ColorBGR pixel format. If the 2D camera's color type (acc...
mmind::eye::Frame2D::isEmpty
bool isEmpty() const
Judges whether Frame2D is empty.
mmind::eye::Frame2D::operator=
Frame2D & operator=(const Frame2D &other) noexcept
Copy assignment.
mmind::eye::Frame2D::clear
void clear()
Clears the data in Frame2D and releases the associated resources.
mmind::eye::Frame2D::getGrayScaleImage
GrayScale2DImage getGrayScaleImage() const
Gets image data of the Frame2D with the Gray pixel format. If the 2D camera's color type (according t...
mmind::eye::Frame2D::imageSize
Size imageSize() const
Gets the image size of Frame2D.
mmind::eye::Frame2D::~Frame2D
~Frame2D()
Destructor.
mmind::eye::Frame2D::Frame2D
Frame2D()
Constructor.
mmind::eye::ColorBGR
Represents a pixel in Color2DImage with blue, green, and red channel information.
Definition
Frame2D.h:58
mmind::eye::ColorBGR::b
uint8_t b
Blue channel.
Definition
Frame2D.h:59
mmind::eye::ColorBGR::r
uint8_t r
Red channel.
Definition
Frame2D.h:61
mmind::eye::ColorBGR::g
uint8_t g
Green channel.
Definition
Frame2D.h:60
mmind::eye::Gray
Represents a pixel in GrayScale2DImage with grayscale channel information.
Definition
Frame2D.h:50
mmind::eye::Gray::gray
uint8_t gray
Grayscale channel.
Definition
Frame2D.h:51
mmind::eye::Size
Describes a two-dimensional size with a width and a height.
Definition
CommonTypes.h:40
Generated by
1.17.0