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.
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)
FFT-based depth reconstruction requires uniform sampling in wavenumber (k).
This figure compares the A-scan magnitude obtained with and without k-linearization.
Without k-linearization, reflector peaks are broadened and distorted.
After resampling to a uniform k-grid, peaks become sharper and correctly localized.
The OCT interferogram contains a strong DC (background) component that appears as a dominant low-depth peak in the FFT.
Subtracting the mean suppresses the DC peak and improves visibility of the true depth-resolved signal.
Finite-length interferograms introduce sidelobes in the depth profile.
Applying a Hann window reduces sidelobes at the cost of slight axial resolution loss.
This tradeoff is clearly visible in the depth-domain FFT magnitude.
After k-linearization, DC removal, windowing, and dispersion compensation, the FFT result is converted to a physical depth axis.
The reconstructed A-scan correctly recovers the reflector depths used in the synthetic model.
- 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.
-
oct_ascan_processing.mlx
Live MATLAB script containing the full pipeline, detailed dispersion explanation, and visualizations. -
Figures/
Key result figures used in this README.
- MATLAB (tested with recent versions)
- Signal Processing Toolbox (for
hilbertand window functions)
Arman Rajaei



