Camera/projector defocusing is a method of generating sinusoidal images for binary images in fringe projection profilometry. While the most appropriate degree of defocus is often difficult to determine. Therefore, in this paper, it is proposed a defocusing degree evaluation algorithm. This algorithm is to calculate the image gray value error E of the fitted sinusoidal image and the actual image based on image difference and Levenberg-Marquardt (LM) iteration method. Firstly, differential operation is performed on the image captured by the camera. And then, the LM iteration method is executed on the difference image. The phase fluctuation error E<sub>M</sub> is quantitatively described as E ∙ S α by image gray range S, where α is constant which can be determined experimentally. For a system with no defocusing, the measured phase fluctuation error of ± 0.05 radian, this can be reduced to ± 0.01 radian under the optimal defocus degree obtained by this method. The algorithm can handle one image within 20 ms, which meets the requirements of real-time calculation.