| Textile industry is a traditional pillar industry,and the quality inspection of textile is one of the important steps in the process of textile production.At present,there are many defect detection methods for solid color fabrics,but for fabrics with patterns,there is no good detection method.However,if the common inspection methods for non-patterned fabrics are applied to the defect detection of patterned fabrics,the results are often not ideal.There are two main reasons:First of all,the background pattern false detection will occur when the traditional method is applied to the defect detection of patterned fabrics.Fabric defect detection methods often need to make the difference between the testing image and the template image to obtain the saliency image that strengthens the defect area and weakens the background texture.However,when facing patterned fabric,due to the imprecise match between the testing image and the template image,a part of the normal fabric pattern is not weakened,but appears on the salient image together with the defects,and the background pattern is misjudged as the defect.Secondly,the common threshold segmentation and morphology methods cannot effectively separate small and insignificant defects from noise.There will inevitably be a variety of noise in the salient image,which comes from the residual fabric pattern and texture,which will be weakened but not completely disappeared.Threshold segmentation and morphological methods were used to distinguish blemishes and noises by gray value and shape size,respectively.However,small defects are similar to noise in morphology,while non-obvious defects are similar to noise in grayscale value.Therefore,it is difficult to distinguish small and inconspicuous defects from noise by using these two methods in processing salient images,resulting in missed detection and false detection.To solve these problems,this paper designs the defect detection method based on lattice affine transformation and the curvature guided graph matching defect detection method.The defect detection method based on lattice affine transformation takes advantage of the continuity of fabric deformation and adopts the idea of "divide and conquer".The method of lattice affine transformation is proposed to simulate fabric deformation in blocks.In this method,the whole fabric image is cut into small windows,namely the lattice,and then the affine transformation model is optimized to obtain the fabric deformation parameters,and then the mapping relationship between the pixels of the testing image and the template image is obtained,and the salient image is calculated according to the mapping relationship.Then the non-spherical clustering method was used to obtain several candidate regions of defects,and finally the volume filtering method was used to determine the defects.At the same time,we design a set of optimization method to solve the lattice affine model to improve the detection speed of the algorithm.Curvature-guided image matching defect detection method introduces the concept of curvature similarity,because we find that the curvature feature of the image shows stronger stability than the gray feature under the condition of image deformation.Based on this,we design a similarity evaluation index based on curvature features,and then according to this index,we use the approximate least bipartite graph matching algorithm to determine the mapping relationship between the pixels of the testing image and the template image,and calculate the "mismatch points".Finally,the defects were determined by the clustering of the mismatch points and the calculation of the density distribution characteristics of the mismatch points.Finally,based on the two proposed methods we designed and implemented a real-time defect detection system combining hardware and software and tested it on the experimental platform,realizing the original intention of this design. |