LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::csPresegmentation::parameters Class Reference

the parameters for the class csPresegmentation More...

#include <ltiCsPresegmentation.h>

Inheritance diagram for lti::csPresegmentation::parameters:
Inheritance graph
[legend]
Collaboration diagram for lti::csPresegmentation::parameters:
Collaboration graph
[legend]

List of all members.

Public Types

enum  eFilterType { Nothing = 0, Median = 1, KNearest = 2 }

Public Member Functions

 parameters ()
 parameters (const parameters &other)
 ~parameters ()
const char * getTypeName () const
parameterscopy (const parameters &other)
parametersoperator= (const parameters &other)
virtual functor::parametersclone () 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

Detailed Description

the parameters for the class csPresegmentation


Member Enumeration Documentation

type to specify the smoothing filter to be used

Enumerator:
Nothing 

No smoothing filter should be used.

Median 

Median Filter.

KNearest 

K-Nearest-Neighbour Filter.


Constructor & Destructor Documentation

lti::csPresegmentation::parameters::parameters (  ) 

default constructor

Reimplemented from lti::segmentation::parameters.

lti::csPresegmentation::parameters::parameters ( const parameters other  ) 

copy constructor

Parameters:
other the parameters object to be copied

Reimplemented from lti::segmentation::parameters.

lti::csPresegmentation::parameters::~parameters (  )  [virtual]

destructor

Reimplemented from lti::segmentation::parameters.


Member Function Documentation

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

Parameters:
other the parameters object to be copied
Returns:
a reference to this parameters object

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

Parameters:
other the parameters object to be copied
Returns:
a reference to this parameters object
virtual bool lti::csPresegmentation::parameters::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

read the parameters from the given ioHandler

Parameters:
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.
Returns:
true if write was successful

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

Parameters:
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.
Returns:
true if write was successful

Reimplemented from lti::segmentation::parameters.


Member Data Documentation

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: $(c-mean)^2 \le t \cdot variance$ 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:

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:

 _____________________
 |        Top        |
 |___________________|
 | L|             |R |
 | e|             |i |
 | f|             |g |
 | t|             |h |
 |  |             |t |
 |__|_____________|__|
 |      Bottom       |
 |___________________|

Maximal size of the border of the image to be considered to contain almost background pixels.

The real border will have the smallest number between this parameter and one half of the rows or columns of the image being used.

Default value: 16

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;

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

constant to define the right border element

Size of the median filter kernel or k-Nearest-Neighbor filter used to smooth the quantization mask.

Default value: 5

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


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:11 2010 for LTI-Lib by Doxygen 1.6.1