All terms

What is a spectral library

GlossaryFundamentals

A spectral library is a collection of reflectance spectra for known materials, measured under controlled conditions and stored with enough metadata to be trusted. It is the reference side of every identification workflow. Without one, a hyperspectral pixel is just a curve. With one, it can be compared against known materials and named.

What goes into a library entry

A useful entry is more than a list of numbers. It carries the sample description, where the sample came from, how it was prepared, the grain size, the instrument used, the illumination and viewing geometry, and any purity assessment from independent analysis such as X-ray diffraction or electron microprobe. Two spectra of the same mineral name can differ substantially if one sample was pure and finely ground and the other was a mixed field specimen.

The best known public reference libraries are maintained by government geological surveys and space agencies and are free to download. They contain spectra of minerals, rocks, soils, vegetation, artificial materials and liquids, measured across the visible to shortwave infrared and in many cases beyond. Entries carry quality flags describing how well the sample was characterised, which matters because a spectrum from an impure sample can quietly contaminate a classification.

How matching works

Library matching compares an observed pixel spectrum against every candidate reference and scores the fit. The simplest common approach is spectral angle mapping, which treats each spectrum as a vector and measures the angle between them, making the comparison insensitive to overall brightness. More sophisticated approaches compare continuum removed absorption features directly, weighting the diagnostic wavelength regions and ignoring the rest of the curve. The established expert-system classifiers work this way, using explicit rules about which features to trust for which materials.

Where it goes wrong

Two failure modes matter. The first is library incompleteness: if the real material on the ground is not in the library, the algorithm will still return the closest available match, and that match will be wrong. The second is mixing. Real pixels almost always contain several materials, so the observed spectrum is a mixture rather than a clean match to any single entry. Handling this properly means unmixing rather than matching, and being willing to report low confidence instead of a confident wrong answer.