e proposed and demonstrated a digital method of dispersion compensation suitable for spectral-domain optical coherence tomography. The wavelength coordinate of the coherence spectrum was calibrated digitally using a two-order polynomial. A software-based scheme was introduced to determine the polynomial coefficients of the polynomial fitting spectrum wavelength. Therefore, the spectrum deformation introduced by dispersion can be compensated effectively. This method was experimentally validated by in vivo imaging an early-stage chick embryonic heart.