Skip to content

Classification

Classification turns a multiband image into a map of classes: water, forest, bare soil, built up. It is the most common analysis performed on satellite imagery, and it comes in two forms.

Unsupervised classification finds groups in the data on its own. You tell it how many groups you want, it partitions the image, and you decide afterwards what each group represents. No preparation needed, and a good first look at any scene.

Supervised classification learns from examples you provide. You draw training polygons over places you know, the algorithm learns their spectral signature and applies it to the whole image. More work, far better results.

For any supervised method you need a training layer: polygons carrying a class label, drawn over areas you are confident about.

Three practical rules. Cover the variability of each class, so include both bright and shaded forest rather than one perfect stand. Keep the polygons pure, well inside the class rather than straddling its boundary. And keep some areas back to check the result, since a classifier judged on its own training data always looks excellent.

Evaluate Training Sites is the tool to run before classifying. It reports how well your classes separate in each band, and tells you straight away when two of them overlap so much that no algorithm will tell them apart.

The unsupervised standard, and the fastest way to see what is in a scene. It partitions the pixels into K spectral clusters by minimising the variation inside each.

You choose K. Too few and distinct surfaces merge, too many and you spend your time merging clusters by hand. Between 8 and 15 is a reasonable range for a first pass on a mixed landscape, and you group them into meaningful classes afterwards.

Modified K Means Clustering adds automatic selection of K and spectral preprocessing, which is worth trying when you have no idea how many classes to expect.

The best default among the supervised methods. It grows many decision trees on random subsets of the training data and takes their majority vote.

It handles classes that are not spectrally simple, copes with the extra bands you may have added, such as texture or indices, and rarely needs tuning. When people report a good land cover map from satellite imagery today, it usually came from a random forest.

Support vector machines separate classes by finding the optimal boundary between them. Excellent with few training samples, which is exactly the situation when field data is scarce. More sensitive to its settings than a random forest.

Min Dist Classification and Parallelepiped Classification

Section titled “Min Dist Classification and Parallelepiped Classification”

The two classical methods, simple and transparent. Minimum distance assigns each pixel to the class whose mean spectrum is closest. Parallelepiped assigns it to the class whose value ranges contain it, and leaves ambiguous pixels unclassified.

Fast, easy to explain, and still perfectly serviceable when the classes are well separated.

Not a classifier but a threshold finder. Given a single band, it computes the value that best separates it into two groups. The standard way of turning an index into a mask: water from a water index, vegetation from an NDVI, burnt area from a burn ratio.

A pixel based classification always comes out speckled with isolated pixels. Two tools fix that.

Generalize Classified Raster removes small isolated patches by iterative mode filtering. Generalize With Similarity merges each small patch into the neighbouring patch it most resembles spectrally, which respects the imagery better.

Tool What it does
K Means Clustering Unsupervised partition into K spectral clusters.
Modified K Means Clustering K means with spectral preprocessing and adaptive selection of K.
Random Forest Classification Supervised ensemble of decision trees. The strong default.
Svm Classification Supervised support vector machine. Good with few training samples.
Knn Classification Supervised classification by majority vote among the k nearest training samples.
Fuzzy Knn Classification The same with class membership confidence rather than a hard label.
Min Dist Classification Assigns each pixel to the class with the nearest mean spectrum.
Parallelepiped Classification Assigns each pixel to the class whose value ranges contain it.
Nnd Classification Nearest normalised distance classification, with optional outlier rejection.
Otsu Thresholding Finds the optimal threshold splitting a band into two groups.
Random Forest Regression Predicts a continuous variable rather than a class, by random forest.
Svm Regression The same by support vector machine.
Knn Regression The same by k nearest neighbours.
Logistic Regression Supervised logistic regression on multiband input.
Evaluate Training Sites Reports class separability per band, as an HTML report.
Generalize Classified Raster Removes small isolated patches by iterative mode filtering.
Generalize With Similarity Merges small patches into the most spectrally similar neighbour.

Add more than spectra. Classifiers work far better when fed derived bands alongside the raw ones: a vegetation index, a texture measure from Filters, even slope and aspect from the Terrain toolbox.

Regression is classification’s cousin. The four regression tools predict a continuous quantity, such as biomass or a percentage of cover, from the same training approach. Same preparation, same caveats.

High resolution imagery. If your objects are much larger than your pixels, an object based approach will beat any pixel classifier. See OBIA.