  We present a new two-snapshot structured light illumination (SLI)
reconstruction algorithm for fast image acquisition. The new algorithm, which
only requires two mutually {\pi} phase-shifted raw structured images, is
implemented on a custom-built temporal focusing fluorescence microscope (TFFM)
to enhance its axial resolution via a digital micromirror device (DMD). First,
the orientation of the modulated sinusoidal fringe patterns is automatically
identified via spatial frequency vector detection. Subsequently, the modulated
in-focal-plane images are obtained via rotation and subtraction. Lastly, a
parallel amplitude demodulation method, derived based on Hilbert transform, is
applied to complete the decoding processes. To demonstrate the new SLI
algorithm, a TFFM is custom-constructed, where a DMD replaces the generic
blazed grating in the system and simultaneously functions as a diffraction
grating and a programmable binary mask, generating arbitrary fringe patterns.
The experimental results show promising depth-discrimination capability with an
axial resolution enhancement factor of 1.25, which matches well with the
theoretical estimation, i.e, 1.27. Imaging experiments on pollen grain samples
have been performed. The results indicate that the two-snapshot algorithm
presents comparable contrast reconstruction and optical cross-sectioning
capability with those adopting the conventional root-mean-square (RMS)
reconstruction method. The two-snapshot method can be readily applied to any
sinusoidally modulated illumination systems to realize high-speed 3D imaging as
less frames are required for each in-focal-plane image restoration, i.e., the
image acquisition speed is improved by 2.5 times for any two-photon systems.
