Spectral Library
Match spectra to references, build custom libraries, and perform reference-based classification.
1. Overview
The Spectral Library provides a set of reference spectra (vegetation types, soils, water, minerals, man-made surfaces) that can be matched against any pixel or region of interest in the loaded scene. It enables rapid material identification without labeled training data.
Key points
- Built-in library of 17 reference spectra covering common land-cover types (Vegetation, Water, Soil, Mineral, Man-made, Other).
- Searchable ECOSTRESS reference browser for loading published spectra into your session.
- Supports a Custom Library - add your own spectra from the current scene or from uploaded files.
- Favorites keep frequently used spectra available across sessions.
- Three similarity metrics available: SAM, SID, and Euclidean Distance.
- Whole-image classification assigns the closest library match to every pixel.
Matching scope: matching and classification run against the spectra you select in the Custom and Favorites lists. The built-in reference library is excluded by default so generic reference materials do not dilute results.
2. What the Spectral Library Does
1. Loaded hyperspectral scene [H x W x B]
2. User selects a pixel or region of interest
3. Pixel spectrum extracted to compared to each reference spectrum in the library
4. Similarity score computed for each reference (SAM / SID / Euclidean)
5. Top N matches ranked and displayed with scores (optional)
6. Whole-image classification: every pixel compared to all references each pixel assigned to the closest matching material class classified map displayed in viewer
3. Where to Find It
1. Load any dataset from My Files or the Satellite page.
2. Click Spectral Library in the feature toolbar.
3. The Spectral Library panel appears in the left sidebar, and the spectral signature chart updates in the right panel.
4. Step-by-Step Workflow
Step 1 Load Data
Any loaded scene works. Satellite data or lab-acquired hyperspectral files are both supported.
Step 2 Open Spectral Library
Click Spectral Library in the feature toolbar.
Step 3 Select Matching Algorithm
Choose from the algorithm dropdown
Step 4 Set Number of Matches
Set Top to the number of best matches to display (default: 5).
Step 5 Click on a Pixel
Move the cursor over the image and click a pixel - or the live spectrum updates automatically as you hover. Click Match Pixel (x, y) to run the comparison.
Step 6 Review Results
The sidebar shows the top N matches with their scores. Lower SAM/SID scores = better match.
5. Matching Algorithms Explained
Spectral Angle Mapper (SAM)
Measures the angle between two spectra treated as vectors in N-dimensional space. A smaller angle = greater similarity.
- Range: 0 (perfect match) to π/2 (orthogonal, no similarity)
- Advantage: Insensitive to brightness/illumination differences
- Disadvantage: Cannot distinguish materials with similar shapes but different reflectance magnitudes
Spectral Information Divergence (SID)
Treats spectra as probability distributions and measures the divergence between them.
- Range: 0 (identical) to higher values (dissimilar)
- Advantage: Captures spectral variability beyond shape
- Use when: Distinguishing materials with subtle differences (e.g., vegetation stress levels)
Euclidean Distance (ED)
Standard L2 distance between spectral vectors.
- Advantage: Simple and fast
- Disadvantage: Sensitive to overall brightness; normalize spectra first for best results
6. Output and Interpretation
Score interpretation for SAM
7. Custom Library, ECOSTRESS and Favorites
Build a custom library
1. Open the Custom dropdown in the Spectral Library bar.
2. Add spectra in any of these ways
- Upload .txt - import a wavelength/value spectrum file.
- Capture Spectrum - draw a region on the image to capture its mean spectrum, then name and save it.
- ECOSTRESS - open the browser, search the reference collection, and load a spectrum into the session.
3. Saved spectra can be kept for the session only, or saved to the cloud so they persist across sessions.
4. Tick the checkbox beside each spectrum you want included in matching. The count of selected spectra is shown in the list header.
Favorites
- Click the star beside any spectrum to add it to Favorites.
- Favourites persist across sessions and appear in their own dropdown.
- A favourite ECOSTRESS spectrum that is not currently loaded shows a Load button to pull it back into the session.
If you run a match with nothing selected, the panel reports that no spectra are selected rather than returning an empty result.
8. Whole-Image Classification
The Classify button runs spectral matching across every pixel in the scene:
1. Set a Threshold (default 0.3 for SAM) - pixels with no match scoring below this threshold are left unclassified.
2. Click Classify (SAM) (or the selected algorithm).
3. The classified map appears in the viewer - each class has a distinct color.
9. Known Limitations
10. Common Use Cases
Part of the IDCubeCloud User Documentation - see also: PCA Guide, Vegetation Indices Guide, Clustering Guide.
Manual revision: September 2026
↑ Back to top