The Gamma nonlinearity is one of the most important factors for the phase error in digital phase measuring profilometry. The phase error model resulting from the Gamma distortion is deduced, which reflects the relation between the phase error and the harmonic coefficients. The recurrence formula of the harmonic coefficients is proved, which is influenced by the Gamma value. Based on this recurrence rule, a Gamma calibration method based on discrete Fourier transform is proposed. Discreet Fourier transform is applied to obtain the harmonic coefficients. Then, this Gamma value is computed and adopted to correct the nonlinearity. In the experiment, the mean Gamma value in the whole image is employed into the gamma pre-encoding process. With the proposed technique, the phase error is reduced by 77.5% in the standard variance and the surface quality is enhanced.