FeatureExtractor.Clustering.Windsurf
Class WindsurfKMeansClustering
java.lang.Object
FeatureExtractor.Clustering.GenericClustering
FeatureExtractor.Clustering.KMeans.KMeansClustering
FeatureExtractor.Clustering.Windsurf.WindsurfKMeansClustering
public class WindsurfKMeansClustering
- extends KMeansClustering
Class for the k-means clustering of Windsurf images.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
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.