LTI-Lib latest version v1.9 - last update 24 Nov 2005
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

lti::meanShiftSegmentation::parameters Class Reference

the parameters for the class meanShiftSegmentation More...

#include <ltiMeanShiftSegmentation.h>

Inheritance diagram for lti::meanShiftSegmentation::parameters:

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

Collaboration graph
[legend]
List of all members.

Parameters for the old algorithm

enum  { Quantization = 0, Oversegmentation = 1, Undersegmentation = 2 }
int option
std::vector< rectanglerects
int maxTrial
int trial2converge
double classThreshold [3]
int maxTrialRandomColor
int minRegionSize
float rectRadius [3]
float autoRadius [3]
float minVar

Parameters for the new algorithm

enum  eSpeedUpType { NoSpeedup, MediumSpeedup, HighSpeedup }
bool multivariateNormalKernel
eSpeedUpType speedup
double sigmaS
double sigmaR
double maxNeighbourColorDistance
double thresholdConverged
bool classicAlgorithm

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)

Detailed Description

the parameters for the class meanShiftSegmentation


Member Enumeration Documentation

anonymous enum
 

Constants to specify degree of segmentation.

Enumerator:
Quantization  Constant value to specify the quantization option.
Oversegmentation  constant value to specify the oversegmentation option.
Undersegmentation  constant value to specify the undersegmentation option.

enum lti::meanShiftSegmentation::parameters::eSpeedUpType
 

Three types of speed-up techniques.

Enumerator:
NoSpeedup  Filters the image applying mean shift to each point.

Advantage: most accurate

Disadvantage : time expensive

MediumSpeedup  Filters the image using previous mode information to avoid re-applying mean shift to some data points (is default).

Advantage: maintains high level of accuracy, large speed up compared to non-optimized version

Disadvantage: possibly not as accurate as non-optimized version

HighSpeedup  filters the image using previous mode information and window traversals to avoid re-applying mean shift to some data points

advantage: huge speed up maintains accuracy good enough for segmentation disadvantage: not as accurate as previous filters


Constructor & Destructor Documentation

lti::meanShiftSegmentation::parameters::parameters  ) 
 

default constructor

Reimplemented from lti::segmentation::parameters.

lti::meanShiftSegmentation::parameters::parameters const parameters other  ) 
 

copy constructor

Parameters:
other the parameters object to be copied

lti::meanShiftSegmentation::parameters::~parameters  )  [virtual]
 

destructor

Reimplemented from lti::segmentation::parameters.


Member Function Documentation

virtual functor::parameters* lti::meanShiftSegmentation::parameters::clone  )  const [virtual]
 

returns a pointer to a clone of the parameters

Reimplemented from lti::segmentation::parameters.

parameters& lti::meanShiftSegmentation::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

const char* lti::meanShiftSegmentation::parameters::getTypeName  )  const [virtual]
 

returns name of this type

Reimplemented from lti::segmentation::parameters.

parameters& lti::meanShiftSegmentation::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::meanShiftSegmentation::parameters::read ioHandler handler,
const bool  complete = true
[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.

virtual bool lti::meanShiftSegmentation::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

float lti::meanShiftSegmentation::parameters::autoRadius[3]
 

Multiplication factor for the colorRadius(option).

Use in auto-segmentation mode (see rects).

Increase value if too many colors are found, because of a low variance(image)

Each element of the array corresponds to one of the possible options (see option parameter);

Default value: {2.0, 3.0, 4.0} for Quantization, Over- and Undersegmentation respectively.

bool lti::meanShiftSegmentation::parameters::classicAlgorithm
 

Choose algorithm by this parameter.

  • true: the old algorithm (for compatibility reasons still provided)
  • false: the new implementation, like in EDISON.

The classic algorithm uses the following parameters:

  • option
  • rects
  • maxTrial
  • trial2converge
  • classThreshold
  • maxTrialRandomColor
  • minRegionSize
  • rectRadius
  • autoRadius
  • minVar

The new algorithm considers the following parameters;

  • maxTrial
  • speedup
  • sigmaS
  • sigmaR
  • maxNeighbourColorDistance
  • thresholdConverged

Default value: true (classic algorithm is used)

double lti::meanShiftSegmentation::parameters::classThreshold[3]
 

How many pixel in promille of the image must have a colorClass.

Each element of the array corresponds to one of the possible options (see option parameter)

Default value: {2.5, 5.0, 10.0} for Quantization, Over- and Undersegmentation respectively.

double lti::meanShiftSegmentation::parameters::maxNeighbourColorDistance
 

Regions having a color difference less than this parameter are joined together (by the method fuseRegions()).

It should be smaller than sigmaR.

Default value: 3

int lti::meanShiftSegmentation::parameters::maxTrial
 

Maximal number of trials for choosing a valid representing color.

Default: 10

int lti::meanShiftSegmentation::parameters::maxTrialRandomColor
 

Number of trials to pick up randomly a suitable color in the image(rect).

Default: 25

int lti::meanShiftSegmentation::parameters::minRegionSize
 

Set the minSize (in Pixel) a region must have.

default: 15

float lti::meanShiftSegmentation::parameters::minVar
 

Set the lower limit of a multiplication factor v for the colorRadius.

max( minVar , v )

The factor v = sqrt((var.l+var.u+var.v)/100) depends on the variance of the image in luv.

For images with an homogeneous background and a small object, this value could be increased to get better results (for example with 1.0).

Default value: 0.0 (no influence on factor v)

bool lti::meanShiftSegmentation::parameters::multivariateNormalKernel
 

Three types of speed-up techniques.

int lti::meanShiftSegmentation::parameters::option
 

Option: 0 Quantization 1 Oversegmentation 2 Undersegmentation.

You should use the given constants instead of the magic numbers...

Default: Undersegmentation

float lti::meanShiftSegmentation::parameters::rectRadius[3]
 

Multiplication factor for the colorRadius (variance in image).

Only used in auto-segmentation mode (see rects).

Each element of the array corresponds to one of the possible options (see option parameter);

Default value: {8.0, 6.0, 4.0} for Quantization, Over- and Undersegmentation respectively.

std::vector<rectangle> lti::meanShiftSegmentation::parameters::rects
 

Number of rectangles, in which the segmenter looks for a color.

If the first rectangle is (0,0,0,0) then an auto-segmentation mode is activated and colors are taken from the whole image. Otherwise the colors will be taken from the given image region.

The number of rectangles specifies the maximal possible number of colors for the segmented/quantized image.

If you give only one rectangle with (0,0,0,0) or an empty vector, then 50 elements will be assumed.

Default value: vector with 1 element (0,0,0,0)

double lti::meanShiftSegmentation::parameters::sigmaR
 

The range radius of the mean shift sphere.

(the radius in color space)

Higher values result in less regions

Default value: 5

double lti::meanShiftSegmentation::parameters::sigmaS
 

The spatial radius of the mean shift sphere.

(the radius in grid space)

Higher values cause longer computation times, and smoother region boundaries.

Default value: 5

eSpeedUpType lti::meanShiftSegmentation::parameters::speedup
 

Higher speedup level causes loss of acuracy.

Default: MediumSpeedup

double lti::meanShiftSegmentation::parameters::thresholdConverged
 

If the magnitude of the mean-shift vector is under this threshold, it is considered as converged.

Default value: 0.1

int lti::meanShiftSegmentation::parameters::trial2converge
 

Number of trials for the representing color to converge.

Default: 15 trials


The documentation for this class was generated from the following file:
Generated on Thu Nov 24 16:45:12 2005 for LTI-Lib by Doxygen 1.4.4