This CameraSensor calculates the global optical flow of the camera image using the center of gravity method. More...
#include <camerasensors.h>
Inherits lpzrobots::PositionCameraSensor.
Public Member Functions | |
MotionCameraSensor (const MotionCameraSensorConf &mconf=getDefaultConf()) | |
The camera image should be black and white (e.g. | |
virtual | ~MotionCameraSensor () |
virtual bool | sense (const GlobalData &globaldata) |
Performs the calculations. | |
double | windowfunc (double x) |
window function for the interval -1 to 1, with ramps from 0.5 off center | |
Static Public Member Functions | |
static MotionCameraSensorConf | getDefaultConf () |
Protected Attributes | |
MotionCameraSensorConf | mconf |
double | lambda |
bool | last |
whether last image had a valid position | |
double | lastX |
double | lastY |
This CameraSensor calculates the global optical flow of the camera image using the center of gravity method.
It requires objects to be bright on black ground. The velocity is by default windowed to avoid step-like artefacts at the border. Probably you want to use an image processor like ColorFilterImgProc before.
MotionCameraSensor | ( | const MotionCameraSensorConf & | mconf = getDefaultConf() |
) | [inline] |
The camera image should be black and white (e.g.
mconf | configuration object |
virtual ~MotionCameraSensor | ( | ) | [inline, virtual] |
static MotionCameraSensorConf getDefaultConf | ( | ) | [inline, static] |
Reimplemented from PositionCameraSensor.
virtual bool sense | ( | const GlobalData & | globaldata | ) | [inline, virtual] |
Performs the calculations.
Reimplemented from PositionCameraSensor.
double windowfunc | ( | double | x | ) | [inline] |
window function for the interval -1 to 1, with ramps from 0.5 off center
double lambda [protected] |
bool last [protected] |
whether last image had a valid position
double lastX [protected] |
double lastY [protected] |
MotionCameraSensorConf mconf [protected] |