Mech-Eye API 2.2.1
API reference documentation for Mech-Eye Industrial 3D Camera
All Classes Functions Variables Enumerations Enumerator Pages
Public Member Functions | Friends | List of all members
mmind::eye::Frame2D Class Reference

Represents the 2D scanning result, which can be obtained by calling Camera::capture2D. Use a 2D array to represent it while each pixel represents its corresponding 2D data. The 2D data can be in the form of Gray and ColorBGR. More...

#include <Frame2D.h>

Public Member Functions

 Frame2D ()
 Constructor.
 
 ~Frame2D ()
 Destructor.
 
 Frame2D (const Frame2D &other) noexcept
 Constructor.
 
Frame2Doperator= (const Frame2D &other) noexcept
 Copy assignment.
 
Size imageSize () const
 Gets the image size information of Frame2D.
 
bool isEmpty () const
 Judges whether Frame2D is empty.
 
ColorTypeOf2DCamera colorType () const
 Gets the color type of the 2D camera mounted on the device.
 
void clear ()
 Clears the data in Frame2D and releases the related resources.
 
GrayScale2DImage getGrayScaleImage () const
 Gets image data of the Frame2D with Gray pixel format of each point. If the camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Monochrome, the function gets the origin data. If color type is Frame2DColorType.Color, the function converts ColorBGR values to Gray value according to the formula: Gray = 0.299 * Red + 0.587 * Green + 0.114 * Blue.
 
Color2DImage getColorImage () const
 Gets the image data of the Frame2D with ColorBGR pixel format of each point. If the camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Color, the function gets the origin data. If color type is Frame2DColorType.Monochrome, the function converts Gray value to ColorBGR values according to the formula: Blue = Gray, Green = Gray, Red = Gray.
 

Friends

class CameraImpl
 
class Frame2DAnd3D
 

Detailed Description

Represents the 2D scanning result, which can be obtained by calling Camera::capture2D. Use a 2D array to represent it while each pixel represents its corresponding 2D data. The 2D data can be in the form of Gray and ColorBGR.

Definition at line 72 of file Frame2D.h.

Member Function Documentation

◆ getColorImage()

Color2DImage mmind::eye::Frame2D::getColorImage ( ) const

Gets the image data of the Frame2D with ColorBGR pixel format of each point. If the camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Color, the function gets the origin data. If color type is Frame2DColorType.Monochrome, the function converts Gray value to ColorBGR values according to the formula: Blue = Gray, Green = Gray, Red = Gray.

Returns
See Color2DImage for details.

◆ getGrayScaleImage()

GrayScale2DImage mmind::eye::Frame2D::getGrayScaleImage ( ) const

Gets image data of the Frame2D with Gray pixel format of each point. If the camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Monochrome, the function gets the origin data. If color type is Frame2DColorType.Color, the function converts ColorBGR values to Gray value according to the formula: Gray = 0.299 * Red + 0.587 * Green + 0.114 * Blue.

Returns
See GrayScale2DImage for details.

Friends And Related Symbol Documentation

◆ CameraImpl

friend class CameraImpl
friend

Definition at line 136 of file Frame2D.h.

◆ Frame2DAnd3D

friend class Frame2DAnd3D
friend

Definition at line 137 of file Frame2D.h.


The documentation for this class was generated from the following file: