Documentation  ›  Documentation Library  ›  Spectral Matching Explorer
Spectral Analysis

Spectral Matching Explorer

The Spectral Matching Explorer identifies image pixels whose spectra are similar to one or more reference spectra.

Overview

The Spectral Matching Explorer identifies image pixels whose spectra are similar to one or more reference spectra.

A reference spectrum is compared with the spectrum of each pixel in the currently loaded hyperspectral image.

The resulting matching scores are displayed as a spatial Score Map and a Score Histogram.

An interactive threshold can then be used to identify and visualize pixels that match the selected reference spectrum.

Reference spectra represent materials, tissues, chemicals, minerals, vegetation, water, or other spectral targets that you want to locate in the hyperspectral image.

Reference spectra can be obtained in two ways:

1. Search Library - search and select spectra from the integrated ECOSTRESS spectral library or My Library.

2. Load External - load one or more compatible spectrum files from your computer.

Click Search Library to open the IDCubePro Spectral Library Browser.

The browser provides access to the bundled ECOSTRESS spectral library and your personal My Library collection.

Use the search and filtering controls to locate spectra by name, type, class, subclass, or other available metadata.

Select a spectrum to preview it before loading it into the Spectral Matching Explorer.

A selected library spectrum can be used directly as the active reference spectrum.

Additional spectra can also be added for multi-spectrum matching.

The integrated ECOSTRESS library contains thousands of laboratory and field spectra representing natural and manufactured materials.

Depending on the installed ECOSTRESS collection, spectra may include vegetation, minerals, soils, rocks, water, man-made materials, and other spectral targets.

IDCubePro indexes the local ECOSTRESS collection to provide rapid searching without loading the complete spectral library into memory.

The first use of the library may require creation of the local search index. Subsequent searches use the saved index and should open substantially faster.

My Library provides a personal collection of spectra that can be reused in IDCubePro.

Spectra selected from the ECOSTRESS library can be added to My Library from the Spectral Library Browser.

Use My Library for frequently used reference spectra or spectra associated with a particular experiment or project.

Click Load External to select one or more spectrum files stored on your computer.

IDCubePro supports ECOSTRESS-like spectrum files containing wavelength and spectral intensity information.

Typical numeric spectrum data consist of:

Column 2 - spectral intensity, reflectance, absorbance, or other spectral value Metadata may also be present in supported spectrum files.

When multiple external spectra are selected, they can be used for multi-reference spectral matching.

IDCubePro performs wavelength alignment before spectral matching.

ECOSTRESS spectra commonly use wavelength values in micrometers, while hyperspectral datasets may use nanometers.

When appropriate, IDCubePro converts reference wavelength values to nanometers before matching.

For example, a reference range of 0.4-2.5 micrometers corresponds to approximately 400-2500 nm.

The reference spectrum and hyperspectral image must contain a sufficient overlapping wavelength region.

The wavelength ranges do not need to be identical.

IDCubePro determines the overlapping wavelength region and interpolates the reference spectrum onto the wavelength positions of the hyperspectral image.

Reference wavelengths outside the image wavelength range are not used for matching.

If the spectra do not overlap sufficiently, IDCubePro reports a wavelength-range error.

The Reference Spectrum panel displays the currently selected library or external spectrum.

When multiple spectra are selected, the spectra are displayed together for comparison.

Use this plot to verify the spectral shape and confirm that the wavelength range is appropriate for the loaded hyperspectral dataset.

Unexpected discontinuities, extreme values, or incompatible spectral units may produce unreliable matching results.

Two or more reference spectra can be loaded for multi-class spectral matching.

Each reference spectrum represents a separate spectral target or class.

When multiple references are present, clicking Run Spectral Match opens the Multiple Spectra Matching workflow.

Each reference is independently compared with the hyperspectral image and a multi-class spatial overlay is generated.

Individual thresholds can then be adjusted for the different spectral classes.

The Matching Method control determines how the reference spectrum is mathematically compared with every image spectrum.

SAM compares spectra according to the angle between their spectral vectors.

Smaller spectral angles indicate greater similarity.

SAM is relatively insensitive to overall spectral magnitude and is useful when spectral shape is more important than absolute intensity.

SAM is recommended as a general starting method for spectral matching.

Jeffries-matusita Sam (jmsam)

JMSAM applies a Jeffries-Matusita-based transformation to spectral similarity.

It provides an alternative scaling of spectral separation and can help distinguish highly similar spectra.

Normalized Spectral Similarity (ns3)

NS3 evaluates normalized spectral similarity using spectral direction together with magnitude-related information.

It can provide complementary information to SAM when spectral amplitude differences are analytically important.

Spectral Information Divergence (sid)

SID treats normalized spectra as probability-like distributions and evaluates their divergence.

Lower SID values indicate greater spectral similarity.

SID can emphasize spectral-shape differences that may be represented differently by angle-based methods.

SIDSAM combines Spectral Information Divergence and Spectral Angle Mapper information.

It incorporates characteristics of both information-theoretic divergence and spectral-angle separation.

After selecting a reference spectrum and matching method, click Run Spectral Match.

IDCubePro aligns the reference spectrum with the image wavelength axis and compares it with every image pixel spectrum.

The calculation produces a spatial Score Map and a Score Histogram.

