The problems of low manual detection rate, high false detection rate, and high labor intensity are aimed at in the aircraft rivet defects detection. Rivet defects detection is studied in this paper, and a method is proposed based on image processing. In this paper, image processing method is used to detect and identify the defects of rivet surface in the riveting process of aircraft. A dynamic threshold adjustment method is used to determine the threshold of binarization. Compared with other methods to determine the threshold, the method selected in this paper can obtain more accurate defect image in the pre-processing stage. The false detection rate is lower when the defect is identified.