| With the rapid development of science and technology and the general improvement of people’s living standards,people pay more attention to the quality of products when they purchase goods.Therefore,the production of high-quality and high-performance products has become a necessary condition for companies to survive in the fierce industrial competition.For enterprises operating in the textile industry,strict monitoring of textile quality is the most important part of the production process and an important means to ensure the quality of textiles.Since the types of textiles vary widely and the types of defects that appear in the production process are different,it is impractical to design an algorithm that is universal for all types of textiles.Not only is the cost relatively high,but also its applicability is poor.In order to meet market demand and earn profits,textile mills produce large quantities of elastic spandex fabrics with good elasticity and thickness.In view of the type and characteristics of spheroid fabrics that appear in the textile process,there have been some fabric flaw detection devices that have been put into use in the market.The detection algorithm used in the equipment is hereinafter referred to as the "pre-project algorithm." The detection principle of the pre-algorithm is based on the median filter method,which uses the obvious differences between the normal fabric and the post-processing area to set a reasonable threshold detection threshold.However,in the actual detection,it was found that the type of fabric defect that can be detected by the previous algorithmis relatively single,and the detection efficiency depends on the selection of the filter template size,and the applicability and efficiency are not good.Therefore,the method of fabric defect detection is improved and the detection is improved.The applicability and accuracy is a direction we need to focus on.This paper proposes several improved adaptive detection methods for the different types of fabrics to be inspected in a factory.First,the flaw detection algorithm proposed in this paper increases the image preprocessing in the process.The purpose of preprocessing is to highlight the defects and to remove the interference factors in the image that affect the detection effect.Secondly,this paper also improves the principle of the previous algorithm,and proposes two adaptive detection methods: "curve fitting" algorithm and "minimum value" algorithm." Curve-fitting algorithm: This method integrates the image along the vertical axis to obtain a one-dimensional function,which is a one-dimensional curve;then seeks a low-order fit curve of the curve,and then examines the difference function of the two curves.In other words,if there is a defect,it can be detected by the difference function."Minima" algorithm: Calculate the integral function of the image in the same way as the previous method,and then use the minimum and minimum points of the integral function to construct the function(Choose the appropriate template size,replace the value of any point in the integral function with the minimum value in the neighborhood of this point).The difference between the integral function and the minimum function is used to determine the existence and location of defect.The actual detection shows that the two adaptive detection methods have better applicability and accuracy,and they are more prominent in stability and noiseresistance.In the actual production application,taking into account the characteristics and applicability of the two improved algorithms,the combination of the two algorithms is used to ensure the accuracy of the detection,and it has also been well verified to meet the needs of industrial production. |