RobWorkProject
24.12.4-
|
An implementation of the FrameGrabber interface. The GLFrameGrabber grabs images from a OpenGL scene using a simple pinhole camera model. More...
#include <GLFrameGrabber.hpp>
Inherits FrameGrabber.
Public Types | |
typedef rw::core::Ptr< GLFrameGrabber > | Ptr |
Smart pointer type for GLFrameGrabber. | |
Public Types inherited from FrameGrabber | |
typedef rw::core::Ptr< FrameGrabber > | Ptr |
Smart pointer type for FrameGrabber. | |
Public Member Functions | |
GLFrameGrabber (int width, int height, double fov, double near=0.1, double far=10.0) | |
constructor More... | |
virtual | ~GLFrameGrabber () |
destructor | |
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... | |
void | resize (int width, int height, rw::sensor::Image::ColorCode colorCode) |
resizes the image that this frameGrabber use. More... | |
bool | init (rw::core::Ptr< rw::graphics::SceneViewer > drawer) |
initialize the grabber with a scene viewer. This registers the grabber as a camera in the scene and enables rendering. More... | |
virtual void | grab (rw::core::Ptr< rw::kinematics::Frame > frame, const rw::kinematics::State &state) |
this function grabs a image from the specialized source and copies it to the FrameGrabber image. More... | |
Public Member Functions inherited from FrameGrabber | |
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 rw::sensor::Image & | getImage () |
returns the image More... | |
Additional Inherited Members | |
Protected Attributes inherited from FrameGrabber | |
rw::sensor::Image * | _img |
The image. | |
rw::sensor::Image::ColorCode | _colorCode |
Colorcode of the image. | |
An implementation of the FrameGrabber interface. The GLFrameGrabber grabs images from a OpenGL scene using a simple pinhole camera model.
a framethe opengl rendering to take pictures of the scene.
The most basic parameter of a camera is its Field of view. This can be used as an initial camera model. Field of view can be calculated from the focal length and the size of the CCD typically (1/2, 1/3, 1/4) inch. If a more realistic camera model is required the perspective transform of a specific camera can be added
GLFrameGrabber | ( | int | width, |
int | height, | ||
double | fov, | ||
double | near = 0.1 , |
||
double | far = 10.0 |
||
) |
constructor
width | [in] width of image |
height | [in] height of image |
fov | [in] the vertical field of view angle in degree |
near | [in] the minimum depth of camera. |
far | [in] the maximum depth of camera. |
|
virtual |
this function grabs a image from the specialized source and copies it to the FrameGrabber image.
Implements FrameGrabber.
bool init | ( | rw::core::Ptr< rw::graphics::SceneViewer > | drawer | ) |
initialize the grabber with a scene viewer. This registers the grabber as a camera in the scene and enables rendering.
drawer | [in] the scene viewer |
|
virtual |
resizes the image that this frameGrabber use. The colorcode will default to the one that FrameGrabber was initialized with.
width | [in] width of image |
height | [in] height of image |
Reimplemented from FrameGrabber.
|
virtual |
resizes the image that this frameGrabber use.
width | [in] width of image. |
height | [in] height of image. |
colorCode | [in] Color encoding of the image. |
Reimplemented from FrameGrabber.