On-the-fly spectral unmixing based on Kalman filtering

Hugues Kouakou, José Henrique de Morais Goulart, Raffaele Vitale, Thomas Oberlin, David Rousseau, Cyril Ruckebusch, Nicolas Dobigeon · DOI

TL;DR

This paper introduces KF-OSU, the first operational "on-the-fly" spectral unmixing algorithm designed to process hyperspectral data as it is acquired, spectrum-by-spectrum. By recasting the unmixing problem into a state-space framework and leveraging Kalman filtering in a reduced Fourier subspace, the authors achieve a massive computational speedup while maintaining accuracy comparable to traditional "offline" batch-processing methods.

What Problem Does This Paper Address?

In hyperspectral imaging, a single pixel often contains a mixture of several different substances (endmembers). The goal of spectral unmixing (SU) is to decompose these mixed pixels into their constituent "pure spectra" and their respective concentrations.

Traditionally, SU is an "offline" task: you collect the entire image first and then run heavy iterative algorithms like MCR-ALS or NMF. However, this approach is a bottleneck for modern applications like real-time medical diagnostics or microscopy of photosensitive biological samples. In these cases, we need "on-the-fly" processing to monitor results in real-time or to stop the acquisition as soon as enough information is gathered to avoid sample damage. The challenge is doing this sequentially without re-processing the entire dataset every time a new pixel arrives, all while respecting physical constraints like non-negativity.

Methods

The authors propose a method called Kalman Filter-based On-the-fly Spectral Unmixing (KF-OSU). The key innovations include:

  1. State-Space Reformulation: They treat the pure spectra as a "state" that evolves as a random walk. As each new spectral measurement arrives, a Kalman Filter (KF) updates the estimate of these pure spectra.
  2. Fourier Subspace Processing: To handle the high dimensionality of hyperspectral data (often hundreds or thousands of bands), the KF operates in a lower-dimensional subspace defined by the Discrete Fourier Transform (DFT). This significantly reduces the computational load while preserving the linear relationships of the mixing model.
  3. Constrained Regression (ADMM): Kalman filters don't inherently respect non-negativity. To ensure the recovered spectra are physically plausible (i.e., no negative light intensity), the authors use a constrained regression step solved via the Alternating Direction Method of Multipliers (ADMM) to map the subspace estimates back to the original, non-negative data space.
  4. Sequential Concentration Estimation: For each new pixel, concentrations are estimated using the current best guess of the pure spectra via the SUnSAL algorithm.

Datasets

The method was evaluated on three primary datasets:

  • SD1 (Synthetic): 4,000 spectra generated from 5 endmembers, including "pure" pixels to simplify the task.
  • SD2 (Synthetic): A more challenging version of SD1 where all pixels are highly mixed (no pure pixels).
  • RD (Real Data): A Raman hyperspectral image of a chemical mixture (sodium nitrate, calcium carbonate, and sodium sulphate).
  • Acquisition Protocols: They compared a random acquisition order (P1) against a "smart" order (P2) that prioritizes "essential spectral pixels" (the most dissimilar ones) to see how quickly the algorithm converges.

Key Insights and Ideas

  • Constant Complexity: Unlike batch methods whose complexity grows with the number of pixels, KF-OSU has a constant execution time per pixel. This makes it truly scalable for massive datasets.
  • The Power of the Fourier Domain: Using DFT isn't just a compression trick; because the DFT is a linear operator, it perfectly preserves the Linear Mixing Model (LMM), allowing the Kalman Filter to work seamlessly in the compressed space.
  • Smart Ordering Matters: The "aha moment" in their results is that the order of acquisition drastically changes convergence speed. By using a "peeling" strategy to find the most informative pixels first (Protocol P2), the algorithm reaches a stable, accurate estimate much earlier in the process.

Key Results

  • Speed: KF-OSU is orders of magnitude faster for real-time use. It requires only ~0.005 to 0.007 seconds per observation, whereas offline methods like MCR-ALS can take over a second to re-process the growing batch at each step.
  • Accuracy: Despite being an online method (which usually sacrifices some accuracy for speed), KF-OSU achieved Spectral Angle Distance (SAD) and Reconstruction Error (RE) values very close to state-of-the-art offline algorithms.
  • Robustness: The method performed well even on the SD2 dataset, proving it can recover pure spectra even when no "pure" pixels are present in the raw data.

Limitations and Future Work

  • Noise Sensitivity: Because it processes data spectrum-by-spectrum, KF-OSU is slightly more sensitive to noise than batch methods that can "average out" errors across the entire image.
  • Parameter Tuning: The algorithm requires pre-estimating the noise variance ($\sigma^2_e$) and choosing the number of Fourier coefficients ($M$), which may require a small pilot scan or prior knowledge of the hardware.
  • Future Direction: The authors suggest this is a "building block" for active sensing. Future systems could use the real-time unmixing results from KF-OSU to "guide" the microscope, telling it exactly which pixel to sample next to maximize information gain.

Summary updated

BibTeX
@inproceedings{kouakou2024fly,
  author = {Hugues Kouakou and José Henrique de Morais Goulart and Raffaele Vitale and Thomas Oberlin and David Rousseau and Cyril Ruckebusch and Nicolas Dobigeon},
  title = {{On-the-fly spectral unmixing based on Kalman filtering}},
  booktitle = {Chemometrics},
  year = {2024},
  doi = {10.1016/j.chemolab.2024.105252},
}
Figure