TLIB documentationThe tlBackground class makes it possible to define a background image of any format, and optionally have it learn the statistical (gaussian) distribution of each pixel by providing it with additionnal images over time.
Public Member Functions | |
| tlBackground () | |
| tlBackground (float Vmin, float Vmax, float alpha, float K, float Koffset) | |
| virtual | ~tlBackground () |
| int | setParam (float Vmin, float Vmax, float alpha, float K, float Koffset) |
| int | init (tlImage *image, int adapt=0, int learn=0) |
| int | update (tlImage *image) |
| int | update (tlImage *image, tlRect *rect) |
| int | get (tlImage *dest) |
| int | getVariance (tlImage *dest) |
| int | filter (tlImage *image) |
| int | filter (tlImage *image, tlRect *rect) |
| tlBackground::tlBackground | ( | ) |
| tlBackground::tlBackground | ( | float | Vmin, | |
| float | Vmax, | |||
| float | alpha, | |||
| float | K, | |||
| float | Koffset | |||
| ) |
| tlBackground::~tlBackground | ( | ) | [virtual] |
| int tlBackground::setParam | ( | float | Vmin, | |
| float | Vmax, | |||
| float | alpha, | |||
| float | K, | |||
| float | Koffset | |||
| ) |
Set the image learning parameters. See background learning parameters for details.
| int tlBackground::init | ( | tlImage * | image, | |
| int | learn = 0, |
|||
| int | adapt = 0 | |||
| ) |
Init or reset background computing
| image | initial image | |
| learn | 0 for static background definition, 1 for dynamic background learning | |
| adapt | 0 if the background is static, 1 for adaptive background |
| int tlBackground::update | ( | tlImage * | image | ) |
Learn from a new image (next learning iteration).
| image | new disparity image |
Learn part of the image from a new image (next learning iteration).
| image | new disparity image | |
| rect | the area of the image to consider |
| int tlBackground::get | ( | tlImage * | dest | ) |
Get an image of the current learned background.
| dest | [out] valid image pointer that will contain the background mask. |
| int tlBackground::getVariance | ( | tlImage * | dest | ) |
Get an image of the current variance distribution.
| dest | [out] valid image pointer that will contain the variance image. |
| int tlBackground::filter | ( | tlImage * | image | ) |
Filter the background out of a given image.
| image | the image to filter. |
Filter the background out of a portion of a given image.
| image | the image to filter. | |
| rect | the portion of the image to filter. |