Mech-Eye API 2.5.1
API reference documentation for Mech-Eye Industrial 3D Camera
Loading...
Searching...
No Matches
Public Member Functions | Friends
Frame2D Class Reference

Represents the 2D capture result, which can be obtained by calling Camera::capture2D. The 2D data can be in the form of Gray or ColorBGR and is stored in a 2D array, with each element in the array representing an image pixel. 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 of Frame2D.
 
bool isEmpty () const
 Judges whether Frame2D is empty.
 
ColorTypeOf2DCamera colorType () const
 Gets the color type of the 2D camera in the 3D camera.
 
uint64_t frameId () const
 The ID of the Frame2D frame.
 
void clear ()
 Clears the data in Frame2D and releases the associated resources.
 
GrayScale2DImage getGrayScaleImage () const
 Gets image data of the Frame2D with the Gray pixel format. If the 2D camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Monochrome, this method gets the original data. If the color type is Frame2DColorType.Color, this method converts ColorBGR values to Gray values according to the following equation: Gray = 0.299 * Red + 0.587 * Green + 0.114 * Blue.
 
Color2DImage getColorImage () const
 Gets the image data of the Frame2D with the ColorBGR pixel format. If the 2D camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Color, this method gets the original data. If the color type is Frame2DColorType.Monochrome, this method converts the Gray values to ColorBGR values according to the following equation: Blue = Gray, Green = Gray, Red = Gray.
 

Friends

class CameraImpl
 
class Frame2DAnd3D
 
class InternalInterfaces
 

Detailed Description

Represents the 2D capture result, which can be obtained by calling Camera::capture2D. The 2D data can be in the form of Gray or ColorBGR and is stored in a 2D array, with each element in the array representing an image pixel.

Constructor & Destructor Documentation

◆ Frame2D() [1/2]

Frame2D ( )

Constructor.

◆ ~Frame2D()

~Frame2D ( )

Destructor.

◆ Frame2D() [2/2]

Frame2D ( const Frame2D other)
noexcept

Constructor.

Member Function Documentation

◆ clear()

void clear ( )

Clears the data in Frame2D and releases the associated resources.

◆ colorType()

ColorTypeOf2DCamera colorType ( ) const

Gets the color type of the 2D camera in the 3D camera.

◆ frameId()

uint64_t frameId ( ) const

The ID of the Frame2D frame.

◆ getColorImage()

Color2DImage getColorImage ( ) const

Gets the image data of the Frame2D with the ColorBGR pixel format. If the 2D camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Color, this method gets the original data. If the color type is Frame2DColorType.Monochrome, this method converts the Gray values to ColorBGR values according to the following equation: Blue = Gray, Green = Gray, Red = Gray.

Returns
See Color2DImage for details.

◆ getGrayScaleImage()

GrayScale2DImage getGrayScaleImage ( ) const

Gets image data of the Frame2D with the Gray pixel format. If the 2D camera's color type (according to the return value of Frame2D::colorType) is Frame2DColorType.Monochrome, this method gets the original data. If the color type is Frame2DColorType.Color, this method converts ColorBGR values to Gray values according to the following equation: Gray = 0.299 * Red + 0.587 * Green + 0.114 * Blue.

Returns
See GrayScale2DImage for details.

◆ imageSize()

Size imageSize ( ) const

Gets the image size of Frame2D.

◆ isEmpty()

bool isEmpty ( ) const

Judges whether Frame2D is empty.

◆ operator=()

Frame2D & operator= ( const Frame2D other)
noexcept

Copy assignment.

Friends And Related Symbol Documentation

◆ CameraImpl

friend class CameraImpl
friend

◆ Frame2DAnd3D

friend class Frame2DAnd3D
friend

◆ InternalInterfaces

friend class InternalInterfaces
friend

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