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

lti::lkmColorQuantization Class Reference

Color quantization functor based on the local k-Means algorithm of O. More...

#include <ltiLkmColorQuantization.h>

Inheritance diagram for lti::lkmColorQuantization:
Inheritance graph
[legend]
Collaboration diagram for lti::lkmColorQuantization:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class lkmColorQuantization More...

Public Member Functions

 lkmColorQuantization ()
 lkmColorQuantization (const lkmColorQuantization &other)
virtual ~lkmColorQuantization ()
virtual const char * getTypeName () const
bool apply (const image &src, channel8 &dest, lti::palette &lkmCPalette) const
bool apply (image &srcdest) const
bool apply (const image &src, image &dest) const
lkmColorQuantizationcopy (const lkmColorQuantization &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

Color quantization functor based on the local k-Means algorithm of O.

Verevka and J. W. Buchanan (see original paper here).

The modifications are basically in the use of a LUT for the computation of the L2 norm, which makes the algorithm as efficient as using the originally proposed L(1/2) norm and the consideration of a direct neighbourhood to avoid some problems with simple quantization problems.


Constructor & Destructor Documentation

lti::lkmColorQuantization::lkmColorQuantization (  ) 

default constructor

lti::lkmColorQuantization::lkmColorQuantization ( const lkmColorQuantization other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::lkmColorQuantization::~lkmColorQuantization (  )  [virtual]

destructor


Member Function Documentation

bool lti::lkmColorQuantization::apply ( const image src,
image dest 
) const [virtual]

operates on the given parameter.

Parameters:
src image with the source data.
dest image with only the number of colors specified in the parameters
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::colorQuantization.

bool lti::lkmColorQuantization::apply ( image srcdest  )  const [virtual]

operates on the given parameter.

Parameters:
srcdest image with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::colorQuantization.

bool lti::lkmColorQuantization::apply ( const image src,
channel8 dest,
lti::palette lkmCPalette 
) const [virtual]

operates on a copy of the given parameters.

Parameters:
src image with the source data.
dest image where the result will be left.
lkmCPalette the color palette with the quantized colors
Returns:
true if apply successful or false otherwise.

Implements lti::colorQuantization.

virtual functor* lti::lkmColorQuantization::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::colorQuantization.

lkmColorQuantization& lti::lkmColorQuantization::copy ( const lkmColorQuantization other  ) 

copy data of "other" functor.

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

Reimplemented from lti::colorQuantization.

const parameters& lti::lkmColorQuantization::getParameters (  )  const

returns used parameters

Reimplemented from lti::colorQuantization.

virtual const char* lti::lkmColorQuantization::getTypeName (  )  const [virtual]

returns the name of this type ("lkmColorQuantization")

Reimplemented from lti::colorQuantization.


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

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