lobot::InputSource Class Reference

Input sources wrapper for Lobot/Robolocust project. More...

#include <Robots/LoBot/io/LoInputSource.H>

Collaboration diagram for lobot::InputSource:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 InputSource (ImageSource< PixelType > *)
 InputSource (LaserRangeFinder *)
bool using_video () const
 Returns true if the input source is configured to use video.
bool using_laser () const
 Returns true if the input source is configured to use laser.
Dims get_image_size () const
GrayImage get_grayscale_image () const
range< int > lrf_angular_range () const
int get_distance (int angle) const
 ~InputSource ()
 Clean-up.

float average_distance (int min, int max) const
float average_distance (const range< int > &R) const

Detailed Description

Input sources wrapper for Lobot/Robolocust project.

This class wraps around lobot::ImageSource and lobot::LaserRangeFinder so that its clients need only worry about interfacing with this one class instead of having to mess around with the APIs of many different classes.

Definition at line 78 of file LoInputSource.H.


Constructor & Destructor Documentation

lobot::InputSource::InputSource ( ImageSource< PixelType > *  is  ) 

This constructor sets up an input source to read from an image source (either FireWire cameras or MPEG files). Usually, if there are multiple cameras or MPEGs involved, the image source will be set up to combine these multiple input images into a single image.

Definition at line 57 of file LoInputSource.C.

lobot::InputSource::InputSource ( LaserRangeFinder lrf  ) 

This constructor sets up the laser range finder as the input source.

Definition at line 63 of file LoInputSource.C.

lobot::InputSource::~InputSource (  ) 

Clean-up.

Definition at line 109 of file LoInputSource.C.


Member Function Documentation

float lobot::InputSource::average_distance ( int  min,
int  max 
) const

Return the average distance in an angular range. Throw an exception if the input source is not the laser range finder.

Definition at line 100 of file LoInputSource.C.

References lobot::LaserRangeFinder::average_distance().

int lobot::InputSource::get_distance ( int  angle  )  const

Return the distance reading corresponding to the supplied angle. Throw an exception if the input source is not the laser range finder.

Definition at line 93 of file LoInputSource.C.

References lobot::LaserRangeFinder::get_distance().

GrayImage lobot::InputSource::get_grayscale_image (  )  const

Return the grayscale version of the input image. Throws an exception if the input source is not a video stream.

Definition at line 77 of file LoInputSource.C.

Dims lobot::InputSource::get_image_size (  )  const

Return the size of the input image if the input really is a video source; throw an exception otherwise.

Definition at line 70 of file LoInputSource.C.

range< int > lobot::InputSource::lrf_angular_range (  )  const

Return the angular range of the laser range finder. Throw an exception if the input source is not the laser range finder.

Definition at line 86 of file LoInputSource.C.

References lobot::LaserRangeFinder::get_angular_range().

bool lobot::InputSource::using_laser (  )  const [inline]

Returns true if the input source is configured to use laser.

Definition at line 103 of file LoInputSource.H.

bool lobot::InputSource::using_video (  )  const [inline]

Returns true if the input source is configured to use video.

Definition at line 100 of file LoInputSource.H.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:30:35 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3