This CameraSensor implements a direct conversion from pixels to sensors. More...
#include <camerasensors.h>
Inherits lpzrobots::CameraSensor.
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 |
sensor * | data |
This CameraSensor implements a direct conversion from pixels to sensors.
Probably you want to use an image processor like LineImgProc before.
DirectCameraSensor | ( | int | minValue = -256 , |
|
int | maxValue = 256 | |||
) | [inline] |
the camera image should be black and white (e.g.
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] |
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.
int maxValue [protected] |
int minValue [protected] |
int num [protected] |