last update 20 Sep 2009 |
#include <cvrKMColorQuantization.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
virtual const std::string & | name () const |
virtual parameters * | clone () const |
virtual parameters * | newInstance () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Public Attributes | |
int | maximalNumberOfIterations |
float | thresholdDeltaPalette |
cvr::kMColorQuantization::kMColorQuantization::parameters::parameters | ( | ) |
cvr::kMColorQuantization::kMColorQuantization::parameters::parameters | ( | const parameters & | other | ) |
copy constructor
other | the parameters object to be copied |
Reimplemented from cvr::colorQuantization::colorQuantization::parameters.
cvr::kMColorQuantization::kMColorQuantization::parameters::~parameters | ( | ) | [virtual] |
virtual parameters* cvr::kMColorQuantization::kMColorQuantization::parameters::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of the parameters.
Reimplemented from cvr::colorQuantization::colorQuantization::parameters.
parameters& cvr::kMColorQuantization::kMColorQuantization::parameters::copy | ( | const parameters & | other | ) |
Copy the other instance.here.
Reimplemented from cvr::colorQuantization::colorQuantization::parameters.
virtual const std::string& cvr::kMColorQuantization::kMColorQuantization::parameters::name | ( | ) | const [virtual] |
Returns the name of this type.
Reimplemented from cvr::colorQuantization::colorQuantization::parameters.
virtual parameters* cvr::kMColorQuantization::kMColorQuantization::parameters::newInstance | ( | ) | const [virtual] |
Returns a pointer to a new instance of the parameters.
Reimplemented from cvr::colorQuantization::colorQuantization::parameters.
parameters& cvr::kMColorQuantization::kMColorQuantization::parameters::operator= | ( | const parameters & | other | ) |
Copy the contents of a parameters object.
other | the parameters object to be copied |
Reimplemented from cvr::colorQuantization::colorQuantization::parameters.
virtual bool cvr::kMColorQuantization::kMColorQuantization::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 cvr::colorQuantization::colorQuantization::parameters.
virtual bool cvr::kMColorQuantization::kMColorQuantization::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 cvr::colorQuantization::colorQuantization::parameters.
int cvr::kMColorQuantization::kMColorQuantization::parameters::maximalNumberOfIterations |
Maximal number of iterations taken for the k-Means algorithm to converge.
Default value: 50
float cvr::kMColorQuantization::kMColorQuantization::parameters::thresholdDeltaPalette |
Smallest change of palette.
If the difference between the palette in the previous iteration and the palette in the current iteration is smaller than this value then it will be assumed that the algorithm has converged.
The difference is computed as the sum of the distances between corresponding entries of the palette, taken in the RGB color space, with an L2 distance, i.e. sum(distanceSqr(palNew-palOld)).
Note that the axes of the RGB space are dimensioned from 0 to 255.
Default value: 0.2