#include <ForegroundDetector.h>
Public Member Functions | |
void | setParameters (const CvFGDStatModelParams &p) |
Sets parameters of the foreground detector. | |
void | getParameters (CvFGDStatModelParams &p) const |
Gets the currently used parameters by the foreground detector. | |
SimpleManeuveringFilter & | getPositionFilter () |
Gets the SimpleManeuveringFilter object used to filter the x,y position. | |
SimpleManeuveringFilter & | getSizeFilter () |
Gets the SimpleManeuveringFilter object used to filter the size (width, height). | |
SimpleManeuveringFilter & | getAngleFilter () |
Gets the SimpleManeuveringFilter object used to filter the angle. | |
void | resetFilters () |
Resets all three SimpleManeuveringFilter objects to their default parameters. | |
void | run (IplImage *frame) |
Runs the detector and processes the image (frame). | |
IplImage * | getImage () const |
Returns the last image we received through the run() function. | |
IplImage * | getForeground () const |
Returns an image representing what the detector feels is the foreground. | |
IplImage * | getBackground () const |
Returns an image representing what the detector feels is the background. | |
void | drawEllipse (IplImage *image) const |
Draws an ellipse representing the position, size and angle of the foreground object (assuming there is only one). | |
CvBox2D | getTrackBox () const |
Returns the actual "tracking" information of the "tracked" object (assuming there is only one). | |
void | forget () |
Makes the detector erase its background model and start anew its training. | |
Static Public Member Functions | |
static CvFGDStatModelParams | getDefaultParameters () |
Gets the default parameters of the foreground detector. |
It segments an assumed foreground object from a mostly static background. If there is only one foreground object detected, its position, size and angle are also computed automatically by moment analysis. Otherwise the information returned is related to the average position, size, and angle of the multiple objects. It also uses SimpleManeuveringFilter objects to smooth out noise from the measured values.
To use this object, set the filters and parameters if desired, then call run() for every image you have. You can then call getForeground(), getBackground(), and getTrackBox() to get images of the foreground and the background, and an idea of where an object is and its size, assuming there is only one.
|
Draws an ellipse representing the position, size and angle of the foreground object (assuming there is only one).
|
|
Makes the detector erase its background model and start anew its training. Takes effect at next run call. |
|
Gets the SimpleManeuveringFilter object used to filter the angle.
|
|
Returns an image representing what the detector feels is the background.
|
|
Gets the default parameters of the foreground detector.
|
|
Returns an image representing what the detector feels is the foreground. The background is represented as pure black.
|
|
Returns the last image we received through the run() function.
|
|
Gets the currently used parameters by the foreground detector.
|
|
Gets the SimpleManeuveringFilter object used to filter the x,y position.
|
|
Gets the SimpleManeuveringFilter object used to filter the size (width, height).
|
|
Returns the actual "tracking" information of the "tracked" object (assuming there is only one). That is, the position, the size, and the angle.
|
|
Runs the detector and processes the image (frame).
|
|
Sets parameters of the foreground detector. For information on these parameters, check cvaux.h to see the fields of the structure and read: Interface of ACM MM2003 algorithm (Liyuan Li, Weimin Huang, Irene Y.H. Gu, and Qi Tian. "Foreground Object Detection from Videos Containing Complex Background. ACM MM2003") http://portal.acm.org/citation.cfm?id=957017
|