DirectCameraSensor Class Reference

This CameraSensor implements a direct conversion from pixels to sensors. More...

#include <camerasensors.h>

Inherits lpzrobots::CameraSensor.

Collaboration diagram for DirectCameraSensor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DirectCameraSensor (int minValue=-256, int maxValue=256)
 the camera image should be black and white (e.g.
virtual ~DirectCameraSensor ()
virtual void intern_init ()
 overload this function to initialized you data structures.
virtual bool sense (const GlobalData &globaldata)
 Performs the calculations.
virtual int getSensorNumber () const
 overload this function and return the number of sensor values
virtual int get (sensor *sensors, int length) const
 overload this function and return the sensor values

Protected Attributes

int num
int minValue
int maxValue
sensordata

Detailed Description

This CameraSensor implements a direct conversion from pixels to sensors.

Probably you want to use an image processor like LineImgProc before.


Constructor & Destructor Documentation

DirectCameraSensor ( int  minValue = -256,
int  maxValue = 256 
) [inline]

the camera image should be black and white (e.g.

See also:
BWImageProcessor)
CameraSensor for further parameter explanation.
Parameters:
minValue pixel value that corresponds to -1
maxValue pixel value that corresponds to 1 (for minValue =-256 and maxValue=256 the sensor values are in [0,1)
virtual ~DirectCameraSensor (  )  [inline, virtual]

Member Function Documentation

virtual int get ( sensor sensors,
int  length 
) const [inline, virtual]

overload this function and return the sensor values

Implements CameraSensor.

virtual int getSensorNumber (  )  const [inline, virtual]

overload this function and return the number of sensor values

Implements CameraSensor.

virtual void intern_init (  )  [inline, virtual]

overload this function to initialized you data structures.

Use camera->getImage() to get the image from the camera

Implements CameraSensor.

virtual bool sense ( const GlobalData globaldata  )  [inline, virtual]

Performs the calculations.

Implements CameraSensor.


Member Data Documentation

sensor* data [protected]
int maxValue [protected]
int minValue [protected]
int num [protected]

The documentation for this class was generated from the following file:
Generated on Thu Jun 28 14:49:02 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3