Documentation  ›  Documentation Library  ›  Spectral Correlation Explorer
Spectral Analysis

Spectral Correlation Explorer

The Spectral Correlation Explorer measures the similarity between hyperspectral bands across an image.

Overview

The Spectral Correlation Explorer measures the similarity between hyperspectral bands across an image.

Each spectral band is compared with other bands using the pixel intensities across the spatial image.

The result is displayed as a wavelength-by-wavelength R² correlation matrix.

  • Visualize relationships among spectral bands
  • Identify highly correlated wavelength regions
  • Detect spectral redundancy
  • Select representative wavelengths
  • Reduce the number of hyperspectral bands
  • Explore wavelength-dependent image similarity
  • Examine relationships between spectrally shifted bands

1. Load a hyperspectral dataset.

2. Open Spectral Correlation Explorer.

3. Leave Spectral Shift at 0 nm for standard analysis.

4. Click Compute Correlation Matrix.

6. Adjust display contrast if needed.

7. Set an R² redundancy threshold.

8. Click Preview Kept Bands.

9. Inspect the proposed band reduction.

10. Use Apply Band Reduction only if you want to replace the current dataset with the reduced cube.

WHAT IS THE CORRELATION MATRIX?

Each hyperspectral band contains an image acquired at a particular wavelength.

The Correlation Explorer compares the spatial intensity pattern of one wavelength image with the spatial intensity pattern of another wavelength image.

If two wavelength images vary similarly across the pixels, they have a high correlation.

If their spatial patterns are substantially different, their correlation is lower.

The underlying calculation first determines the Pearson correlation coefficient, R, between pairs of spectral bands.

R = +1 indicates perfect positive linear correlation.

R = 0 indicates no linear correlation.

R = -1 indicates perfect negative linear correlation.

IDCubePro displays R², the square of the correlation coefficient.

R² therefore ranges from 0 to 1.

R² close to 1 indicates a strong linear relationship between the two wavelength images.

R² close to 0 indicates a weak linear relationship.

Because the correlation coefficient is squared, R² does not preserve the sign of the original correlation.

Strong positive and strong negative correlations can both produce high R² values.

The purpose of this tool is primarily to measure spectral-band similarity and redundancy rather than the direction of the relationship.

The horizontal and vertical axes represent wavelength.

Each matrix element represents the R² value calculated between two wavelength images.

The color indicates the strength of the relationship.

The color bar shows the R² scale corresponding to the displayed colors.

When Spectral Shift is 0 nm, every band is perfectly correlated with itself.

The main diagonal therefore normally has R² values close to 1.

This appears as a strong diagonal running across the correlation matrix.

The matrix is also normally symmetric when no spectral shift is applied because the correlation between wavelength A and wavelength B is the same as the correlation between wavelength B and wavelength A.

The scientifically interesting information is often found away from the main diagonal.

Large high-R² regions indicate groups of wavelengths producing similar spatial information.

These regions may represent broad spectral intervals in which adjacent bands contain highly redundant information.

Low-R² regions indicate wavelength pairs whose spatial intensity patterns differ more strongly.

Why Adjacent Bands Are Often Correlated

Hyperspectral systems typically sample wavelength at closely spaced intervals.

Neighboring bands therefore often contain very similar information.

For example, images at 1000 nm and 1002 nm may be almost identical if no strong spectral feature occurs between those wavelengths.

This produces high R² values around the main diagonal.

Click Compute Correlation Matrix to calculate the wavelength-by-wavelength R² matrix.

The hyperspectral cube is reshaped internally so that each spectral band is represented by its pixel intensity vector.

Pairwise correlation is then calculated across the spatial pixels.

Invalid or non-finite pixel values are excluded from the relevant calculations.

For datasets containing many spectral bands or many pixels, calculation may require additional time and memory.

The Display Contrast section controls how the calculated R² matrix is visualized.

Changing the display contrast does not change the underlying correlation values.

It only changes the mapping of R² values to the displayed colors.

After the correlation matrix is calculated, the histogram shows the distribution of R² values in the matrix.

The histogram can help identify an appropriate display range.

The Min and Max values determine the displayed color limits of the matrix.

You can modify these values numerically.

The corresponding histogram limit markers can also be moved interactively.

