Undirected graphical models have been successfully used to jointly model the spatial and the spectral dependencies in earth observing hyperspectral images. They produce less noisy, smooth, and spatially coherent land cover maps and give top accuracies on many datasets. Moreover, they can easily be combined with other state-of-the-art approaches, such as deep learning. This has made them an essential tool for remote sensing researchers and practitioners. However, graphical models have not been easily accessible to the larger remote sensing community as they are not discussed in standard remote sensing textbooks and not included in the popular remote sensing software and toolboxes. In this tutorial, we provide a theoretical introduction to Markov random fields and conditional random fields based spatial-spectral classification for land cover mapping along with a detailed step-by-step practical guide on applying these methods using freely available software. Furthermore, the discussed methods are benchmarked on four public hyperspectral datasets for a fair comparison among themselves and easy comparison with the vast number of methods in literature which use the same datasets. The source code necessary to reproduce all the results in the paper is published on-line to make it easier for the readers to apply these techniques to different remote sensing problems.illumination, shadows, purity of pixels, viewing geometry, atmospheric conditions, and noise across the image. This problem can be alleviated by combining spatial contextual information with the spectral information.
Spatial-spectral classificationSpatial information can be utilized together with spectral information to produce more accurate and spatially coherent land cover maps [24]. Land covers in the environment tend to be much larger than the ground pixel size of the sensors leading to regions of pixels belonging to a common material class. Additionally, some land cover classes are more likely to exists in close vicinity than others and some land cover classes are highly unlikely to occur together. This leads to strong relationships between the neighboring pixel labels in an image. For example, if a pixel belongs to a class, say building, there is a high probability that the surrounding pixels also belong to the same class, building. Similarly, the probability of neighboring pixels of a building pixel belonging to the road class or the parking lot class is typically much higher than them belonging to the forest class or the bare soil class in an urban scene. These kind of relationships can be exploited by spatial-spectral classifiers. Even though there are exceptions, e.g., [12], [82], and [45], the vast majority of spatial-spectral classifiers can be categorized into two distinct groups-methods that perform spatial-spectral feature extraction followed by pixel-wise classification and methods that combine undirected graphical model and pixel-wise classification.Spatial-spectral feature extraction utilizes the spectra of the neighborhood of pixels around th...