MotionCameraSensor Class Reference

This CameraSensor calculates the global optical flow of the camera image using the center of gravity method. More...

#include <camerasensors.h>

Inherits lpzrobots::PositionCameraSensor.

Collaboration diagram for MotionCameraSensor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MotionCameraSensor (int avg=2, Values values=None, Dimensions dims=X, double factor=5.0, bool window=true, double clipsize=1.5)
 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

Protected Attributes

double factor
double lambda
bool window
double clipsize
bool last
 whether last image had a valid position
double lastX
double lastY

Detailed Description

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.


Constructor & Destructor Documentation

MotionCameraSensor ( int  avg = 2,
Values  values = None,
Dimensions  dims = X,
double  factor = 5.0,
bool  window = true,
double  clipsize = 1.5 
) [inline]

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

See also:
BWImageProcessor or ColorFilterImgProc)
CameraSensor for further parameter explanation.
Parameters:
dims dimensions to return the position (X means horizonal, Y vertical)
values additional sensor values,
See also:
PositionCameraSensor::Values
Parameters:
factor factor for measured velocity (velocity is in framesize/frame
avg averaging time window (1: no averaging)
window whether to apply a windowing function to avoid edge effects
clipsize value at which the values are clipped, e.g. [-1.5,1.5]
virtual ~MotionCameraSensor (  )  [inline, virtual]

Member Function Documentation

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


Member Data Documentation

double clipsize [protected]
double factor [protected]
double lambda [protected]
bool last [protected]

whether last image had a valid position

double lastX [protected]
double lastY [protected]
bool window [protected]

The documentation for this class was generated from the following file:
Generated on Fri Nov 4 10:59:41 2011 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3