The Bins setting controls the number of intervals used to display the R² histogram.

A larger number of bins provides finer visualization of the R² distribution.

Changing the number of histogram bins does not alter the correlation calculation.

The Spectral Shift control allows comparison of the original hyperspectral bands with spectrally shifted versions of the dataset.

The shift is specified in nanometers.

At Shift = 0 nm, the standard wavelength-by-wavelength correlation matrix is calculated.

For a nonzero shift, IDCubePro interpolates the hyperspectral data at shifted wavelength positions before calculating the correlation.

Suppose the dataset contains wavelengths near 1000 nm.

With a shift of +10 nm, information at an original wavelength is compared with interpolated spectral information approximately 10 nm away.

This can be useful for exploring how quickly spatial information changes as a function of spectral separation.

Shifted wavelengths do not necessarily correspond exactly to acquired spectral bands.

IDCubePro therefore uses spectral interpolation when constructing the shifted dataset.

Wavelength positions outside the available spectral range cannot be interpolated and are treated as invalid for the corresponding comparisons.

The shifted matrix may therefore differ from the standard symmetric correlation matrix.

Hyperspectral datasets frequently contain many strongly correlated neighboring bands.

The Redundant Band Reduction section provides a simple method for identifying and removing highly correlated bands.

The user specifies an R² threshold.

Bands whose correlation exceeds the selected threshold are considered candidates for redundancy reduction.

The default redundancy threshold is R² = 0.95.

This means that bands with R² greater than the selected threshold can be considered highly similar for the purpose of the reduction algorithm.

The threshold determines how aggressively the spectral dataset is reduced.

Lower threshold = stronger reduction.

Higher threshold = more conservative reduction.

More bands will generally be considered redundant, resulting in stronger spectral reduction.

Only extremely highly correlated bands will generally be removed.

There is no universally correct threshold. The appropriate value depends on the dataset and scientific objective.

The reduction procedure uses a sequential greedy strategy.

The first retained band acts as a representative band.

Later bands whose R² with that retained band exceeds the selected threshold are marked as redundant.

The procedure then moves through the remaining bands and repeats the process.

This provides a simple and computationally efficient way to reduce strongly redundant spectral information.

Important Limitation Of Band Reduction

The retained wavelengths are not necessarily the mathematically optimal subset for every downstream analysis.

The procedure is designed specifically to remove strongly correlated bands.

It does not directly optimize classification accuracy, chemical sensitivity, signal-to-noise ratio, spectral feature preservation, or machine-learning performance.

For those objectives, other feature-selection methods may be more appropriate.

Click Preview Kept Bands after computing the correlation matrix.

IDCubePro calculates which bands would be retained using the selected R² threshold.

  • Total number of original bands
  • Number of bands proposed for removal

The preview allows you to evaluate the reduction before modifying the current hyperspectral dataset.

Apply Band Reduction modifies the currently loaded IDCubePro dataset.

Only the retained bands are kept in the hyperspectral cube.

The wavelength vector is reduced to match the retained bands.

Because this changes the active dataset, IDCubePro asks for confirmation before applying the reduction.

Important - Applying Reduction

Band reduction should be considered a data-processing operation.

After applying the reduction, downstream IDCubePro tools will operate on the reduced spectral cube rather than the original complete cube.

For this reason, inspect the preview and threshold carefully before applying the reduction.

If preservation of the complete dataset is important, save or retain the original hyperspectral dataset separately.

Reducing redundant wavelengths can provide several practical advantages.

  • Reduced memory requirements
  • Faster machine-learning workflows
  • Reduced computational burden
  • Simplified spectral models
  • Reduced feature redundancy
  • Identification of representative spectral bands

However, aggressive reduction can also remove useful spectral information.

The LUT control changes the color lookup table used to display the R² matrix.

Changing the LUT affects visualization only.

It does not alter the correlation values or band-reduction calculation.

A LUT file should contain a numeric N-by-3 colormap with values between 0 and 1.

Reset clears the calculated correlation matrix and returns the controls to their default values.

The default spectral shift is restored to 0 nm.

The default redundancy threshold is restored to R² = 0.95.

Reset does not reload the original hyperspectral dataset if band reduction has already been applied.

Interpreting High Correlation

A high R² value means that two wavelength images have strongly related spatial intensity patterns.

