In this paper, we demonstrate a simple automated procedure for the detection of collimation of an optical beam by incorporating the windowed Fourier fringe analysis technique into a deflectometric setup. The experimental arrangement consists of a deflectometry-based system in which light from a laser is expanded and passed through a collimating lens. The transmitted light illuminates a coarse sinusoidal grating. The grating image is directly captured through a charge-coupled device. Typical image patterns corresponding to "in-focus," "at-focus," and "out-of-focus" positions of an optical beam are recorded. Depending on the position of the collimating lens, the grating line spacing and the resulting phase of the emerging wavefront varies. Direct phase measurement using the windowed Fourier transform method has been used to obtain the slope map of the wavefront. The slope of the phase map depicts the diverging, collimated, or converging nature of the optical beam. The positioning error of light beam collimation was approximately 1 μm. The experimental arrangement is simple, low cost, and compact. The technique is fully automatic and provides high resolution, high precision, and good sensitivity.