Skip to content

ValentinGilet/Two-Pass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Two-Pass

📜 Acquisition Protocol

The Two-Pass algorithm is designed to accelerate hyperspectral acquisition, traditionally performed point-by-point (e.g., snake scan, raster scan).

The acquisition process is as follows:

  1. A fast initial acquisition (at low SNR) is performed for each point in the imaged area.

  2. The data undergoes two processing paths:

    • Spatial Compression:
      • Dimension reduction is applied along the spectral axis to generate a single, high-contrast image of the sample.
      • The resulting image is segmented into super-pixels.
      • For each super-pixel, a representative (centroid) is selected, effectively performing spatial compression.
    • Spectral Compression:
      • Each spectrum from the hyperspectral image is decomposed in the Fourier domain using the DFT.
      • The first harmonics are extracted to identify the essential pixels, corresponding to spectral compression.
  3. The subset of centroid pixels is unmixed relative to the essential pixels to produce a concentration matrix.

  4. The essential pixels are rescanned at a slower pace (with high SNR).

Finally, the super-pixel map, the concentration matrix of centroids, and the high-SNR essential pixels are recombined to reconstruct the hyperspectral image.


📊 Results

Using this protocol, the following results can be obtained (the "UnSCR" column corresponds to Two-Pass):

Spatial Reconstruction

Spectral Reconstruction

Acquisition Time Comparison


🚀 Installation

Clone the repository and navigate to the project directory:

conda create -n twopass python=3.9 -y
conda activate twopass
git clone https://github.com/ValentinGilet/Two-Pass.git
cd Two-Pass
pip install -r requirements.txt

📚 Reference

V. Gilet et al., “Superpixels meet essential spectra for fast Raman hyperspectral microimaging,” Opt. Express, vol. 32, no. 1, p. 932, Jan. 2024, doi: 10.1364/OE.509736.

About

Python implementation for Two-Pass Fast Raman Hyperspectral Microimaging based on Essential Information. Associated with the Optics Express (2024) publication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages