latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class csPresegmentation More...
#include <ltiCsPresegmentation.h>
Public Types | |
enum | eFilterType { Nothing = 0, Median = 1, KNearest = 2 } |
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Public Attributes | |
int | smoothingKernelSize |
kMColorQuantization::parameters | quantParameters |
bool | useAlwaysNewPalette |
int | borderSize |
int | borderParts |
bool | forceBorderToBackground |
bool | labelObjects |
float | backgroundTolerance |
eFilterType | filterType |
Static Public Attributes | |
static const int | All |
static const int | Top |
static const int | Bottom |
static const int | Left |
static const int | Right |
the parameters for the class csPresegmentation
lti::csPresegmentation::parameters::parameters | ( | ) |
default constructor
Reimplemented from lti::segmentation::parameters.
lti::csPresegmentation::parameters::parameters | ( | const parameters & | other | ) |
copy constructor
other | the parameters object to be copied |
Reimplemented from lti::segmentation::parameters.
lti::csPresegmentation::parameters::~parameters | ( | ) | [virtual] |
destructor
Reimplemented from lti::segmentation::parameters.
virtual functor::parameters* lti::csPresegmentation::parameters::clone | ( | ) | const [virtual] |
returns a pointer to a clone of the parameters
Reimplemented from lti::segmentation::parameters.
parameters& lti::csPresegmentation::parameters::copy | ( | const parameters & | other | ) |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from lti::segmentation::parameters.
const char* lti::csPresegmentation::parameters::getTypeName | ( | ) | const [virtual] |
returns name of this type
Reimplemented from lti::segmentation::parameters.
parameters& lti::csPresegmentation::parameters::operator= | ( | const parameters & | other | ) |
copy the contents of a parameters object
other | the parameters object to be copied |
virtual bool lti::csPresegmentation::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::segmentation::parameters.
virtual bool lti::csPresegmentation::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::segmentation::parameters.
const int lti::csPresegmentation::parameters::All [static] |
constant to define all border elements
Tolerance for background colors.
Mean and Variance values will be computed for each RGB-component of all palette entries that are candidates to be background (at the beginning all entries in the palette are background candidates). Let t be this tolerance value. All entries in the palette, which are candidates to be background must satisfy for each color component c in RGB: in order to remain as background candidates.
Default value: 9;
Decides which parts of the border should be considered for the statistics.
You can use combinations of constants Top, Bottom, Left and Right or All to produce the wished results.
Default value: lti::csPresegmentation::parameters::All
Examples:
lti::csPresegmentation::parameters param; // to consider all but the bottom of the image: param.borderParts = lti::csPresegmentation::parameters::All & ~lti::csPresegmentation::parameters::Bottom; // to consider only the left and right borders param.borderParts = lti::csPresegmentation::parameters::Left | lti::csPresegmentation::parameters::Right;
Bottom and Top parts have the whole width of the image. Left and Right parts have a height equal to the height of the image minus twice the borderSize:
const int lti::csPresegmentation::parameters::Bottom [static] |
constant to define the bottom border element
Smoothing filter to be used.
Default: Median
If true, all color entries found withing the given border will be assumed to be background, undependently of their values.
If false, only the most representative colors in the border will be assumed to be background.
Default value: false;
If true, the value in the segmentation mask for each objekt will correspond to the detected color palette entry in the color quantization.
If false, the value in the mask for the non-background pixels will be 255
Default value: false;
const int lti::csPresegmentation::parameters::Left [static] |
constant to define the left border element
Parameters for the k-means color quantization.
Default values: quantParameters.numberOfColors=12 quantParameters.thresholdDeltaPalette = 0.5f quantParameters.maximalNumberOfIterations = 50
const int lti::csPresegmentation::parameters::Right [static] |
constant to define the right border element
const int lti::csPresegmentation::parameters::Top [static] |
constant to define the top border element
If false, the quantization algorithms uses the last palette as preinitialization, to speed up the segmentation of several images showing the same object from different perspectives.
If true, the last quantization will be always ignored.
Default value: false