In order to actualize image preprocessing of defect image on printed circuit board better, an improved self-adaptive image preprocessing method based on the total variation model is proposed. The image preprocessing model based on the total variation norm is analyzed, and its shortcomings are pointed out. The generalized total variation image preprocessing model based on L1 + p norms is discussed, the advantages and disadvantages are analyzed. An improved self-adaptive image preprocessing method based on the total variation model is proposed, the defect image noise of printed circuit board can be eliminated as far as possible by using the proposed method. At the same time, the edge faintness and ladder effect existed in the defect image can be overcomed better after denoising, and the image after denoising has more slippery and exquisite visual effects. The subjective and objective experimental comparisons among the four image preprocessing methods or models are achieved aiming at the defect image of actual printed circuit board, and the result indicates that the proposed method has good effect on defect image preprocessing of printed circuit board. What is more, the results are all detected better by adopting the proposed method for different printed circuit board defects.