Toolbox

Image clustering

RasterRemote sensing
Performs automatic clustering of an image (e.g. satellite image) into a specified number of classes. K-Means algorithm is used.
Demo
Sign in to upload file
Image in GDAL-compatible format (preferably GeoTIFF). It can contain any number of bands, all of which will be used for cluster calculation.
Number of clusters into which the original image will be divided.
k-means++
Method of K-Means initialization. Select one value from the list.
Maximum number of iterations of the k-means algorithm for a single run. Leave empty to use default value (300).
Lloyd's
K-means algorithm to use. Select one value from the list.

Docs

Performs automatic clustering of an image (e.g. satellite image) into a specified number of classes. K-Means algorithm is used

Input:

  • Image in GDAL-compatible format (preferably GeoTIFF). It can contain any number of bands, all of which will be used for cluster calculation.

Parameters that can be set up:

  • Number of clusters into which the original image will be divided.

  • Method of K-Means initialization. Select ‘k-means++’ or ‘random’. ‘k-means++’ selects initial cluster centroids so as to make them furhter apart. This technique speeds up convergence.

  • Maximum number of iterations of the k-means algorithm for a single run. Leave empty to use default value (300).

The necessary number of iterations depends on many factors including centroid characteristics and number of clusters. Usually between several dozens and several hundreds iterations are enough.

  • K-means algorithm to use. Select ‘lloyd’ or ‘elkan’.

Lloyd’s algorithm is the classical EM-style algorithm. The “elkan” variation can be more efficient on some datasets with well-defined clusters, by using the triangle inequality. However it’s more memory intensive.

Output:

  • Clustered image.

Watch the video on youtube.

Try the tool in action

  1. Click on the Demo button above the tool form. The fields are filled in with demo values.

  2. Click on the Run button.

RasterRemote sensing