last update 20 Sep 2009 |
#include <cvrColorQuantization.h>
Classes | |
class | parameters |
The parameters for the class colorQuantization. More... | |
Public Member Functions | |
colorQuantization () | |
colorQuantization (const colorQuantization &other) | |
virtual | ~colorQuantization () |
virtual const std::string & | name () const |
colorQuantization & | copy (const colorQuantization &other) |
virtual colorQuantization * | clone () const =0 |
virtual colorQuantization * | newInstance () const =0 |
const parameters & | getParameters () const |
virtual bool | apply (const image &src, matrix< ubyte > &dest, palette &thePalette) const =0 |
virtual bool | apply (const image &src, matrix< int32 > &dest, palette &thePalette) const =0 |
virtual bool | apply (image &srcdest) const |
virtual bool | apply (const image &src, image &dest) const |
All color quantization functors must overload the apply-methods defined here (see colorQuantization::apply())
The final quantized color image can be generated using the cvr::usePalette functor.
cvr::colorQuantization::colorQuantization | ( | ) |
Default constructor.
cvr::colorQuantization::colorQuantization | ( | const colorQuantization & | other | ) |
virtual cvr::colorQuantization::~colorQuantization | ( | ) | [virtual] |
Destructor.
Quantize the colors of the given src image and leave the result in dest.
src | image with the source data. | |
dest | image with only the number of colors specified in the parameters |
Reimplemented in cvr::kMColorQuantization.
virtual bool cvr::colorQuantization::apply | ( | image & | srcdest | ) | const [virtual] |
Quantize the colors of the given image.
srcdest | image with the source data. The result will be left here too. |
Reimplemented in cvr::kMColorQuantization.
virtual bool cvr::colorQuantization::apply | ( | const image & | src, | |
matrix< int32 > & | dest, | |||
palette & | thePalette | |||
) | const [pure virtual] |
Quantize the colors of src and leave the labels for the quantized colors in dest, and in the palette entries corresponding to the labels the mean colors for each label.
src | original image with the true-color data | |
dest | channel8 where the indexes of the also calculated palette will be. | |
thePalette | the color palette used by the channel. |
virtual bool cvr::colorQuantization::apply | ( | const image & | src, | |
matrix< ubyte > & | dest, | |||
palette & | thePalette | |||
) | const [pure virtual] |
Quantize the colors of src and leave the labels for the quantized colors in dest, and in the palette entries corresponding to the labels the mean colors for each label.
src | original image with the true-color data | |
dest | channel8 where the indexes of the also calculated palette will be. | |
thePalette | the color palette used by the channel. |
Implemented in cvr::kMColorQuantization.
virtual colorQuantization* cvr::colorQuantization::clone | ( | ) | const [pure virtual] |
Returns a pointer to a clone of this functor.
Implements cvr::functor.
Implemented in cvr::kMColorQuantization.
colorQuantization& cvr::colorQuantization::copy | ( | const colorQuantization & | other | ) |
const parameters& cvr::colorQuantization::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from cvr::parametersManager.
Reimplemented in cvr::kMColorQuantization.
virtual const std::string& cvr::colorQuantization::name | ( | ) | const [virtual] |
virtual colorQuantization* cvr::colorQuantization::newInstance | ( | ) | const [pure virtual] |
Returns a pointer to a clone of this functor.
Implements cvr::functor.
Implemented in cvr::kMColorQuantization.