|
latest version v1.9 - last update 24 Nov 2005 |
|
#include <ltiBackgroundModel.h>
Inheritance diagram for lti::backgroundModel:


Public Member Functions | |
| backgroundModel () | |
| backgroundModel (const backgroundModel &other) | |
| virtual | ~backgroundModel () |
| virtual const char * | getTypeName () const |
| bool | apply (const image &src, channel &dest) |
| bool | apply (const image &src, channel8 &dest) |
| bool | addBackground (const image &src) |
| bool | adaptBackground (const image &src, const channel8 &mask) |
| bool | getModel (image &model) |
| bool | clearMoldel () |
| backgroundModel & | copy (const backgroundModel &other) |
| backgroundModel & | operator= (const backgroundModel &other) |
| virtual functor * | clone () const |
| const parameters & | getParameters () const |
| virtual bool | updateParameters () |
| virtual bool | write (ioHandler &handler, const bool complete=true) const |
| virtual bool | read (ioHandler &handler, const bool complete=true) |
Protected Attributes | |
| std::vector< std::vector< serialVectorStats< float > > > | bgStat |
Classes | |
| class | parameters |
| the parameters for the class backgroundModel More... | |
780-785. This functor can separate things in front of a background. The background model is generate of same images displaying only the background. With this model you can than separate objects witch belong not to the background. The model is a statistic representation of every pixel in the scene. And the foreground objects are alle colored faces witch do not fit to the statistic model. The rule wether a pixel fit ore not is the malanowis distance, a distance between a vector(r,g,b) to the mean vector. Furthermore you can adapt the model with the images displaying back and foreground. The claas adapt, if you want, all pixels with the malanowis smaler as a threshold. The normal way of operation is: addd with the 'addBackgrund' function same images, with only background, to the model, than use the apply function with an image with fore and background and you get in the channel8 the malanowis of each pixel to the background. You can set the outputTreshold parameter for displying only foreground objects (try 500). If you set the flag binaryOutput you get the background black an the foreground white.
|
|
default constructor
|
|
|
copy constructor
|
|
|
destructor
|
|
||||||||||||
|
With this fuction you can adapt the model by hand. You can define a mask with the values 0 and not 0. The image and the mask must have the same size. The model is adept with the image at every point where the mask is equal to zero. |
|
|
Adds a image to the backgroud model. You must call this function serveral times with images displaing the same scene with no foreground objects. The functor creates the initial backgroundmodel based on thus images. It is absolutly reqired that all the images disply the same scene. |
|
||||||||||||
|
Implements first the apply with channel and cast than the result into a channel8.
|
|
||||||||||||
|
The function calculates the malanowis distance of each pixel in the image to the same pixel in the model. The outpout channel is filled with the rules in the parameters. If adaptModel is set true the backgroundmoldel is updated with the background of the image 'src'. Every pixel with a distance smaler than 'adaptaionThreshold' is background of the image.
|
|
|
This function emptys the model saved in the class. After calling this funktion you have to add backgroundimages before you can call the apply function |
|
|
returns a pointer to a clone of this functor.
Reimplemented from lti::segmentation. |
|
|
copy data of "other" functor.
|
|
|
This function returns an image of the background model. The image consist of the mean color values of each pixel. |
|
|
returns used parameters
Reimplemented from lti::functor. |
|
|
returns the name of this type ("backgroundModel")
Reimplemented from lti::segmentation. |
|
|
alias for copy member
|
|
||||||||||||
|
read the parameters from the given ioHandler. The default implementation is to read just the parameters object.
Reimplemented from lti::functor. |
|
|
Update functor's parameters. Initialize internal data according to the parameters Reimplemented from lti::functor. |
|
||||||||||||
|
write the functor in the given ioHandler. The default implementation is to write just the parameters object.
Reimplemented from lti::functor. |
|
|
For each point of the image a statistic functor. This functor creates the variance and the mean value of alle pixels in the images added to the model. |