Home Page Project Page Download Mailing List Forums Request Features Report Bugs

IJ Plugins: Clustering





Clustering and Thresholding

Plugins for segmentation of images through thresholding and pixel-based clustering. A pixel based clustering is a generalization of thresholding that can be used for both gray level and multi-band images (for instance, color images). Plugin install in ImageJ under: Plugins/Segmentation. Brief online help installs under: Help/About Plugins.

Available plugins:

k-means Clustering - works with RGB color images, gray level images, and multi-slice gray level images (each slice is interpreted as a separate band)
Maximum Entropy Threshold - bi-level thresholding of gray level images.
Maximum Multi Entropy Threshold - multi-level thresholding of gray level images.

k-means Clustering

k-means Clustering performs pixel-based segmentation of multi-band images. An image stack is interpreted as a set of bands corresponding to the same image. For instance, an RGB color images has three bands: red, green, and blue. Each pixels is represented by an n-valued vector , where n is a number of bands, for instance, a 3-value vector [r,g,b] in case of a color image.

Each cluster is defined by its centroid in n-dimensional space. Pixels are grouped by their proximity to cluster's centroids. Cluster centroids are determined using a heuristics: initially centroids are randomly initialized and then their location is interactively optimized. For more information on this and other clustering approaches see:

Anil K. Jain and Richard C. Dubes, Algorithms for Clustering Data, Prentice Hall, 1988. (PDF version available).

Clustering Segmentation Examples

4-class k-means segmentation of a color image:

Original.Clusters encoded by gray level.Clusters encoded by centroid color.

3-class k-means segmentation of a color image

Original.Clusters encoded by gray level.Clusters encoded by centroid color.

Possible Extensions of the Current Implementation

  • Processing only within ROI

  • Anisotropic distance measures, for instance, Mahalonobis

  • Extension to fuzzy k-means

  • Cluster validity indexes

  • Automatic selection of the number of clusters

Maximum Entropy Thresholding

Automatic thresholding technique based on the maximum entropy of the histogram. For more information see:

P.K. Sahoo, S. Soltani, K.C. Wong and, Y.C. Chen, "A Survey of Thresholding Techniques", Computer Vision, Graphics, and Image Processing, Vol. 41, pp.233-260, 1988.

Maximum Entropy Multi Thresholding

Automatic thresholding technique based on an extension of the maximum entropy of the histogram to multiple levels (rather than only two).

System Requirements

Image I/O plugin bundle requires ImageJ 1.31s and Java 1.4 or later. It may work with 1.3. It was tested with ImageJ 1.32a and Java 1.4 and 1.5, on Linux and Windows.

Installation

  1. Clustering and Thresholding plugins are distributed as part of ij-plugins Toolkit.

  2. Download latest binaries for ij-plugins Toolkit following the download link; look for ij-plugins_toolkit_bin_*.zip with highest release number.

  3. Uncompress content of ij-plugins_toolkit_bin_*.zip to ImageJ plugins directory. You can find location of ImageJ plugins directory by selecting "Plugins"/"Utilities"/"ImageJ Properties", look for value of tag "plugins dir" near the bottom of the displayed Properties' window.

  4. Earlier versions of Clustering and Thresholding plugins were contained in ij_clustering.jar, if you see that file in ImageJ plugins directory remove it to avoid conflicts with plugins contained in ij-plugins_toolkit.jar.

  5. Restart ImageJ to load newly installed plugins.






SourceForge Logo