firevision::StereoProcessor Class Reference

Stereo processor interface. More...

#include <stereo/stereo_processor.h>

Inheritance diagram for firevision::StereoProcessor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~StereoProcessor ()
 Virtual empty destructor.
virtual bool get_xyz (unsigned int px, unsigned int py, float *x, float *y, float *z)=0
 Get coordinates for pixel in camera coordinate system.
virtual bool get_world_xyz (unsigned int px, unsigned int py, float *x, float *y, float *z)=0
 Get coordinates for pixel in robot coordinate system.
virtual void preprocess_stereo ()=0
 Do any pre-processing needed.
virtual void calculate_disparity (ROI *roi=0)=0
 Caculate disparity images.
virtual void calculate_yuv (bool both=false)=0
 Caculate yuv images.
virtual unsigned char * disparity_buffer ()=0
 Get the disparity image buffer.
virtual size_t disparity_buffer_size () const =0
 Get disparity buffer size.
virtual unsigned char * yuv_buffer ()=0
 Get YUV-formatted buffer of reference camera.
virtual unsigned char * auxiliary_yuv_buffer ()=0
 Get YUV-formatted buffer of auxiliary camera.

Detailed Description

Stereo processor interface.

This interface provides access to different stereo processing implementations.

Author:
Tim Niemueller

Definition at line 36 of file stereo_processor.h.


Constructor & Destructor Documentation

firevision::StereoProcessor::~StereoProcessor (  )  [virtual]

Virtual empty destructor.

Definition at line 113 of file stereo_processor.cpp.


Member Function Documentation

unsigned char * firevision::StereoProcessor::auxiliary_yuv_buffer (  )  [pure virtual]

Get YUV-formatted buffer of auxiliary camera.

This will return the YUV buffer of the auxiliary image. This is only available after calling calculate_yuv().

Returns:
YUV buffer of the auxiliary image

Implemented in firevision::TriclopsStereoProcessor.

void firevision::StereoProcessor::calculate_disparity ( ROI roi = 0  )  [pure virtual]

Caculate disparity images.

Depending on the data the specific stereo processor needs the disparity image is calculated. If a region of interest (ROI) is supplied then only this region is processed.

Parameters:
roi region of interest to process

Implemented in firevision::TriclopsStereoProcessor.

void firevision::StereoProcessor::calculate_yuv ( bool  both = false  )  [pure virtual]

Caculate yuv images.

This will calculate YUV images of the cameras. By default only the reference image is converted to YUV, as this is sufficient in most cases. If you need both images specify so as argument. A call to this method is valid only after calling calculate_disparity() as this may rely on data produced there.

Parameters:
both if true, both YUV images are calculated for the left and right camera, if false only the YUV image of the reference camera is calculated (dependant on camera)

Implemented in firevision::TriclopsStereoProcessor.

unsigned char * firevision::StereoProcessor::disparity_buffer (  )  [pure virtual]

Get the disparity image buffer.

This returns a buffer containing the disparity image. The buffer is not copied so do not change anything in the buffer or subsequent calls to get_xyz() and get_world_xyz() will return invalid results.

Returns:
disparity buffer

Implemented in firevision::TriclopsStereoProcessor.

size_t firevision::StereoProcessor::disparity_buffer_size (  )  const [pure virtual]

Get disparity buffer size.

Returns:
size in bytes of the disparity image buffer

Implemented in firevision::TriclopsStereoProcessor.

void firevision::StereoProcessor::get_world_xyz ( unsigned int  px,
unsigned int  py,
float *  x,
float *  y,
float *  z 
) [pure virtual]

Get coordinates for pixel in robot coordinate system.

This retrieves coordinates in the coordinate system of the robot holding the stereo camera. The robot coordinate system is a right-handed cardanic coordinate system with the X axis pointing forward, the Y axis pointing right and the Z axis pointing downwards. Retrieving new positions may fail if no valid disparity information could be calculated for the given point. This is indicated with the return value.

Parameters:
px x position of pixel in image
py y position of pixel in image
x upon successful return contains the x coordinate of the point in the robot coordinate sytem
y upon successful return contains the y coordinate of the point in the robot coordinate sytem
z upon successful return contains the z coordinate of the point in the robot coordinate sytem
Returns:
true, if valid information could be retrieved and was written to (x,y,z), false otherwise

Implemented in firevision::TriclopsStereoProcessor.

void firevision::StereoProcessor::get_xyz ( unsigned int  px,
unsigned int  py,
float *  x,
float *  y,
float *  z 
) [pure virtual]

Get coordinates for pixel in camera coordinate system.

This retrieves coordinates in the coordinate system of the stereo camera. Retrieving new positions may fail if no valid disparity information could be calculated for the given point. This is indicated with the return value.

Parameters:
px x position of pixel in image
py y position of pixel in image
x upon successful return contains the x coordinate of the point in the camera coordinate sytem
y upon successful return contains the y coordinate of the point in the camera coordinate sytem
z upon successful return contains the z coordinate of the point in the camera coordinate sytem
Returns:
true, if valid information could be retrieved and was written to (x,y,z), false otherwise

Implemented in firevision::TriclopsStereoProcessor.

void firevision::StereoProcessor::preprocess_stereo (  )  [pure virtual]

Do any pre-processing needed.

Do all the preprocessing needed to calculate the disparity or the YUV images. This has been split out to be able to do only one thing.

Implemented in firevision::TriclopsStereoProcessor.

unsigned char * firevision::StereoProcessor::yuv_buffer (  )  [pure virtual]

Get YUV-formatted buffer of reference camera.

This will return the YUV buffer of the reference image. This is only available after calling calculate_yuv().

Returns:
YUV buffer of the reference image

Implemented in firevision::TriclopsStereoProcessor.


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1