Namespaces | Functions

mln::clustering Namespace Reference

Namespaces

namespace  impl
namespace  internal

Functions

template<typename T , unsigned n, typename I >
mln::trait::ch_value< I,
value::label_8 >::ret 
kmean_rgb (const Image< I > &point, const unsigned k_center, const unsigned watch_dog, const unsigned n_times)
 Implements the functional kmean algorithm.

Function Documentation

template<typename T , unsigned n, typename I >
mln::trait::ch_value< I, value::label_8 >::ret mln::clustering::kmean_rgb ( const Image< I > &  point,
const unsigned  k_center,
const unsigned  watch_dog,
const unsigned  n_times 
) [inline]

Implements the functional kmean algorithm.

This functional version of the kmean is very specific. All the code is view as a one-block function. This code is provided as is. I (YJ) don't know where i stopped this version. It may not work. Debugging tools are not yet provided. This code is just the functional transcription of the kmean3d version. The code has the very experimental status.

T is the type used for computations (float or double). n is the quantification for the rgb image.

Parameters:
[in] point : the image as the population of pixels.
[in] k_center : the number of centers.
[in] watch_dog : the limit to observe the convergence (10).
[in] n_times : the number of times that we executed kmean(10).
Returns:
an image which represents the pixel classification.

Definition at line 1018 of file kmean_rgb.hh.

References mln::trace::entering(), and mln::trace::exiting().