thumbnail of Spectral Angle Mapper (SAM)Back

Spectral Angle Mapper (SAM)

Interactive visualisation of geometric classification by vector comparison of spectral signatures

01/2026

The Spectral Angle Mapper (SAM) is a technique used in many techniques, for example in remote sensing to classify materials based on their spectral signatures. By comparing the angle between the spectral signature of a pixel and the spectral signatures of known materials, SAM can determine the similarity and identify the material present in the pixel. But how does it work?

The Hyperspectral cube

The hyperspectral cube is a three-dimensional data structure that contains information from multiple spectral bands for each pixel in a scene. In the context of remote sensing, this means that each pixel is represented by a spectrum, which is a continuous curve that describes the intensity of reflected radiation across a range of wavelengths.
Representation of spatial data (x, y) and spectral data λ (z).

From spectral signatures to vector

The spectral signature is the reflectance curve. If we isolate 3 bands (wavelengths), we can represent this pixel as a unique point in a 3D space.

2D spectral representation

The transition to N-dimensional space

Each point on the curve becomes a coordinate. The SAM compares the direction of this vector relative to a known target using this formula :

θ = arccos(Σ ti ri(√Σ ti2) (√Σ ri2))

With ti the elements of the target vector and ri the elements of the reference vector.

Visualisation of the comparaison

Imagine multispectral data captured with 3 wavelengths. Each pixel in the image can be represented as a point in a 3D space, where the axes correspond to the reflectance of the differents bands.A threshold is set by the user to determine whenever a pixel should be considered similar to the target.

Unknown Parameters

CLASSIFICATION : Accepted
Calculated Angle
0.12 rad

Why is SAM powerful?

In a real scene, the same material can be in the sun or in the shade. The light intensity modifies the length of the vector, but not its direction.

Since SAM only calculates the angle, it recognizes that a dark pixel and a bright pixel belong to the same class if they are aligned along the same axis.

Advantages

  • Insensitive to shadows and albedo variations
  • Very fast as it is purely geometric
  • Interpretability: The results can be easily understood and visualized

Limits

  • Confuses materials of the same color but different intensity (if you want to distinguish them)
  • Sensitive to noise in dark bands
  • Mixed pixels: SAM assumes each pixel is "pure"

Study case, Wetland Vegetation

Performance : SAM vs SVM vs ANN
Results of verifying classification methods
Source: Lim, T.Y., et al. (2023). Drones 7(8), 536.

Why is SAM superior here?

It is commonly believed that deep learning methods (ANN) or SVMs are globally more performant. Yet, in the case of hyperspectral wetlands, SAM dominates with an accuracy of 91.91%, but why ?

1

Spectral Complexity vs Statistics

With 270 bands, the spectral "shape" is so rich that SAM's geometric approach captures the essence of the material better than probability models.

2

Independence from Albedo

Soil moisture and reed shadows create brightness variations. SAM ignores them, whereas SVM and ANN get lost because of intensity.

3

Sampling Efficiency

SAM works extremely well with pure reference libraries, without requiring the massive data volumes needed by neural networks.

OA (Overall Accuracy): Proportion of correctly classified samples over all samples.
Kappa (Cohen's Kappa): Agreement between prediction and reference data, corrected for chance agreement.

Conclusion: The Right Tool, the Right Context

This study demonstrates that there is no "universally superior" method. The success of a classification depends on the match between the algorithm and the physical nature of the data.

References

Lim, T. Y., Kim, J., Kim, W., & Song, W. (2023)

"A Study on Wetland Cover Map Formulation and Evaluation Using Unmanned Aerial Vehicle High-Resolution Images"

MDPI Drones, 7(8), 536.

Zoffoli, M. L., et al. (2010)

"Remote Sensing of Coastal Wetlands: Application to Seagrass Mapping"

MDPI Sensors, 10(3), 1967.
Aymen
Biomedical
engineer
student
Jellouli
This website has been cautiously sketched in Figma and brought to life in Visual Studio Code with love by yours truly. Built using React and Tailwind CSS, deployed with Vercel.