FeatureExtractor.Clustering.Windsurf
Class WindsurfKMeansClustering

java.lang.Object
  extended by FeatureExtractor.Clustering.GenericClustering
      extended by FeatureExtractor.Clustering.KMeans.KMeansClustering
          extended by FeatureExtractor.Clustering.Windsurf.WindsurfKMeansClustering

public class WindsurfKMeansClustering
extends KMeansClustering

Class for the k-means clustering of Windsurf images.


Field Summary
 
Fields inherited from class FeatureExtractor.Clustering.GenericClustering
d
 
Constructor Summary
WindsurfKMeansClustering(ClusteringDistance d, int n)
          Basic constructor.
 
Method Summary
static ClusteringFeatures[][] getSubMatrix(ClusteringFeatures[][] matrix, boolean width, boolean height)
          Extracts a submatrix from a bi-dimensional ClusteringFeatures array.
protected  java.util.Vector<Pixel> selectPixels(GenericFilterOutput image)
          method to extract the pixels to be clustered from the output of the filter.
 
Methods inherited from class FeatureExtractor.Clustering.KMeans.KMeansClustering
cluster, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindsurfKMeansClustering

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

Parameters:
d - The clustering distance to be used to compare pixels.
n - The number of requested clusters.
Method Detail

selectPixels

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

Specified by:
selectPixels in class KMeansClustering
Parameters:
image - Filtered image to which the clustering algorithm should be applied.
Returns:
Vector of pixels to which the clustering algorithm will be applied.

getSubMatrix

public static ClusteringFeatures[][] getSubMatrix(ClusteringFeatures[][] matrix,
                                                  boolean width,
                                                  boolean height)
Extracts a submatrix from a bi-dimensional ClusteringFeatures array.

Parameters:
matrix - The bi-dimensional array where the submatrix is extracted from.
width - Selects either the left (true) or the right (false) part of the matrix.
height - Selects either the lower (true) or the upper (false) part of the matrix.
Returns:
The extracted submatrix.