Fawkes API
Fawkes Development Version
|
Stereo processor interface. More...
#include <>>
Public Member Functions | |
virtual | ~StereoProcessor () |
Virtual empty destructor. More... | |
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. More... | |
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. More... | |
virtual void | preprocess_stereo ()=0 |
Do any pre-processing needed. More... | |
virtual void | calculate_disparity (ROI *roi=0)=0 |
Caculate disparity images. More... | |
virtual void | calculate_yuv (bool both=false)=0 |
Caculate yuv images. More... | |
virtual unsigned char * | disparity_buffer ()=0 |
Get the disparity image buffer. More... | |
virtual size_t | disparity_buffer_size () const =0 |
Get disparity buffer size. More... | |
virtual unsigned char * | yuv_buffer_right ()=0 |
Get YUV-formatted buffer of reference camera. More... | |
virtual unsigned char * | yuv_buffer_left ()=0 |
Get YUV-formatted buffer of left camera. More... | |
Stereo processor interface.
This interface provides access to different stereo processing implementations.
Definition at line 36 of file stereo_processor.h.
|
virtual |
Virtual empty destructor.
Definition at line 113 of file stereo_processor.cpp.
|
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.
roi | region of interest to process |
Implemented in firevision::TriclopsStereoProcessor.
|
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.
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.
|
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.
Implemented in firevision::TriclopsStereoProcessor.
|
pure virtual |
Get disparity buffer size.
Implemented in firevision::TriclopsStereoProcessor.
|
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.
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 |
Implemented in firevision::TriclopsStereoProcessor.
|
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.
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 |
Implemented in firevision::TriclopsStereoProcessor.
|
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.
|
pure virtual |
Get YUV-formatted buffer of left camera.
This will return the YUV buffer of the auxiliary image. This is only available after calling calculate_yuv().
Implemented in firevision::TriclopsStereoProcessor.
|
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().
Implemented in firevision::TriclopsStereoProcessor.