Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

StereoCamera Class Reference

Stereo camera sensor. More...

#include <StereoCamera.hh>

Inheritance diagram for StereoCamera:

Sensor List of all members.

Public Member Functions

 StereoCamera (World *world)
 Constructor.
virtual ~StereoCamera ()
 Destructor.
int Init (int width, int height, double hfov, double baseline, double nearClip, double farClip, const char *method)
 Initialize the sensor.
int Fini ()
 Finalize the sensor.
void Update ()
 Update the sensor information.
void SetPose (GzPose pose)
 Set the pose of the camera (global cs).
GzPose GetPose ()
 Get the camera pose (global cs).
double GetFOV () const
 Get the camera FOV (horizontal).
void GetSize (int *w, int *h)
 Get the image/disparity dimensions.
void EnableImage (int camera, bool enable)
 Enable image rendering.
void EnableDisparity (int camera, bool enable)
 Enable disparity rendering.
const unsigned char * GetImageData (int camera) const
 Get a pointer to the image data.
const float * GetDisparityData (int camera) const
 Get a pointer to the disparity data.
void SetSavePath (const char *pathname)
 Set the path for saved frames.
void EnableSaveFrame (bool enable)
 Enable or disable saving.

Detailed Description

Stereo camera sensor.

Generates images and disparity images for a pair of cameras. The disparity images a masked to simulated occlusion and camera field of view. The simulated cameras have parallel axis geometry, although this could easily be extended.


Constructor & Destructor Documentation

StereoCamera::StereoCamera World world  ) 
 

Constructor.

StereoCamera::~StereoCamera  )  [virtual]
 

Destructor.


Member Function Documentation

int StereoCamera::Init int  width,
int  height,
double  hfov,
double  baseline,
double  nearClip,
double  farClip,
const char *  method
 

Initialize the sensor.

Parameters:
width,height image width and height (pixels)
hfov horizontal field of view (radians)
baseline camera separation (m)
nearClip,farClip near and far disparity clipping planes (m); nearClip must be greater than zero; farClip must be greater than nearClip.
method Prefered rendering method: SGIX, GLX or XLIB.
Returns:
Zero on success.

int StereoCamera::Fini  ) 
 

Finalize the sensor.

void StereoCamera::Update  ) 
 

Update the sensor information.

void StereoCamera::SetPose GzPose  pose  ) 
 

Set the pose of the camera (global cs).

GzPose StereoCamera::GetPose  ) 
 

Get the camera pose (global cs).

double StereoCamera::GetFOV  )  const [inline]
 

Get the camera FOV (horizontal).

void StereoCamera::GetSize int *  w,
int *  h
 

Get the image/disparity dimensions.

void StereoCamera::EnableImage int  camera,
bool  enable
 

Enable image rendering.

Parameters:
camera Selected camera: 0 for left camera, 1 for right camera.
enable Enable flag: 1 to enable rendering.

void StereoCamera::EnableDisparity int  camera,
bool  enable
 

Enable disparity rendering.

Parameters:
camera Selected camera: 0 for left camera, 1 for right camera.
enable Enable flag: 1 to enable rendering.

const unsigned char* StereoCamera::GetImageData int  camera  )  const [inline]
 

Get a pointer to the image data.

Parameters:
camera Selected camera: 0 for left camera, 1 for right camera

const float* StereoCamera::GetDisparityData int  camera  )  const [inline]
 

Get a pointer to the disparity data.

Parameters:
camera 0 for left camera, 1 for right camera

void StereoCamera::SetSavePath const char *  pathname  ) 
 

Set the path for saved frames.

void StereoCamera::EnableSaveFrame bool  enable  ) 
 

Enable or disable saving.


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


Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:08 2005 for Gazebo by doxygen 1.4.2