Pixel-Based Image Classification

Machine Learning
Introduced by
Remote-sensing classification literature
Year
2007
Type
Supervised/unsupervised spectral image classification
Family
Remote sensing

What does it do?

Pixel-based image classification assigns each individual pixel in a satellite or aerial image to a thematic land-cover category, using only its spectral values across the available bands.

Lu and Weng (2007) review image classification methods and techniques for improving classification accuracy, and the considerations they summarize, such as the choice of classifier and the design of the image-processing chain, are relevant to pixel-based work. The approach covers supervised methods, where labeled training samples guide the classifier, and unsupervised clustering, which groups pixels by spectral similarity without prior labels.

The intuition behind the method

Think of each pixel as a tiny paint chip taken from a map. The classifier looks only at that chip's color mix across the spectral bands, such as how much red, near-infrared, or blue light it reflects, and assigns it to the class it judges most probable, for example 'forest', 'water', or 'urban'. The same decision is repeated for every pixel in the image, and neighboring pixels are not consulted.

History

Per-pixel classification is applied to multispectral satellite imagery, which supplies spectral values for every pixel across large areas. Lu and Weng (2007) review image classification methods and techniques for improving classification accuracy, including the effective use of multiple features and the choice of a suitable classifier. Their review describes non-parametric classifiers such as neural networks, decision trees, and knowledge-based classification as increasingly important approaches, particularly for multisource data.

When to use it

Choose pixel-based classification when each pixel covers a reasonably homogeneous area, as with coarse to medium resolution imagery such as Landsat or MODIS, and when the target classes can be separated by their spectral values alone. It is also a reasonable choice when computing resources or processing time are limited. Avoid it for fine-resolution imagery in which one land-cover type varies strongly in spectrum across the scene, because the output becomes speckled (the 'salt-and-pepper' effect); object-based image analysis is the usual alternative there. Avoid it also when classes overlap strongly in spectral space and the spatial arrangement of pixels is the main discriminating information.

Limitations and considerations

  • Because each decision uses only the pixel's own spectral values, spatial context is ignored, which produces noisy 'salt-and-pepper' maps at fine spatial resolution.
  • Supervised results depend heavily on how many training samples are collected, how representative they are, and how widely they are spread across the image.
  • Classes with similar spectra, such as urban rooftops and bare soil, overlap in spectral space and are systematically confused.
  • At coarser resolutions a pixel often mixes several land-cover types, so a single class label misrepresents it.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Each pixel is classified from its own band vector, so the work scales with the number of pixels and can be run independently for each pixel, which suits large image archives.
  • Because no neighborhood features or segmentation step are needed, the method avoids the choice of object scale that object-based approaches require.
  • Accuracy can be summarized directly from a confusion matrix using overall accuracy and kappa, as defined in the accuracy formulas, which makes results comparable across classifiers evaluated on the same reference pixels.
  • The same workflow supports supervised classification with labeled samples and unsupervised clustering when reference labels are unavailable.

Applications

  • Land-use and land-cover mapping from Landsat, Sentinel-2, or MODIS time series.
  • Deforestation and forest degradation monitoring in tropical regions.
  • Agricultural crop-type mapping and growing-season monitoring.
  • Urban impervious surface extraction and urban growth analysis.
  • Wetland and water-body delineation from multispectral imagery.

How it works

How it works

1

Each pixel is represented as a vector of B band values, which is a point in B-dimensional spectral space. Preprocessing such as atmospheric correction and radiometric calibration is applied so that the values reflect surface reflectance rather than sensor or atmospheric effects. Optional dimensionality reduction, such as PCA, may follow.

Formula
\mathbf{x}_i = [x_{i1}, x_{i2}, \ldots, x_{iB}]^\top \in \mathbb{R}^B
2

For supervised classifiers, the training formula describes fitting a model to labeled samples by minimizing a regularized loss. Supervised classifiers such as maximum likelihood, support vector machines, decision trees, or neural networks then define class models or decision boundaries in spectral space. Unsupervised methods such as k-means and ISODATA use no labels and instead partition spectral space into clusters by spectral similarity, so the labeled loss above does not describe them; an analyst must then interpret the resulting clusters.

Formula
\hat{f} = \arg\min_{f \in \mathcal{F}} \sum_{i=1}^{n} L(y_i, f(\mathbf{x}_i)) + \lambda \Omega(f)
3

Every pixel, including those not used in training, is passed through the fitted classifier. For probabilistic classifiers such as maximum likelihood, the pixel is assigned the class with the highest posterior probability, as the assignment formula specifies. Distance-based classifiers instead assign the nearest class in feature space; they do not follow the posterior rule, so the formula applies only to probabilistic classifiers. The output is a thematic map in which each pixel carries one class code.

Formula
\hat{y}_i = \arg\max_{c \in C} P(C = c \mid \mathbf{x}_i)
4

The thematic map is evaluated against an independent reference dataset using a confusion matrix. Overall accuracy (OA) is the fraction of correctly classified pixels. The kappa coefficient corrects that agreement for the agreement expected by chance, as the formulas show.

Formula
OA = \frac{\sum_{k=1}^{K} n_{kk}}{N}, \quad \kappa = \frac{N \sum_{k} n_{kk} - \sum_{k} n_{k+} n_{+k}}{N^2 - \sum_{k} n_{k+} n_{+k}}

Common pitfalls

  • Using training samples collected under different seasonal or illumination conditions than the image to be classified introduces spectral mismatch and elevated errors.
  • Skipping atmospheric correction when comparing multi-date images causes apparent class changes that reflect sensor artifacts rather than real land-cover change.
  • Over-relying on overall accuracy while ignoring per-class producer and user accuracies can mask severe misclassification of minority classes.
  • Selecting too few or spatially clustered training samples reduces how well they represent the classes in the image. When validation pixels lie close to training pixels, spatially clustered sampling can inflate accuracy estimates.

Frequently asked questions

How does pixel-based classification differ from object-based image analysis (OBIA)?

Pixel-based classification assigns a class to each individual pixel using only its spectral values. OBIA first groups neighboring pixels into spatially coherent segments (objects) and then classifies those objects using spectral, textural, and shape features. OBIA generally produces smoother, more interpretable maps at fine spatial resolutions, whereas pixel-based approaches are preferred for coarser imagery where individual pixels represent homogeneous areas.

What sample size is recommended for supervised pixel-based classification?

No universal rule fixes the number of training samples. The number needed grows with the number of bands and classes and with the spectral variability within each class, so a high-dimensional feature space requires more samples than a few bands do. Samples should be spread across the image to capture within-class variation, and their representativeness generally matters as much as their count.

When is unsupervised classification preferred over supervised classification?

Unsupervised classification is preferred when labeled reference data are absent or expensive to collect, when exploring an unfamiliar landscape to identify natural spectral clusters before committing to a classification scheme, or when rapid preliminary mapping is needed. Its output clusters require post-hoc labeling by an analyst, and the resulting classes may not align neatly with the desired thematic categories.

Related methods

Sources

  1. Lu, D., & Weng, Q. (2007). A survey of image classification methods and techniques for improving classification performance. International Journal of Remote Sensing, 28(5), 823–870.

    Open DOI reference