An innovative optical method is introduced for the beam quality measurement of any arbitrary transverse mode based on the reconstruction of the mode from a few-frame image of the beam cross-section. This is performed by the decomposition of a mode to its basic Hermite–Gaussian modal coefficients. The performance of the proposed method is examined through M2-factor measurement of the beam of a Nd:YAG laser which was forced to oscillate in a certain mode using a crossed rectangular intracavity aperture. Obtained results have shown that this method can be alternatively replaced for the hologram- and ISO-based techniques recently exploiting for beam quality measurement regardless of the mode type and the position of utilized CCD camera along the beam direction.