vslam_evaluation::SequenceReader Class Reference

#include <SequenceReader.h>

List of all members.


Detailed Description

Loads povray stereo image sequence.

SequenceReader is constructed with the path to a experiment.xml file. Experiment contains the name of the sequence to use and additional parameters.

The sequence description is read from $FOOTAGE_PATH/sequence_name/sequence.xml

The sequence contains the camera calibration parameters, the initial camera pose and a sequence of timestamped images.

Public Member Functions

 SequenceReader (const std::string &fn_experiment)
 Create SequenceReader for experiment described in the experiment xml file named fn_experiment.
 ~SequenceReader ()
bool next ()
 Go to next timestamp and load the camera image(s).
double getTimestamp () const
 Get the current timestamp.
unsigned char * getImage () const
 Get the current image.
CameraType getCameraType () const
 Get the camera type.
int getResX () const
 Get the image width.
int getResY () const
 Get the image height.
double getFocalLength () const
 Get the focal length of the camera.
double getPrincipalPointX () const
 Get the X coordinate of the principal point.
double getPrincipalPointY () const
 Get the Y coordinate of the principal point.
double getShutterSpeed () const
 Get shutter speed of the camera in seconds.
double getFrameRate () const
 Get frame rate of the camera in frames per second.
double getStereoBaseline () const
 Get stereo baseline in meters.
double getPrincipalPointXLeft () const
 Get the X coordinate of the principal point for the left eye of the stereo camera.
CameraPose getInitialCameraPose () const
 Get the initial camera pose.
bool existsParameter (const std::string &parameterKey) const
 Check whether an experiment parameter ``parameterKey'' exists.
std::string getParameterValue (const std::string &parameterKey) const
 Get the value of an experiment parameter ``parameterKey''.
std::string getSetupFilename () const

Classes

struct  CameraPose
 6Dof camera pose. More...


Constructor & Destructor Documentation

vslam_evaluation::SequenceReader::SequenceReader ( const std::string &  fn_experiment  ) 

Create SequenceReader for experiment described in the experiment xml file named fn_experiment.

vslam_evaluation::SequenceReader::~SequenceReader (  ) 


Member Function Documentation

bool vslam_evaluation::SequenceReader::next (  ) 

Go to next timestamp and load the camera image(s).

The camera image is blurred and noise is added if the experiment xml file contains the appropriate parameters. The image is blurred if the blur_sigma parameter is present. Blur mask size can be set by the blur_mask_width parameter. Noise is added if pixel_noise_sigma is present. The random number generator can be seeded by giving the pixel_noise_seed parameter to get repeatable noise values.

double vslam_evaluation::SequenceReader::getTimestamp (  )  const

Get the current timestamp.

You should have called next () before using this function.

unsigned char * vslam_evaluation::SequenceReader::getImage (  )  const

Get the current image.

Image format is 8bit RGB. You should have called next () before using this function.

For stereo cameras, the image buffer contains images for both eyes are side by side. That is, the with of the image in the buffer is 2*getResX ().

Returns:
pointer to image buffer. The contents of the buffer will be overwritten when next() is called.

CameraType vslam_evaluation::SequenceReader::getCameraType (  )  const

Get the camera type.

Returns:
CAMERA_TYPE_MONO or CAMERA_TYPE_STEREO.

int vslam_evaluation::SequenceReader::getResX (  )  const

Get the image width.

int vslam_evaluation::SequenceReader::getResY (  )  const

Get the image height.

double vslam_evaluation::SequenceReader::getFocalLength (  )  const

Get the focal length of the camera.

The focal length is measured in units of pixel width. (In the rendered images pixels are always quadratic. So pixel width = pixel height).

Returns:
focal length in pixels.

double vslam_evaluation::SequenceReader::getPrincipalPointX (  )  const

Get the X coordinate of the principal point.

Returns:
principal point x in pixels.

double vslam_evaluation::SequenceReader::getPrincipalPointY (  )  const

Get the Y coordinate of the principal point.

Returns:
principal point y in pixels.

double vslam_evaluation::SequenceReader::getShutterSpeed (  )  const

Get shutter speed of the camera in seconds.

double vslam_evaluation::SequenceReader::getFrameRate (  )  const

Get frame rate of the camera in frames per second.

double vslam_evaluation::SequenceReader::getStereoBaseline (  )  const

Get stereo baseline in meters.

(stereo sequences only)

double vslam_evaluation::SequenceReader::getPrincipalPointXLeft (  )  const

Get the X coordinate of the principal point for the left eye of the stereo camera.

(stereo sequences only)

SequenceReader::CameraPose vslam_evaluation::SequenceReader::getInitialCameraPose (  )  const

Get the initial camera pose.

bool vslam_evaluation::SequenceReader::existsParameter ( const std::string &  parameterKey  )  const

Check whether an experiment parameter ``parameterKey'' exists.

(The experiment xml description may contain arbitrary additional parameters as key-value pairs.)

std::string vslam_evaluation::SequenceReader::getParameterValue ( const std::string &  parameterKey  )  const

Get the value of an experiment parameter ``parameterKey''.

(The experiment xml description may contain arbitrary additional parameters as key-value pairs.)

Returns:
the value of the parameter, or an empty string if the parameter does not exist.

std::string vslam_evaluation::SequenceReader::getSetupFilename (  )  const

Returns:
path to the setup.xml file of the current experiment.

Referenced by vslam_evaluation::LogWriter::copySetupFile().


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

Generated on Mon Jan 11 13:11:57 2010 for VSLAM API by  doxygen 1.5.6