RobWorkProject
24.12.4-
|
An implementation of the FrameGrabber interface. The GLFrameGrabber25D grabs images from a OpenGL scene using a simple pinhole camera model. More...
#include <GLFrameGrabber25D.hpp>
Inherits FrameGrabber25D.
Public Types | |
typedef rw::core::Ptr< GLFrameGrabber25D > | Ptr |
Smart pointer type for GLFrameGrabber25D. | |
Public Types inherited from FrameGrabber25D | |
typedef rw::core::Ptr< FrameGrabber25D > | Ptr |
Smart pointer type for FrameGrabber25D. | |
Public Member Functions | |
GLFrameGrabber25D (int width, int height, double fov, double mindepth=0.1, double maxdepth=10.0) | |
constructor More... | |
virtual | ~GLFrameGrabber25D () |
destructor | |
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... | |
void | setMaxDepth (double depth) |
set the maximum depth that is percieved by this frame grabber. If min and max depth are too far apart the resolution of the depth perception will become bad. Hence keep the range realistic. More... | |
void | setMinDepth (double depth) |
set the minimum depth that is percieved by this frame grabber. If min and max depth are too far apart the resolution of the depth perception will become bad. Hence keep the range realistic. More... | |
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... | |
double | getMaxDepth () |
maximum depth that this framegrabber can handle More... | |
double | getMinDepth () |
minimum depth that this framegrabber can handle More... | |
virtual double | getFieldOfViewY () |
Returns the field of view measured around the y-axis. More... | |
Public Member Functions inherited from FrameGrabber25D | |
FrameGrabber25D (size_t width, size_t height) | |
constructor More... | |
virtual | ~FrameGrabber25D () |
destructor | |
size_t | getWidth () const |
returns the width of the image More... | |
size_t | getHeight () const |
returns the height of the image More... | |
void | resize (size_t width, size_t height) |
resizes the image that this frameGrabber use. The colorcode will default to the one that FrameGrabber25D was initialized with. More... | |
virtual rw::geometry::PointCloud & | getImage () |
returns the image More... | |
Additional Inherited Members | |
Protected Attributes inherited from FrameGrabber25D | |
rw::geometry::PointCloud * | _img |
The image. | |
size_t | _width |
Width of the image. | |
size_t | _height |
Height of the image. | |
An implementation of the FrameGrabber interface. The GLFrameGrabber25D 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
GLFrameGrabber25D | ( | int | width, |
int | height, | ||
double | fov, | ||
double | mindepth = 0.1 , |
||
double | maxdepth = 10.0 |
||
) |
constructor
width | [in] width of image |
height | [in] height of image |
fov | [in] the vertical field of view angle in degree |
mindepth | [in] the minimum depth of camera. |
maxdepth | [in] the maximum depth of camera. |
|
virtual |
Returns the field of view measured around the y-axis.
Implements FrameGrabber25D.
|
inlinevirtual |
maximum depth that this framegrabber can handle
Implements FrameGrabber25D.
|
inlinevirtual |
minimum depth that this framegrabber can handle
Implements FrameGrabber25D.
|
virtual |
this function grabs a image from the specialized source and copies it to the FrameGrabber image.
Implements FrameGrabber25D.
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 |
void setMaxDepth | ( | double | depth | ) |
set the maximum depth that is percieved by this frame grabber. If min and max depth are too far apart the resolution of the depth perception will become bad. Hence keep the range realistic.
depth | [in] max depth |
void setMinDepth | ( | double | depth | ) |
set the minimum depth that is percieved by this frame grabber. If min and max depth are too far apart the resolution of the depth perception will become bad. Hence keep the range realistic.
depth | [in] min depth |