Single-Pixel Imaging from Randomly-Structured Illumination

Course project for MIT 6.C67, Fall 2023

Working with Shruti Sharma and Elise Uyehara

MATLAB Python CUDA Compressed Sensing Wavelength-Dependent Scattering TV Minimization GPU Acceleration InGaAs Photodiode

Project Overview

Single-pixel imaging replaces the costly focal-plane array of a conventional camera with a single "bucket" detector. An object is illuminated, one pattern at a time, and the detector records only the total power returning for each pattern.

If those patterns are mutually uncorrelated and the object is sparse or compressible, modern compressed-sensing theory assures that a full image can be reconstructed from far fewer measurements than pixels. The 2016 Optics Letters paper by Shin, Bosworth & Foster showed that wavelength-dependent speckle provides an elegant route to such random patterns, and our project scales and accelerates their concept to megapixel dimensions.

Single-pixel imaging experimental setup showing the external-cavity laser, fiber, and TiO₂ diffuser

Figure 1: Experimental setup for single-pixel imaging with wavelength-dependent speckle

Optical Principle and Hardware Implementation

The illumination source is a rapidly swept external-cavity laser whose wavelength hops in 0.1 nm steps from 1470 nm to 1570 nm. At the distal end of a single-mode fiber, a 1.5 mm-thick titanium-dioxide (TiO₂) coating acts as a multiply-scattering slab.

Every wavelength that exits the fiber therefore erupts into a distinct, yet repeatable, speckle field. Because the diffuser sits in the illumination path and not the detection path, the scene sees a new random mask at each wavelength while the returning light is collected en masse by an InGaAs photodiode.

The TiO₂ thickness is a trade-off: thinner coatings generate patterns that are highly correlated from one wavelength to the next; thicker coatings yield better randomness but become hypersensitive to minute wavelength drift. The 1.5 mm layer chosen by Shin et al. places the correlation matrix close to diagonal while remaining stable across repeated sweeps.

Diagram showing the wavelength sweep from 1470nm to 1570nm and corresponding speckle patterns

Figure 2: Wavelength sweep and corresponding speckle pattern generation

Calibration Data and Sensing Matrix

Before any unknown object is imaged, the speckle patterns themselves must be recorded. We send the wavelength sweep through the fiber once while a reference InGaAs NIR camera captures the speckle at the object plane. Vectorising each 218 x 218-pixel frame produces a 1,000 row sensing matrix \( A \in \mathbb{R}^{1000 \times 47524} \) which maps an unknown scene f to a predicted measurement vector g.

Correlation analysis of these frames confirms that adjacent rows of A are almost orthogonal, satisfying the incoherence requirement of compressed-sensing and ensuring that no small subset of patterns dominates the measurement process.

Correlation matrix showing near-diagonal structure of speckle masks

Figure 3: Correlation matrix of 1,000 speckle masks showing near-diagonal structure

Image Acquisition and Reconstruction Algorithm

With the calibration complete, the same laser sweep illuminates the unknown object. For each of the 1,000 wavelengths the photodiode records a single scalar, building the measurement vector g while consuming only 12% of the data a Nyquist-sampled focal-plane array would require.

Because the system of equations g = Af is under-determined, a naïve pseudo-inverse produces unacceptable artifacts. Instead we solve

$$\min_{f} \frac{1}{2} \| g - Hf \|_2^2 + \lambda \textbf{TV}(f)$$

where the Total Variation minimization algorithm TV(·) promotes gradient sparsity.

Total-variation minimization treats an image as a function whose “total variation” equals the integral of the magnitude of its gradient i.e. the sum of all edge strengths. By adding this quantity as a penalty in the reconstruction objective, the algorithm prefers images that keep sharp, necessary edges but suppress oscillatory, small-scale fluctuations that are likely to be noise. Because the TV term is convex but not differentiable, solvers such as ADMM or primal–dual schemes iteratively alternate between enforcing data consistency and shrinking the gradient until the reconstruction fits the measurements while remaining as piece-wise smooth (low-variation) as possible.

We implemented the TVAL3 algorithm on a consumer GPU, trimming reconstruction time from 4.2s to 0.7s per frame while simultaneously tuning λ by the L-curve criterion.

For a USAF-1951 resolution target, line pairs down to Group 4, Element 5 remain resolvable even when the number of measurements is reduced eight-fold beyond the original 12% budget, although contrast begins to erode as shot noise dominates the weakest bars.

Image Reconstruction Using Pseudo-Inverse and TV Minimization

Figure 4: Pseudo-Inverse and TV minimization Image reconstruction

Empirical Comparison with the Optics Letters Benchmark

Shin et al. reconstruct a 218 x 218-pixel scene from 1,000 measurements (47.5x sub-Nyquist factor) and attribute the success to three intertwined factors:

  • Random yet repeatable masks: the 0.1 nm step is fine enough that consecutive speckle fields share only 3% correlation, but gross drift over a 2s sweep is still negligible.
  • Low-loss collection optics: a 20x objective recovers roughly one-fifth of the light that survives the diffuser, preserving signal-to-noise ratio.
  • Total-variation regularization: natural scenes exhibit sparse gradients; TV minimization exploits that prior while retaining sharp edges.

Our project extends those ideas to an 82k-pixel object space (360 x 228) and shows that, once GPU-accelerated, TV minimization remains practical for near-real-time operation.

Applications and Future Work

Because the diffuser lives inside the illumination fiber, bending or coiling the fiber changes neither the mask statistics nor the calibration and is therefore a major advantage for micro-endoscopy and mechanically constrained probe heads.

Future avenues include:

  • Learned image priors: (e.g., deep denoisers) as proximal operators to boost perceptual quality without hallucination;
  • Adaptive wavelength selection: that queries only those masks most informative for the evolving reconstruction, thereby cutting acquisition time;
  • Closed-loop laser-power stabilisation: to suppress residual measurement drift during long sweeps.

Personal Contributions

I helped construct the setup and wrote the MATLAB/Python pipeline that:

  • registers the calibration frames into a sparse CSR matrix,
  • ports TVAL3 to CUDA with automatic λ-selection, and
  • generates synthetic mask-scene pairs for convergence benchmarking.

GPU acceleration alone delivered a 6x speed-up, making the method viable for exploratory video-rate experiments.

References

  • E. J. Candes & M. B. Wakin, "An Introduction to Compressive Sampling," IEEE Signal Processing Magazine 25 (2), 21-30 (2008).
  • J. Shin, J. P. Bosworth & M. A. Foster, "Single-pixel imaging using compressed sensing and wavelength-dependent scattering," Optics Letters 41 (5), 886-889 (2016).
  • G. M. Gibson et al., "Single-pixel imaging 12 years on: a review," Optics Express 28 (19), 28190-28234 (2020).
  • C. Li, W. Yin, H. Jiang & Y. Zhang, "An efficient augmented Lagrangian method with applications to total-variation minimisation," Computational Optimisation and Applications 56, 507-530 (2013).
  • D. Ulyanov, A. Vedaldi & V. Lempitsky, "Deep Image Prior," in CVPR 2018.

Interested in this project?

I'm always open to discussing new opportunities and exciting projects. Let's create something amazing together!

Get In Touch