For large hyperspectral datasets, calculation may require additional processing time.

The Score Map displays the spectral-matching score at every spatial location in the hyperspectral image.

The color scale represents the numerical matching score and does not directly represent spectral classes.

For the current distance-based matching methods, lower scores generally indicate a better match to the reference spectrum.

The numerical scale depends on the selected matching method.

Do not directly compare absolute scores produced by different matching algorithms as though they have identical numerical meaning.

The Score Histogram displays the distribution of matching scores across all image pixels.

It is useful for examining the score population and selecting an appropriate matching threshold.

A population at relatively low scores may represent pixels whose spectra are similar to the reference spectrum.

The histogram should be interpreted together with the Score Map and the spatial distribution of detected pixels.

The current threshold is displayed on the histogram to help visualize the selected cutoff.

The Maximum Match Threshold determines which pixels are classified as spectral matches.

Pixels with matching scores less than or equal to the threshold are selected.

Use the threshold slider to interactively change the cutoff.

The matched-region overlay updates while the slider is moved, allowing the effect of the threshold to be evaluated immediately.

The numeric threshold field and slider represent the same threshold and remain synchronized.

A smaller threshold is more restrictive and selects pixels with greater spectral similarity.

A larger threshold is more permissive and includes a broader range of spectra.

There is no universal optimal threshold. The appropriate value depends on the reference spectrum, matching algorithm, data quality, preprocessing, and experimental objective.

The Apply Threshold button applies the currently selected threshold to the calculated Score Map.

Matched pixels are highlighted in yellow in the Image / Matched Region panel.

The displayed pixel count and percentage indicate how much of the image satisfies the selected threshold.

Before thresholding, this panel displays a rendering of the currently loaded hyperspectral image.

After thresholding, pixels satisfying the matching criterion are highlighted in yellow.

Yellow therefore means that the pixel matching score is less than or equal to the current threshold.

Areas retaining the underlying image colors are pixels that do not satisfy the current threshold.

Moving the interactive threshold changes the highlighted region immediately.

For meaningful spectral matching, reference spectra and image spectra should represent compatible physical quantities whenever possible.

For example, reflectance spectra should generally be compared with reflectance spectra rather than uncorrected detector intensity.

Differences in calibration, illumination, normalization, baseline, spectral resolution, or preprocessing can substantially affect matching scores.

Spectral matching can be strongly influenced by preprocessing.

Depending on the dataset, useful preprocessing may include reference correction, normalization, smoothing, baseline correction, or removal of noisy wavelength regions.

Apply preprocessing consistently when quantitative comparisons between datasets are required.

A low spectral-matching score indicates mathematical similarity to the selected reference according to the chosen matching algorithm.

It does not by itself establish the chemical, biological, geological, or material identity of a pixel.

Potential confounding factors include spectral mixtures, illumination variation, scattering, noise, detector artifacts, background spectra, and different materials having similar spectral signatures.

Whenever possible, spectral-matching results should be interpreted together with experimental controls or independent validation.

Spectral Angle Mapper (SAM) is recommended as a useful starting point for most exploratory analyses.

If spectral magnitude or distributional differences are important, compare the results with NS3 or SID.

JMSAM and SIDSAM provide alternative transformations or combinations that may improve discrimination for particular datasets.

The optimal method depends on the spectral properties of the target and the analytical objective.

1. Load the hyperspectral dataset in IDCubePro.

2. Apply appropriate calibration or preprocessing if required.

3. Open Spectral Matching Explorer.

4. Click Search Library or Load External.

5. Select the desired reference spectrum.

6. Inspect the Reference Spectrum plot.

7. Confirm that the reference and image wavelength ranges overlap.

8. Select the spectral matching method.

9. SAM is recommended as a general starting method.

10. Click Run Spectral Match.

12. Inspect the Score Histogram.

13. Move the threshold slider to explore potential matches.

14. Observe the yellow matched region in the image.

15. Fine-tune the threshold using the slider or numeric field.

16. Compare alternative matching methods when appropriate.

17. For multiple references, use the multi-spectrum matching workflow.

No reference spectrum appears Verify that a spectrum was selected in the Spectral Library Browser or that the external spectrum file contains valid wavelength and spectral-value data.

ECOSTRESS library takes time to open The first use may require creation or rebuilding of the ECOSTRESS search index. Subsequent searches should be faster.

Reference spectrum does not overlap the image Check the wavelength ranges and units. A common issue is comparing micrometers with nanometers without unit conversion.

Almost the entire image is yellow The threshold is probably too permissive. Move the threshold slider toward a lower value.

The threshold may be too restrictive, the reference spectrum may not be present, or the reference and image spectra may not be directly comparable.

Inspect the reference spectrum, preprocessing, wavelength alignment, background pixels, Score Map, and Score Histogram. Consider comparing the result with another matching method.

Results differ between methods This is expected because SAM, JMSAM, NS3, SID, and SIDSAM measure spectral similarity differently.

Processing time depends on image dimensions, number of spectral bands, number of reference spectra, and the selected matching method.

Important

Spectral matching is an analytical classification and exploration tool.

Results should be interpreted according to the characteristics and limitations of the hyperspectral dataset, reference spectra, preprocessing, and selected matching algorithm.