FeatureExtractor.Clustering.KMeans
Class KMeansClustering

java.lang.Object
  extended by FeatureExtractor.Clustering.GenericClustering
      extended by FeatureExtractor.Clustering.KMeans.KMeansClustering
Direct Known Subclasses:
WindsurfKMeansClustering

public abstract class KMeansClustering
extends GenericClustering

Class for the k-means clustering of images.


Field Summary
 
Fields inherited from class FeatureExtractor.Clustering.GenericClustering
d
 
Constructor Summary
KMeansClustering(ClusteringDistance d, int n)
          Basic constructor.
 
Method Summary
 ClusteringOutput cluster(GenericFilterOutput image)
          Applies the k-means clustering algorithm to a given filtered image.
protected abstract  java.util.Vector<Pixel> selectPixels(GenericFilterOutput image)
          Abstract method to extract the pixels to be clustered from the output of the filter.
 java.lang.String toString()
          Returns a string representation of the k-means clustering algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KMeansClustering

public KMeansClustering(ClusteringDistance d,
                        int n)
Basic constructor.

Parameters:
d - Clustering distance to be used to compare pixels.
n - Maximum number of clusters to be generated.
Method Detail

toString

public java.lang.String toString()
Returns a string representation of the k-means clustering algorithm.

Specified by:
toString in class GenericClustering
Returns:
A string representation of the k-means clustering algorithm.

selectPixels

protected abstract java.util.Vector<Pixel> selectPixels(GenericFilterOutput image)
Abstract method to extract the pixels to be clustered from the output of the filter.

Parameters:
image - Filtered image to which the clustering algorithm should be applied.
Returns:
Vector of pixels to which the clustering algorithm will be applied.

cluster

public ClusteringOutput cluster(GenericFilterOutput image)
Applies the k-means clustering algorithm to a given filtered image.

Specified by:
cluster in class GenericClustering
Parameters:
image - Filtered image to which the clustering algorithm should be applied.
Returns:
Generic clustering result.