In ultrashort pulse laser applications, optical dispersion seriously affects the energy concentration in the laser pulse duration and lowers the peak power. Accordingly, this study proposes a rapid dispersion estimation mechanism to facilitate the compensation of optical dispersion using a closed-loop control system. In the proposed approach, the optical dispersion information of the laser pulse is estimated directly from a frequency-resolved optical gating trace without the need for an iterative pulse-retrieval algorithm. In particular, the group delay dispersion (GDD) is determined from frequency and delay marginals, which are related to the laser spectrum and intensity autocorrelation, respectively, using a simple lookup table approach. The accuracy of the estimated GDD results is confirmed via a comparison with the spectral phase distribution of the electric field reconstructed using the principal component generalized projections algorithm. It is shown that the computation time of the proposed direct estimation method is around 13 times faster than that of the traditional iterative algorithm. It thus provides a feasible approach for enabling the real-time compensation of ultrafast laser pulse compression. Moreover, in a multiphoton-excited fluorescence imaging application, the proposed pulse compression mechanism yields an effective improvement in the intensity and contrast of the reconstructed image due to the increased nonlinear optical excitation efficiency of the optimized laser pulses.