Skip to content

MATLAB implementation of a spectral-domain OCT A-scan processing pipeline using synthetic data.

Notifications You must be signed in to change notification settings

Arman-Rajaei/OCT-A-Scan-Processing-MATLAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OCT A-scan Processing Pipeline in MATLAB

This repository presents a MATLAB implementation of a spectral-domain OCT A-scan processing pipeline using synthetic data.
The goal is to demonstrate the core signal-processing steps required to reconstruct depth-resolved OCT signals and to visualize the effect of each key step.

The pipeline is implemented as a live MATLAB script (.mlx). In particular, dispersion phase mismatch and compensation are explained in detail in the script, including the mathematical background and intuition.


Overview of the Pipeline

The processing chain demonstrated in this project includes:

  • Synthetic OCT interferogram generation for multiple reflectors
  • k-linearization (resampling to uniform wavenumber spacing)
  • DC (background) removal
  • Apodization using a Hann window
  • Dispersion phase mismatch simulation and compensation
  • FFT-based depth reconstruction
  • Conversion from frequency domain to physical depth (mm)

Key Demonstrations and Results

1. Effect of k-linearization

FFT-based depth reconstruction requires uniform sampling in wavenumber (k).
This figure compares the A-scan magnitude obtained with and without k-linearization.

k-linearization effect

Without k-linearization, reflector peaks are broadened and distorted.
After resampling to a uniform k-grid, peaks become sharper and correctly localized.


2. Effect of DC Removal

The OCT interferogram contains a strong DC (background) component that appears as a dominant low-depth peak in the FFT.

DC Removal Effect

Subtracting the mean suppresses the DC peak and improves visibility of the true depth-resolved signal.


3. Effect of Hann Window (Apodization)

Finite-length interferograms introduce sidelobes in the depth profile.
Applying a Hann window reduces sidelobes at the cost of slight axial resolution loss.

Hann Window Effect

This tradeoff is clearly visible in the depth-domain FFT magnitude.


4. Final A-scan with Physical Depth Axis

After k-linearization, DC removal, windowing, and dispersion compensation, the FFT result is converted to a physical depth axis.

Final A-scan with depth axis

The reconstructed A-scan correctly recovers the reflector depths used in the synthetic model.


Notes

  • Synthetic data is used to allow full control over reflector positions and dispersion effects.
  • Dispersion compensation is described in detail inside the live script, including the mathematical model (quadratic and cubic phase terms) and how the compensating phase is applied.
  • The depth axis assumes uniform k-spacing and vacuum propagation; refractive index effects can be incorporated if needed.

Files

  • oct_ascan_processing.mlx
    Live MATLAB script containing the full pipeline, detailed dispersion explanation, and visualizations.

  • Figures/
    Key result figures used in this README.


Requirements

  • MATLAB (tested with recent versions)
  • Signal Processing Toolbox (for hilbert and window functions)

πŸ§‘β€πŸ’» Author

Arman Rajaei

About

MATLAB implementation of a spectral-domain OCT A-scan processing pipeline using synthetic data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published