This paper research the algorithm after image segmentation based on using downsampling to preprocess the image and Otsu to segment the image, because defect region is weakened in the process of preprocessing to remove the texture, which lead to the defect region in the binary image can not reflect the original defect information. In view of this shortcoming, this paper put forward a new method to link the different connected regions which belong to a defect region and the new method solve the problem of weakening the defect region in the process of preprocessing, and then the integral information of defect region can be obtained. At last, the experiments’ results prove the validity of the arithmetic in this paper.