latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class meanShiftSegmentation More...
#include <ltiMeanShiftSegmentation.h>
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) |
Parameters for the old algorithm | |
| |
enum | { Quantization = 0, Oversegmentation = 1, Undersegmentation = 2 } |
int | option |
std::vector< rectangle > | rects |
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 |
the parameters for the class meanShiftSegmentation
anonymous enum |
Constants to specify degree of segmentation.
Three types of speed-up techniques.
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 |
lti::meanShiftSegmentation::parameters::parameters | ( | ) |
default constructor
Reimplemented from lti::segmentation::parameters.
lti::meanShiftSegmentation::parameters::parameters | ( | const parameters & | other | ) |
copy constructor
other | the parameters object to be copied |
Reimplemented from lti::segmentation::parameters.
lti::meanShiftSegmentation::parameters::~parameters | ( | ) | [virtual] |
destructor
Reimplemented from lti::segmentation::parameters.
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
other | the parameters object to be copied |
Reimplemented from lti::segmentation::parameters.
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
other | the parameters object to be copied |
virtual bool lti::meanShiftSegmentation::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [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.
virtual bool lti::meanShiftSegmentation::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.
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.
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:
The new algorithm considers the following parameters;
Default value: true (classic algorithm is used)
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
Maximal number of trials for choosing a valid representing color.
Default: 10
Number of trials to pick up randomly a suitable color in the image(rect).
Default: 25
Set the minSize (in Pixel) a region must have.
default: 15
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)
Three types of speed-up techniques.
Option: 0 Quantization 1 Oversegmentation 2 Undersegmentation.
You should use the given constants instead of the magic numbers...
Default: Undersegmentation
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)
The range radius of the mean shift sphere.
(the radius in color space)
Higher values result in less regions
Default value: 5
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
Higher speedup level causes loss of acuracy.
Default: MediumSpeedup
If the magnitude of the mean-shift vector is under this threshold, it is considered as converged.
Default value: 0.1
Number of trials for the representing color to converge.
Default: 15 trials