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


Public Member Functions | |
| csPresegmentation () | |
| csPresegmentation (const csPresegmentation &other) | |
| virtual | ~csPresegmentation () |
| virtual const char * | getTypeName () const |
| bool | apply (const image &src, channel8 &mask) |
| csPresegmentation & | copy (const csPresegmentation &other) |
| csPresegmentation & | operator= (const csPresegmentation &other) |
| virtual functor * | clone () const |
| const parameters & | getParameters () const |
Protected Member Functions | |
| bool | validBackground (const rgbPixel &p, const trgbPixel< float > &mean, const trgbPixel< float > &var, const float &tolerance) const |
Protected Attributes | |
| palette | lastPalette |
Classes | |
| class | parameters |
| the parameters for the class csPresegmentation More... | |
For its task there are some assumtions/requirements:
These conditions are not met in many applications, for which other segmentation approaches have to be found.
The algorithm works as follows:
First, a color quantization using k-Means is done. This produces usually a "noisy" index mask and a palette. A median filter or a k-Nearest-Neighbor Filter smooths this mask. Assuming that the border of the image contains mostly background pixels, some simple statistics are done, to decide which palette entries belong to the background. Pixels belonging to other palette entries are taken as the object pixels.
See the lti::csPresegmentation::parameters for more information.
|
|
default constructor
|
|
|
copy constructor
|
|
|
destructor
|
|
||||||||||||
|
apply the presegmentation algorithm to the given image and return a mask where the background pixels will be mark with the value zero and the non-background pixels with a non-zero value. Note that some information of this segmentation is "stored" in the internal state, which affects the next segmentation steps. (see lti::csPresegmentation::parameters::useAlwaysNewPalette)
|
|
|
returns a pointer to a clone of this functor.
Reimplemented from lti::segmentation. |
|
|
copy data of "other" functor.
|
|
|
returns used parameters
Reimplemented from lti::functor. |
|
|
returns the name of this type ("csPresegmentation")
Reimplemented from lti::segmentation. |
|
|
alias for copy member
|
|
||||||||||||||||||||
|
valid background returns true if the given pixel lies between the mean value and the given variance.
|
|
|
last used palette
|