RobWorkProject  23.9.11-
Public Types | Public Member Functions | Protected Attributes | List of all members
FrameGrabber Class Referenceabstract

The FrameGrabber abstract interface, can be used to grab images from a specialized source. More...

#include <FrameGrabber.hpp>

Inherited by GLFrameGrabber.

Public Types

typedef rw::core::Ptr< FrameGrabberPtr
 Smart pointer type for FrameGrabber.
 

Public Member Functions

 FrameGrabber (int width, int height, rw::sensor::Image::ColorCode encoding)
 constructor More...
 
virtual ~FrameGrabber ()
 destructor
 
int getWidth ()
 returns the width of the image More...
 
int getHeight ()
 returns the height of the image More...
 
virtual void resize (int width, int height)
 resizes the image that this frameGrabber use. The colorcode will default to the one that FrameGrabber was initialized with. More...
 
virtual void resize (int width, int height, rw::sensor::Image::ColorCode colorCode)
 resizes the image that this frameGrabber use. More...
 
virtual rw::sensor::ImagegetImage ()
 returns the image More...
 
virtual void grab (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::kinematics::State &state)=0
 this function grabs a image from the specialized source and copies it to the FrameGrabber image.
 

Protected Attributes

rw::sensor::Image_img
 The image.
 
rw::sensor::Image::ColorCode _colorCode
 Colorcode of the image.
 

Detailed Description

The FrameGrabber abstract interface, can be used to grab images from a specialized source.

Constructor & Destructor Documentation

◆ FrameGrabber()

FrameGrabber ( int  width,
int  height,
rw::sensor::Image::ColorCode  encoding 
)
inline

constructor

Parameters
width[in] width of the image that this FrameGrabber uses.
height[in] height of the image that this FrameGrabber uses.
encoding[in] color encoding of the image that this FrameGrabber uses.

Member Function Documentation

◆ getHeight()

int getHeight ( )
inline

returns the height of the image

Returns
the height of the image

◆ getImage()

virtual rw::sensor::Image& getImage ( )
virtual

returns the image

Returns
the image

◆ getWidth()

int getWidth ( )
inline

returns the width of the image

Returns
the width of the image

◆ resize() [1/2]

virtual void resize ( int  width,
int  height 
)
virtual

resizes the image that this frameGrabber use. The colorcode will default to the one that FrameGrabber was initialized with.

Parameters
width[in] width of image
height[in] height of image

Reimplemented in GLFrameGrabber.

◆ resize() [2/2]

virtual void resize ( int  width,
int  height,
rw::sensor::Image::ColorCode  colorCode 
)
inlinevirtual

resizes the image that this frameGrabber use.

Parameters
width[in] width of image.
height[in] height of image.
colorCode[in] Color encoding of the image.

Reimplemented in GLFrameGrabber.


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