Hyperspectral Imaging
What minerals compose this rock? What chemicals are in these plants? Hyperspectral imaging captures hundreds of narrow spectral bands, enabling material identification through spectral signatures. This model derives absorption feature analysis, implements spectral unmixing algorithms, and shows how to map minerals, vegetation biochemistry, and water quality from hyperspectral data.
Prerequisites: spectroscopy, spectral unmixing, dimensionality reduction, absorption features
1. The Question
Can we identify minerals from orbit using reflected sunlight?
Hyperspectral imaging captures continuous spectra across hundreds of narrow bands.
Comparison:
Multispectral (Landsat, Sentinel-2):
- 8-12 broad bands
- Band width: 50-200 nm
- Coarse spectral sampling
Hyperspectral (AVIRIS, EnMAP, PRISMA):
- 100-400+ narrow bands
- Band width: 5-10 nm
- Fine spectral sampling
- Continuous spectrum 400-2500 nm
Key advantage:
Narrow bands capture diagnostic absorption features that reveal:
- Mineral composition (geology)
- Vegetation biochemistry (chlorophyll, water, nitrogen)
- Water quality (sediment, algae, dissolved organic matter)
- Urban materials (roof types, pavement)
Applications:
- Mineral exploration (ore deposits)
- Precision agriculture (crop health, nutrient status)
- Environmental monitoring (water quality, invasive species)
- Geological mapping (lithology discrimination)
2. The Conceptual Model
Spectral Signatures
Reflectance spectrum:
\[\rho(\lambda) = \frac{L_{\uparrow}(\lambda)}{L_{\downarrow}(\lambda)}\]Where:
- $\rho(\lambda)$ = spectral reflectance (0-1)
- $\lambda$ = wavelength (nm)
- $L_{\uparrow}$ = upwelling radiance
- $L_{\downarrow}$ = downwelling irradiance
Absorption features:
Materials absorb specific wavelengths due to:
- Electronic transitions (UV-visible, 400-700 nm)
- Vibrational overtones (near-infrared, 700-1300 nm)
- Molecular vibrations (shortwave infrared, 1300-2500 nm)
Example - vegetation:
- 680 nm: Chlorophyll absorption (red)
- 750-900 nm: High reflectance (near-infrared plateau)
- 1400, 1900 nm: Water absorption
- 2200 nm: Cellulose/lignin absorption
Example - minerals:
- Iron oxides: Absorption 400-700 nm
- Hydroxyl minerals (clays): 1400, 2200 nm
- Carbonates: 2300-2350 nm
Spectral Libraries
Reference spectra measured in laboratory:
USGS Spectral Library:
- 1400+ materials
- Minerals, rocks, soils
- Vegetation, water
- Measured at high resolution
Use: Compare image spectra to library for identification
Imaging Spectrometer
Data structure:
Hyperspectral cube:
- x dimension: spatial (pixels across)
- y dimension: spatial (pixels down)
- z dimension: spectral (wavelengths)
Data volume:
1000 × 1000 pixels × 200 bands = 200 million values
Each pixel = complete spectrum (hundreds of measurements)
3. Building the Mathematical Model
Spectral Unmixing
Mixed pixel problem:
Pixel contains multiple materials (vegetation + soil, multiple minerals)
Linear mixing model:
\[\rho(\lambda) = \sum_{i=1}^{n} f_i \rho_i(\lambda) + \varepsilon(\lambda)\]Where:
- $f_i$ = fractional abundance of endmember $i$
- $\rho_i(\lambda)$ = reflectance spectrum of pure endmember $i$
- $\varepsilon(\lambda)$ = residual error
Constraints:
\(\sum_{i=1}^{n} f_i = 1\) (fractions sum to 1)
\(f_i \geq 0\) (non-negative fractions)
Matrix formulation:
\[\mathbf{r} = \mathbf{E} \mathbf{f} + \boldsymbol{\varepsilon}\]Where:
- $\mathbf{r}$ = measured spectrum (m × 1 vector, m bands)
- $\mathbf{E}$ = endmember matrix (m × n, n endmembers)
- $\mathbf{f}$ = abundance vector (n × 1)
Solution (least squares):
\[\mathbf{f} = (\mathbf{E}^T\mathbf{E})^{-1}\mathbf{E}^T\mathbf{r}\]Subject to non-negativity and sum-to-one constraints.
Absorption Feature Depth
Continuum removal:
- Fit continuum (straight line or convex hull) to spectrum
- Normalize spectrum by continuum
- Measure absorption depth
Continuum-removed reflectance:
\[R_{CR}(\lambda) = \frac{\rho(\lambda)}{\rho_{continuum}(\lambda)}\]Absorption depth:
\[D = 1 - \min(R_{CR}(\lambda))\]Example - 2200 nm clay feature:
If minimum $R_{CR} = 0.75$, then $D = 0.25$ (25% absorption)
Spectral Angle Mapper (SAM)
Similarity metric between spectra:
\[\alpha = \arccos\left(\frac{\mathbf{r}_1 \cdot \mathbf{r}_2}{||\mathbf{r}_1|| \cdot ||\mathbf{r}_2||}\right)\]Where:
- $\alpha$ = spectral angle (radians or degrees)
- Small angle → similar spectra
Classification:
Compare pixel spectrum to reference library spectra, assign to closest match (smallest angle).
Insensitive to illumination (brightness variations) - measures shape, not magnitude.
Principal Component Analysis (PCA)
Dimensionality reduction:
Transform 200 bands → 5-10 principal components capturing most variance.
Covariance matrix:
\[\mathbf{C} = \frac{1}{n-1}\mathbf{X}^T\mathbf{X}\]Eigenvalue decomposition:
\[\mathbf{C}\mathbf{v}_i = \lambda_i\mathbf{v}_i\]Principal components:
\[PC_i = \mathbf{X}\mathbf{v}_i\]Variance explained:
\[\text{Variance}_i = \frac{\lambda_i}{\sum \lambda_i}\]First few PCs typically capture >95% variance.
4. Worked Example by Hand
Problem: Unmix pixel containing vegetation and soil.
Measured spectrum (simplified, 5 wavelengths):
| λ (nm) | ρ_measured |
|---|---|
| 550 | 0.08 |
| 670 | 0.06 |
| 800 | 0.35 |
| 1600 | 0.25 |
| 2200 | 0.22 |
Endmember spectra:
Vegetation:
| λ (nm) | ρ_veg |
|---|---|
| 550 | 0.10 |
| 670 | 0.04 |
| 800 | 0.50 |
| 1600 | 0.35 |
| 2200 | 0.30 |
Soil:
| λ (nm) | ρ_soil |
|---|---|
| 550 | 0.06 |
| 670 | 0.08 |
| 800 | 0.20 |
| 1600 | 0.15 |
| 2200 | 0.14 |
Find fractional abundances $f_{\text{veg}}$ and $f_{\text{soil}}$.
Solution
Linear mixing model:
\[\rho(\lambda) = f_{\text{veg}} \rho_{\text{veg}}(\lambda) + f_{\text{soil}} \rho_{\text{soil}}(\lambda)\]With constraint: $f_{\text{veg}} + f_{\text{soil}} = 1$
Substitute constraint: $f_{\text{soil}} = 1 - f_{\text{veg}}$
\[\rho(\lambda) = f_{\text{veg}} \rho_{\text{veg}}(\lambda) + (1-f_{\text{veg}}) \rho_{\text{soil}}(\lambda)\] \[\rho(\lambda) = f_{\text{veg}} (\rho_{\text{veg}}(\lambda) - \rho_{\text{soil}}(\lambda)) + \rho_{\text{soil}}(\lambda)\]Solve using one wavelength (800 nm):
$$0.35 = f_{\text{veg}}(0.50 - 0.20) + 0.20$$
$$0.35 = 0.30 f_{\text{veg}} + 0.20$$
$$0.15 = 0.30 f_{\text{veg}}$$
\[f_{\text{veg}} = 0.50\] \[f_{\text{soil}} = 0.50\]Verify at 670 nm:
\(\rho_{pred} = 0.50(0.04) + 0.50(0.08) = 0.02 + 0.04 = 0.06\) ✓
Verify at 2200 nm:
\(\rho_{pred} = 0.50(0.30) + 0.50(0.14) = 0.15 + 0.07 = 0.22\) ✓
Result: Pixel is 50% vegetation, 50% soil.
Note: Using all bands simultaneously with least squares gives more robust estimate.
5. Computational Implementation
Below is an interactive hyperspectral analysis tool.
Estimated vegetation: --%
Estimated soil: --%
RMSE: --
Classification: --
Observations:
- Green dashed line shows pure vegetation spectrum with strong NIR reflectance
- Brown dashed line shows pure soil spectrum with more uniform response
- Blue line with points is measured mixed spectrum
- Pink dotted line is reconstructed spectrum from unmixing
- Red marker at 670 nm shows chlorophyll absorption feature
- Green marker at 850 nm shows NIR plateau characteristic of vegetation
- Unmixing algorithm estimates component fractions from spectral shape
- Adding noise degrades unmixing accuracy but algorithm remains robust
- RMSE quantifies reconstruction quality
Key insights:
- Vegetation has distinctive spectral signature with red absorption and NIR reflectance
- Mixed pixels can be decomposed into constituent materials
- Narrow bands enable precise absorption feature measurement
- Spectral libraries provide reference signatures for identification
6. Interpretation
Mineral Mapping
Example - Cuprite, Nevada mining district:
AVIRIS hyperspectral data identified:
- Kaolinite (2200 nm absorption)
- Alunite (2165 nm absorption)
- Buddingtonite (2125 nm absorption)
- Iron oxides (500-600 nm absorption)
Economic value:
Mapping alteration minerals indicates hydrothermal systems associated with ore deposits.
Advantage over field mapping:
- Cover large areas rapidly
- Access remote/dangerous terrain
- Objective, repeatable
- Subsurface minerals exposed at surface
Precision Agriculture
Crop biochemistry from spectra:
Chlorophyll content:
- Red edge position (700-750 nm)
- Chlorophyll indices using 550, 670, 750 nm
Water stress:
- Water absorption at 1400, 1900 nm
- Normalized difference water index
Nitrogen status:
- Correlation with chlorophyll
- Red edge shifts with N availability
Disease detection:
- Early stress signatures before visual symptoms
- Spectral changes in stressed tissue
Application:
Variable-rate fertilizer/pesticide application based on hyperspectral maps.
Water Quality
Optically active constituents:
Chlorophyll-a (algae):
- Absorption at 440, 675 nm
- Fluorescence peak at 685 nm
Suspended sediment:
- Scattering increases reflectance across all bands
- Particularly strong in red/NIR
Dissolved organic matter (DOM):
- Absorption in blue/green
- “Yellow substance”
Example - Lake Erie harmful algal blooms:
Hyperspectral imaging from aircraft detects:
- Bloom extent
- Chlorophyll concentration
- Cyanobacteria vs green algae discrimination
Public health application:
Toxic cyanobacteria produce microcystin - early detection enables beach closures.
7. What Could Go Wrong?
Atmospheric Interference
Problem:
Atmosphere absorbs and scatters light.
Water vapor absorption bands:
- 1400 nm
- 1900 nm
- 2500+ nm
In these bands: Surface reflectance unmeasurable from aircraft/satellite.
Solution:
- Atmospheric correction (ATREM, FLAASH algorithms)
- Use bands outside absorption features
- Ground-based measurements for validation
Endmember Variability
Assumption: Pure endmembers have fixed spectra.
Reality:
- Vegetation spectra vary with species, health, phenology
- Soil spectra vary with moisture, texture, mineralogy
- Shadows, topography affect apparent spectra
Problem:
Using library spectra from different location/time introduces error.
Solution:
- Image-derived endmembers (select from actual scene)
- Multiple endmember spectral mixture analysis (MESMA)
- Account for variability in library
Dimensionality Curse
High dimensionality (200+ bands) causes statistical problems:
Hughes phenomenon:
- Classification accuracy decreases with too many features
- Need exponentially more training samples
Multicollinearity:
- Adjacent bands highly correlated
- Redundant information
Solution:
- Dimensionality reduction (PCA, MNF)
- Band selection (choose optimal subset)
- Feature extraction (spectral indices)
Non-Linear Mixing
Linear model assumes:
Photons interact with one material before sensor.
Reality - multiple scattering:
- Canopy: Photons bounce between leaves, soil
- Mineral mixtures: Intimate vs areal mixing behave differently
Non-linear effects especially strong in:
- Dense vegetation
- Rough surfaces
- Multiple scattering media
Solution:
- Non-linear unmixing models
- Radiative transfer modelling
- Acknowledge limitation in interpretation
8. Extension: Derivative Spectroscopy
Spectral derivatives enhance subtle features.
First derivative:
\[\frac{d\rho}{d\lambda} \approx \frac{\rho(\lambda_{i+1}) - \rho(\lambda_{i-1})}{2\Delta\lambda}\]Second derivative:
\[\frac{d^2\rho}{d\lambda^2} \approx \frac{\rho(\lambda_{i+1}) - 2\rho(\lambda_i) + \rho(\lambda_{i-1})}{\Delta\lambda^2}\]Advantages:
- Remove background (continuum)
- Enhance narrow absorption features
- Less sensitive to illumination variations
Red edge derivative:
First derivative peak position indicates chlorophyll content and plant stress.
Mineral identification:
Second derivative reveals overlapping absorption features invisible in original spectrum.
Challenge:
Derivatives amplify noise - require smoothing.
9. Math Refresher: Vector Spaces and Similarity
Dot Product
Definition:
\[\mathbf{a} \cdot \mathbf{b} = \sum_{i=1}^{n} a_i b_i = ||\mathbf{a}|| \cdot ||\mathbf{b}|| \cos\theta\]Where $\theta$ = angle between vectors.
Cosine Similarity
Normalized dot product:
\[\text{similarity} = \frac{\mathbf{a} \cdot \mathbf{b}}{||\mathbf{a}|| \cdot ||\mathbf{b}||} = \cos\theta\]Range: -1 to +1
- +1: Identical direction
- 0: Orthogonal
- -1: Opposite direction
Spectral Angle Mapper uses this:
Angle $\alpha = \arccos(\text{similarity})$
Small angle → high similarity
Euclidean Distance
\[d = ||\mathbf{a} - \mathbf{b}|| = \sqrt{\sum_{i=1}^{n} (a_i - b_i)^2}\]Sensitive to magnitude - bright and dark versions of same material have large distance.
Spectral angle insensitive to magnitude - better for reflectance spectra.
Summary
- Hyperspectral imaging captures hundreds of narrow spectral bands enabling material identification
- Key advantage over multispectral is fine sampling of absorption features diagnostic of composition
- Linear spectral unmixing decomposes mixed pixels into fractional abundances of pure materials
- Spectral Angle Mapper classifies by comparing spectrum shape to reference library
- Applications span mineral exploration, precision agriculture, water quality, and environmental monitoring
- Continuum removal and derivative spectroscopy enhance subtle absorption features
- Principal Component Analysis reduces dimensionality while preserving most variance
- Challenges include atmospheric correction, endmember variability, and non-linear mixing effects
- AVIRIS, EnMAP, PRISMA provide operational hyperspectral data from airborne and spaceborne platforms
- Critical tool for biochemical and mineralogical mapping from remote platforms