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

lti::kMeansSegmentation Class Reference

A segmentation algorithm which is based on a color-quantization algorithm followed by a smoothing filter. More...

#include <ltiKMeansSegmentation.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class kMeansSegmentation More...

Public Member Functions

 kMeansSegmentation ()
 kMeansSegmentation (const parameters &par)
 kMeansSegmentation (const int numCols)
 kMeansSegmentation (const kMeansSegmentation &other)
virtual ~kMeansSegmentation ()
virtual const char * getTypeName () const
bool apply (const image &src, matrix< int > &dest) const
bool apply (const image &src, channel8 &dest) const
bool apply (const image &src, matrix< int > &dest, palette &pal) const
bool apply (const image &src, channel8 &dest, palette &pal) const
kMeansSegmentationcopy (const kMeansSegmentation &other)
kMeansSegmentationoperator= (const kMeansSegmentation &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

A segmentation algorithm which is based on a color-quantization algorithm followed by a smoothing filter.

The quantization of the colors is done with the k-Means algorithm, which creates an optimal color-palette, to which all original image colors are mapped to. The smoothing filter (None, Median, K-Nearest, ...) can be choosen with the parameters objects.


Constructor & Destructor Documentation

lti::kMeansSegmentation::kMeansSegmentation (  ) 

default constructor

lti::kMeansSegmentation::kMeansSegmentation ( const parameters par  ) 

default constructor with parameters object

lti::kMeansSegmentation::kMeansSegmentation ( const int  numCols  ) 

construct a segmentation functor with the given numbers of colors in the quantization stage.

lti::kMeansSegmentation::kMeansSegmentation ( const kMeansSegmentation other  ) 

copy constructor

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

destructor


Member Function Documentation

bool lti::kMeansSegmentation::apply ( const image src,
channel8 dest,
palette pal 
) const

operates on the given parameter.

Parameters:
src image with the source data.
dest resulting labeled mask
pal the color palette found by the k-Means algorithm
Returns:
true if apply successful or false otherwise.
bool lti::kMeansSegmentation::apply ( const image src,
matrix< int > &  dest,
palette pal 
) const

operates on the given parameter.

Parameters:
src image with the source data.
dest resulting labeled mask
pal the color palette found by the k-Means algorithm
Returns:
true if apply successful or false otherwise.
bool lti::kMeansSegmentation::apply ( const image src,
channel8 dest 
) const

operates on the given parameter.

Parameters:
src image with the source data.
dest resulting labeled mask
Returns:
true if apply successful or false otherwise.
bool lti::kMeansSegmentation::apply ( const image src,
matrix< int > &  dest 
) const

operates on the given parameter.

Parameters:
src image with the source data.
dest resulting labeled mask
Returns:
true if apply successful or false otherwise.
virtual functor* lti::kMeansSegmentation::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::segmentation.

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

copy data of "other" functor.

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

Reimplemented from lti::segmentation.

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

returns used parameters

Reimplemented from lti::functor.

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

returns the name of this type ("kMeansSegmentation")

Reimplemented from lti::segmentation.

kMeansSegmentation& lti::kMeansSegmentation::operator= ( const kMeansSegmentation other  ) 

alias for copy member

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

Reimplemented from lti::functor.


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

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