It does not necessarily mean that the wavelengths contain identical chemical or biological information.

High correlation can arise because neighboring wavelengths respond similarly to the same structures in the image.

It can also arise from illumination patterns, sample geometry, background variation, or other common sources of spatial variation.

Interpreting Low Correlation

A low R² value means that the two wavelength images do not have a strong linear relationship across the analyzed pixels.

This may indicate that the wavelengths respond differently to structures or materials in the image.

However, low correlation can also result from noise, low signal, artifacts, saturation, or wavelength-dependent detector performance.

Correlation Does Not Establish Causation

The correlation matrix describes statistical relationships among wavelength images.

It does not by itself identify the physical, chemical, molecular, or biological mechanism responsible for those relationships.

Spectral interpretation should be supported by appropriate reference spectra, controls, spectral libraries, known absorption features, or independent measurements when applicable.

Correlation structure can be influenced by hyperspectral preprocessing.

Depending on the imaging experiment, preprocessing may include:

  • Reflectance or reference correction
  • Removal of saturated pixels
  • Removal of noisy wavelength regions

For meaningful comparison between datasets, preprocessing should be applied consistently.

Large background regions can strongly influence band-to-band correlation.

For example, if most pixels in an image represent a uniform dark background, many wavelength images may appear strongly correlated simply because they share the same spatial background pattern.

When appropriate, masking irrelevant background pixels before correlation analysis can provide a more informative representation of the spectral relationships within the sample.

Bands with poor signal-to-noise ratio may produce unusual or unstable correlation patterns.

These regions can appear as lines, blocks, or abrupt transitions in the correlation matrix.

If these wavelengths correspond to known detector limitations or atmospheric absorption regions, consider excluding them before interpreting the matrix or performing band reduction.

1. Load the hyperspectral dataset.

2. Apply appropriate calibration and preprocessing.

3. Remove or mask irrelevant background when appropriate.

4. Open Spectral Correlation Explorer.

5. Begin with Spectral Shift = 0 nm.

7. Inspect the diagonal and off-diagonal structure.

8. Examine the R² histogram.

9. Adjust display contrast if needed.

10. Set a redundancy threshold, beginning near R² = 0.95.

11. Preview the retained bands.

12. Evaluate whether important spectral regions remain represented.

13. Adjust the threshold if necessary.

14. Apply Band Reduction only when satisfied with the proposed subset.

15. Validate the reduced dataset using the intended downstream analysis.

The Spectral Correlation Explorer can be useful for:

  • Hyperspectral data exploration
  • Spectral redundancy analysis
  • Multispectral band selection
  • Biomedical hyperspectral imaging
  • Preprocessing before machine learning

The entire matrix has very high R² The dataset may contain strongly redundant spectral bands, or common spatial structure such as background or illumination may dominate the correlations.

The matrix contains unexpectedly low correlations Inspect the data for noisy wavelength regions, low signal, saturation, artifacts, or strong wavelength-specific spatial features.

The diagonal is not exactly R² = 1 Invalid values, constant-intensity bands, numerical effects, or use of a nonzero spectral shift can alter the expected diagonal behavior.

The shifted matrix is not symmetric This can be expected. A shifted/interpolated spectrum is being compared with the original spectral dataset, so the two axes no longer represent an identical unshifted band set.

Increase the R² redundancy threshold. For example, change 0.95 to 0.98 or 0.99.

Decrease the R² threshold. For example, change 0.95 to 0.93 or 0.90.

Changing histogram Min or Max changes the appearance dramatically This is normal. These controls affect visualization only and do not modify the calculated R² values.

Changing the LUT changes the result colors The LUT changes only the color representation of the matrix. The numerical R² values remain unchanged.

Correlation analysis scales with both the number of pixels and the number of spectral bands. Large hyperspectral datasets therefore require more computation and memory.

Important Interpretation Note

The Spectral Correlation Explorer is an exploratory and preprocessing tool.

Band redundancy should be evaluated in the context of the intended scientific analysis.

A band that is highly correlated with neighboring wavelengths may still contain a scientifically important absorption feature, narrow spectral signature, or diagnostically relevant signal.

For critical applications, validate the reduced spectral set against the original dataset before adopting the reduced representation.

Spectral Correlation Explorer