A simple collimation technique based on measuring the period of one self-image produced by a diffraction grating is 11 proposed. Transversal displacement of the grating is not required, and then automatic single-frame processing can 12 be performed. The self-image is acquired with a CMOS camera, and the period is computed using the from the lens. The transmittance of the grating is tx 69 P n a n expiqnx being n integer numbers, a n are the Ix 3 ; z 2 ∝ I 0