| Warp-knitted fabric is a common type of knitted fabric that has a wide range of applications in our daily lives.However,in the production process,environmental factors,operations,processes and other objective factors may lead to more or less defects in the produced cloth.In the detection of the cloth defects,due to the characteristics of the warp knitting machine,the gap between the adjacent yarns of the warp knitted fabric is large,which is likely to cause false detection,resulting in unsatisfactory detection effect and affecting production efficiency.In the existing warp knitting fabric detection,usually an algorithm can only target a few types of defects,and the detection effect is not ideal,the universality is not as good as we expected.Aiming at the difficulties in the detection of the above warp-knitted fabrics,this paper proposes a new detection method based on the idea of connected domain and maximum entropy threshold segmentation,which can effectively solve the problem of false detection in warp-knitted defects detection and has better The universality can automatically detect more types of defects.The method proposed in this paper is based on mathematical morphology processing,and the main research work is as follows.(1)pre-processing a smooth image of the original grayscale image of the cloth by using a number of Gaussian filtering;(2)The pre-processed cloth image is segmented by the improved maximum entropy threshold to obtain a binary image.After the optimization method,the target defect area is set to the foreground,and the normal texture is set as the background;(3)In the processed binary image,there are still some noise interference points.Therefore,this paper analyzes the connected domain in the figure,and uses the open operation to eliminate the interference point whose connected domain is smaller than acertain value as the background color.If it is greater than the value,it is determined as a foreground defect;(4)Find the centroid of the connected point of the target point,draw the contour of the connected domain of the point,and complete the positioning of the warp cloth by acquiring the coordinates of the centroid.The last experiment in this paper uses dozens of kinds of defects and hundreds of sample photos to test.The results show that the method has good accuracy and universality,and can detect and locate dozens of warp-knitted fabrics.It can be applied to actual production and has important practical significance. |