Polyester filament broken filament detection method and system based on image processing technology
By using visible light and near-infrared LED lights on the polyester filament production line for image fusion, combined with canny edge detection and grayscale symbiosis matrix to extract features, comprehensive feature vectors are generated for deep learning network training, which solves the problems of weak adaptability and high computing resources in the existing technology, and achieves efficient and accurate wool detection.
Patent Information
- Application Number
- CN202411708982.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The existing polyester filament wool detection method based on image processing technology is weak in adaptability in complex production environments and has high computing resource requirements, which affects real-time detection efficiency.
The visible LED lamp and near-infrared LED lamp are used to simultaneously collect images of polyester filaments, and the comprehensive image is generated through image fusion. The edge features and texture features are extracted in combination with canny edge detection and grayscale symbiosis matrix to generate comprehensive feature vectors, and the wool filament detection model is trained through deep learning network.
It improves the accuracy and efficiency of wool detection, enhances adaptability and real-time detection capabilities in complex environments, and reduces the requirements for computing resources.
Smart Images

Figure CN119887620A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of chemical fiber quality detection, and in particular to a polyester filament hair detection method and system based on image processing technology. Background Art
[0002] In the production process of polyester filament, hair will have a significant impact on product quality. These hairs not only affect the appearance quality of polyester filament, but may also affect the equipment of the production line in subsequent processing. Traditional hair detection methods mostly rely on manual inspection, which often has problems such as low detection efficiency and high false alarm and missed alarm rates. It is difficult to meet the quality control needs of large-scale production, resulting in production losses and waste of resources. In order to overcome these shortcomings, automated detection solutions based on image processing technology have gradually attracted attention. However, existing image processing technology is still insufficient in feature extraction, especially when the lighting conditions change and the background is disturbed. It is difficult to effectively extract the features of hair on polyester filament. Therefore, a new method is urgently needed to improve the accuracy and efficiency of hair detection.
[0003] In the prior art, publication number CN111415349B discloses a polyester filament hair detection method based on image processing technology, which obtains a clear image of the polyester filament to be tested in a dark box, calibrates the correspondence between the pixels of the polyester filament image to be tested and the actual size, and pre-processes the calibrated polyester filament image through a multi-directional span filtering joint method; uses a dual-image dual-threshold silk stem and hair segmentation method to process the pre-processed polyester filament image, segments the silk stem, and simultaneously uses a dual-image dual-threshold silk stem and hair segmentation method to segment the hair; determines the background position from the non-silk stem position and the non-hair position, calculates the length of each hair strand using a view calibration method, and performs statistical processing to detect and identify the hair strand.
[0004] The main problems with the above scheme are: it relies on obtaining clear images in a dark box, requires ensuring uniform light and low background noise, is difficult to operate in a complex production environment, and has weak adaptability; and the dual-image dual-threshold segmentation method has high requirements on computing resources and a long processing time, which will affect the efficiency of real-time detection.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The object of the present invention is to provide a polyester filament hair detection method and system based on image processing technology to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A polyester filament hair detection method based on image processing technology, the specific steps include:
[0009] Step 1: Install a visible light LED lamp and a near-infrared LED lamp side by side directly above the polyester filament production line, ensuring that they are facing the running track of the polyester filament and keep a distance of 50 to 100 cm from the polyester filament production line;
[0010] Step 2: Pass the polyester filament sample with known hair distribution data through the irradiation area of the visible light LED lamp and the near-infrared LED lamp, collect visible light images and near-infrared images, scale the collected images to a size of 224×224, and convert the images into grayscale images after denoising, set them as the first recognition image and the second recognition image respectively, establish a plane rectangular coordinate system in the first recognition image, and map the second recognition image to the first recognition image one by one in the coordinate system;
[0011] Step 3: Taking a weighted average of the grayscale values of the pixels of the first recognition image and the second recognition image, and generating a composite image by image fusion;
[0012] Step 4: extract edge pixels of the comprehensive image through canny edge detection, generate an edge pixel map of the comprehensive image, extract texture features of the comprehensive image based on the gray-level co-occurrence matrix, generate edge feature vectors based on the edge pixel map, generate texture feature vectors based on texture features, and combine the edge feature vector and texture feature vector to generate a comprehensive feature vector;
[0013] Step 5: Generate a deep learning network, take the comprehensive feature vector of the polyester filament sample as input and the hair distribution data as a label, input it into the deep learning network for training, and obtain a hair detection model whose input value is the comprehensive feature vector and whose output value is the hair distribution data;
[0014] Step 6: Collect visible light images and near-infrared images of the polyester filaments to be detected in real time, generate a comprehensive feature vector according to the above steps, input the comprehensive feature vector into the trained hair detection model, and output the hair distribution data of the polyester filaments to be detected.
[0015] Furthermore, the visible light LED lamp is a white light LED lamp, and the near-infrared LED lamp is a near-infrared LED lamp with a wavelength of 850nm.
[0016] Furthermore, a white light LED lamp and a near infrared LED lamp are respectively fixed on both sides of the image acquisition device, and the angle between the irradiation area of the LED lamp and the polyester filament production line is between 30° and 45°;
[0017] In the first recognition image, the column where the leftmost pixel of the first recognition image is located is used as the y-axis, and the row where the bottommost pixel is located is used as the x-axis, to establish a plane rectangular coordinate system in which all pixels are in the first quadrant and each pixel has unique coordinates.
[0018] Furthermore, the weighted average of pixels is based on the formula:
[0019] I fus (x,y)=α·I vis (x,y)+(1-α)·I NIR (x,y)
[0020] Among them, I fus (x, y) represents the gray value of the pixel with coordinates (x, y) in the integrated image, I vis (x, y) represents the grayscale value of the pixel with coordinates (x, y) in the first recognition image, NIR (x, y) represents the grayscale value of the pixel with coordinates (x, y) in the second recognition image, and α represents the weight of the pixel of the first recognition image in the image fusion.
[0021] Furthermore, the principle for generating the edge strength of the composite image is:
[0022] For each pixel in the composite image, the pixel and the neighboring pixel are convolved with the horizontal template and the vertical template of the Prewitt operator to generate the grayscale difference of the pixel in the horizontal and vertical directions. The formula is:
[0023]
[0024] Among them, P X represents the horizontal template of the Prewitt operator, P Y represents the vertical template of the Prewitt operator, G x Represents the horizontal difference of the pixel, G y Represents the vertical difference of the pixel point, (x, y) represents the coordinates of the pixel point;
[0025] The gradient amplitude of each pixel is generated based on the grayscale difference in the horizontal and vertical directions. The formula is:
[0026]
[0027] Among them, G(x,y) represents the gradient amplitude of the pixel point with coordinates (x,y), G x Represents the horizontal difference of the pixel, G y 5 represents the vertical difference of the pixel;
[0028] An edge threshold is preset. When the gradient amplitude of a pixel point is higher than the edge threshold, the pixel point is retained as an edge pixel point, and all edge pixels constitute an edge pixel map.
[0029] Furthermore, the principle for extracting the texture features of the comprehensive image is:
[0030] The formula for generating the gray-level co-occurrence matrix is:
[0031]
[0032] Wherein, P(i,j) represents the value of the i-th row and j-th column in the gray-level co-occurrence matrix, i represents the gray value of the pixel value in the integrated image, j represents the gray value of another pixel value different from i in the integrated image, and i=0, 1, 2, ..., N, j=0, 1, 2, ..., N, N represents the total number of gray levels appearing in the image, g(x,y) represents the gray value of the pixel point with coordinates (x,y) in the integrated image, g(x+dx,y+dy) represents the gray value of the pixel point with coordinates (x+dx,y+dy) in the integrated image, and dx and dy represent the relative displacement between pixels;
[0033] Based on the gray level co-occurrence matrix, the contrast of the integrated image is extracted according to the following formula:
[0034]
[0035] Where C represents the contrast of the integrated image;
[0036] The energy of the composite image is extracted based on the formula:
[0037]
[0038] Where E represents the energy of the integrated image;
[0039] The homogeneity of the composite image is extracted based on the formula:
[0040]
[0041] Among them, H represents the homogeneity of the comprehensive image.
[0042] Furthermore, the principle for generating the comprehensive feature vector is:
[0043] The formula for generating edge feature vectors is:
[0044]
[0045] F L =[L avg ,L std ]
[0046] Among them, L avg represents the average edge strength of edge pixels, (x0, y0) represents the coordinates of the pixel in the edge pixel map, X represents the number of pixels in the horizontal direction of the edge pixel map, Y represents the number of pixels in the vertical direction of the edge pixel map, M represents the total number of pixels in the edge pixel map, and M = X·Y, G0(x0, y0) represents the gradient amplitude of the edge pixel with coordinates (x0, y0), L std Indicates the edge standard deviation of edge pixels, F L Represents the edge feature vector; the formula for generating the texture feature vector is:
[0047] F T =[C,E,H]
[0048] Among them, F T represents the texture feature vector, C, E, and H represent the contrast, energy, and homogeneity of the integrated image, respectively;
[0049] The resulting comprehensive feature vector is:
[0050] K=[F L ,F T ]
[0051] Among them, K represents the comprehensive feature vector.
[0052] The present invention also provides a polyester filament hair detection system based on image processing technology, and the system is used to implement the above-mentioned polyester filament hair detection method based on image processing technology, which specifically includes:
[0053] The equipment installation module is used to install a visible light LED lamp and a near-infrared LED lamp side by side directly above the polyester filament production line, ensuring that they are directly facing the running track of the polyester filament and maintaining a distance of 50 to 100 cm from the polyester filament production line;
[0054] An image acquisition module is used to pass a polyester filament sample with known hair distribution data through the irradiation area of a visible light LED lamp and a near-infrared LED lamp, collect visible light images and near-infrared images, scale the collected images to a size of 224×224, convert the images into grayscale images after denoising, set them as a first recognition image and a second recognition image respectively, establish a plane rectangular coordinate system in the first recognition image, and map the second recognition image to the first recognition image one by one in the coordinate system;
[0055] An image fusion module, used for weighted averaging the grayscale values of pixels of the first recognition image and the second recognition image, and generating a composite image by image fusion;
[0056] A feature extraction module is used to extract edge pixel points of a comprehensive image through canny edge detection, generate an edge pixel map of the comprehensive image, extract texture features of the comprehensive image based on a gray-level co-occurrence matrix, generate an edge feature vector based on the edge pixel map, generate a texture feature vector based on the texture features, and generate a comprehensive feature vector by combining the edge feature vector and the texture feature vector;
[0057] A model training module is used to generate a deep learning network, which takes the comprehensive feature vector of the polyester filament sample as input and the hair distribution data as a label, and inputs it into the deep learning network for training to obtain a hair detection model whose input value is the comprehensive feature vector and whose output value is the hair distribution data;
[0058] The data output module is used to collect visible light images and near-infrared images of the polyester filaments to be detected in real time, generate a comprehensive feature vector according to the above steps, input the comprehensive feature vector into the trained hair detection model, and output the hair distribution data of the polyester filaments to be detected.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] The present invention simultaneously collects images of polyester filaments under visible light and near-infrared light. Visible light provides rich colors and surface details, while near-infrared images can see through materials at a certain depth to capture the internal features of the materials. By fusing the images in the two bands using a weighted average method, the information of the two bands can be combined to more effectively extract and analyze target features, making the detection of polyester filaments more comprehensive and accurate.
[0061] The present invention also extracts edge features and texture features through canny edge detection and grayscale co-occurrence matrix, and generates edge feature vectors and texture feature vectors respectively, combines the shape and surface structure of polyester filaments, so that the expression of features is more comprehensive and accurate, the canny edge detection algorithm has strong robustness in a noisy environment, and can effectively suppress interference, and the texture features extracted by the grayscale co-occurrence matrix can remain stable under different lighting and conditions, thereby improving the adaptability of the overall detection scheme and improving the recognition performance in complex scenes; the deep learning network is trained through polyester filament samples with known hair separation conditions, and then a hair detection model is generated. The model can accurately learn the characteristics and separation conditions of hair, adapt to diverse input features, thereby improving the versatility of the system, and through continuous detection, new sample data is generated, the model is continuously optimized and updated, and the detection accuracy of the model is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 This is a schematic diagram of a method flow of an embodiment of the present invention;
[0063] Figure 2Schematic diagram of system modules according to an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0065] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0066] Example:
[0067] See also Figure 1 , the present invention provides a technical solution:
[0068] A polyester filament hair detection method based on image processing technology, the specific steps include:
[0069] Step 1: Install a visible light LED lamp and a near-infrared LED lamp side by side directly above the polyester filament production line, ensuring that they are facing the running track of the polyester filament and keep a distance of 50 to 100 cm from the polyester filament production line;
[0070] In this embodiment, the visible light LED lamp is a white light LED lamp, and the near-infrared LED lamp is a near-infrared LED lamp with a wavelength of 850nm.
[0071] Step 2: Pass the polyester filament sample with known hair distribution data through the irradiation area of the visible light LED lamp and the near-infrared LED lamp, collect visible light images and near-infrared images, scale the collected images to a size of 224×224, and convert the images into grayscale images after denoising, set them as the first recognition image and the second recognition image respectively, establish a plane rectangular coordinate system in the first recognition image, and map the second recognition image to the first recognition image one by one in the coordinate system;
[0072] In this embodiment, the polyester filament portion irradiated by the LED light is divided into several small detectable areas, and the presence or absence of hair is determined for each area. After the presence or absence of hair in all areas of this part of the polyester filament is determined, the hair area of the polyester filament is generated, which is the hair distribution data;
[0073] In this embodiment, the white light LED lamp and the near infrared LED lamp are respectively fixed on both sides of the image acquisition device, and the angle between the irradiation area of the LED lamp and the polyester filament production line is between 30° and 45°;
[0074] The lighting angle is set to 30°~45° to reduce the impact of light reflection and enhance the contrast of the image. The formula for converting the denoised image into a grayscale image is:
[0075] Z=0.299·R+0.587·G+0.114·B
[0076] Among them, Z represents the gray value of the pixel, R, G, and B represent the red, green, and blue channel values of the pixel respectively;
[0077] In the first recognition image, the column where the leftmost pixel of the first recognition image is located is used as the y-axis, and the row where the bottommost pixel is located is used as the x-axis, to establish a plane rectangular coordinate system in which all pixels are in the first quadrant and each pixel has unique coordinates.
[0078] Step 3: Taking a weighted average of the grayscale values of the pixels of the first recognition image and the second recognition image, and generating a composite image by image fusion;
[0079] In this embodiment, the weighted average of the pixels is based on the formula:
[0080] I fus (x,y)=α·I vis (x,y)+(1-α)·I NIR (x,y)
[0081] Among them, I fus (x, y) represents the gray value of the pixel with coordinates (x, y) in the integrated image, I vis (x, y) represents the grayscale value of the pixel with coordinates (x, y) in the first recognition image, NIR(x,y) represents the grayscale value of the pixel with coordinates (x,y) in the second recognition image, and α represents the weight of the pixel in the first recognition image in image fusion. Visible light images can usually capture rich detail information in the image body, including color, texture, and contour. Near-infrared images are mainly used to identify defective parts in the image body, that is, the hair in polyester filaments. Therefore, the weight value is α=0.6, which fully utilizes the advantages of near-infrared images while retaining visible light details.
[0082] Step 4: extract edge pixels of the comprehensive image through canny edge detection, generate an edge pixel map of the comprehensive image, extract texture features of the comprehensive image based on the gray-level co-occurrence matrix, generate edge feature vectors based on the edge pixel map, generate texture feature vectors based on texture features, and combine the edge feature vector and texture feature vector to generate a comprehensive feature vector;
[0083] In this embodiment, the principle for generating the edge strength of the comprehensive image is:
[0084] For each pixel in the composite image, the pixel and the neighboring pixel are convolved with the horizontal template and the vertical template of the Prewitt operator to generate the grayscale difference of the pixel in the horizontal and vertical directions. The formula is:
[0085]
[0086] Among them, P X represents the horizontal template of the Prewitt operator, P Y represents the vertical template of the Prewitt operator, G x Represents the horizontal difference of the pixel, G y Represents the vertical difference of the pixel point, (x, y) represents the coordinates of the pixel point;
[0087] The gradient amplitude of each pixel is generated based on the grayscale difference in the horizontal and vertical directions. The formula is:
[0088]
[0089] Among them, G(x,y) represents the gradient amplitude of the pixel point with coordinates (x,y), G x Represents the horizontal difference of the pixel, G y Indicates the vertical difference of the pixel;
[0090] An edge threshold is preset. When the gradient amplitude of a pixel point is higher than the edge threshold, the pixel point is retained as an edge pixel point, and all edge pixels constitute an edge pixel map.
[0091] When setting the edge threshold, the initial edge threshold is set to 70% of the maximum gradient amplitude of all pixels. After setting the initial edge threshold, edge pixel extraction is performed, and the expert evaluates the effect of edge pixel extraction. If there are too few edge pixels, the edge threshold is reduced. If there are too many edge pixels, the edge threshold is increased.
[0092] The principle for extracting the texture features of the comprehensive image is:
[0093] The formula for generating the gray-level co-occurrence matrix is:
[0094]
[0095] Wherein, P(i,j) represents the value of the i-th row and j-th column in the gray-level co-occurrence matrix, i represents the gray value of the pixel value in the integrated image, j represents the gray value of another pixel value different from i in the integrated image, and i=0, 1, 2, ..., N, j=0, 1, 2, ..., N, N represents the total number of gray levels appearing in the image, g(x,y) represents the gray value of the pixel point with coordinates (x,y) in the integrated image, g(x+dx,y+dy) represents the gray value of the pixel point with coordinates (x+dx,y+dy) in the integrated image, and dx and dy represent the relative displacement between pixels;
[0096] The gray-level co-occurrence matrix reflects the probability of occurrence of pixel pairs with different gray values at a specific direction and distance;
[0097] Based on the gray level co-occurrence matrix, the contrast of the integrated image is extracted according to the following formula:
[0098]
[0099] Where C represents the contrast of the integrated image;
[0100] Contrast reflects the intensity of the change in grayscale values in an image. The higher the contrast, the more obvious the texture change in the image. It is usually used to identify textures with high contrast. In hair detection, higher contrast can identify different types of textures and distinguish between long silk and hair.
[0101] The energy of the composite image is extracted based on the formula:
[0102]
[0103] Where E represents the energy of the integrated image;
[0104] Energy reflects the uniformity of image texture. The higher the energy, the more uniform the texture in the image. It is usually used in areas with less complexity and less changes. In hair detection, it can distinguish between regular filament structures and irregular hair structures.
[0105] The homogeneity of the composite image is extracted based on the formula:
[0106]
[0107] Among them, H represents the homogeneity of the comprehensive image.
[0108] Homogeneity reflects the similarity between different grayscale values and is used to identify areas with consistent texture in an image. In hair detection, it can identify continuous areas of long filaments and sudden areas of hair.
[0109] The principle for generating the comprehensive feature vector is:
[0110] The formula for generating edge feature vectors is:
[0111]
[0112] F L =[L avg ,L std ]
[0113] Among them, L avg represents the average edge strength of edge pixels, X represents the number of pixels in the horizontal direction of the edge pixel map, Y represents the number of pixels in the vertical direction of the edge pixel map, M represents the total number of pixels in the edge pixel map, and M = X·Y, G0(x,y) represents the gradient amplitude of the edge pixel point, L std Indicates the edge standard deviation of edge pixels, F L represents the edge feature vector;
[0114] The average edge strength reflects the overall strength level of the edges in the image. A higher average edge strength means more obvious edges, indicating that the image content is more complex, while a lower edge mean means fewer edges and the image tends to be flat or blurred. The edge standard deviation reflects the discreteness or volatility of the edge strength. A higher standard deviation means that there are edges of varying strengths in the image, indicating that there are multiple objects or more complex structures in the image, while a lower standard deviation indicates that the edge strength in the image tends to be consistent. When constructing the edge feature vector, the average edge strength and the edge standard deviation jointly provide comprehensive information about the edge features. The average edge strength reflects the overall strength of the edge, and the edge standard deviation reflects the degree of change in the edge strength. Combining these two features can comprehensively describe the edge features of the image.
[0115] The formula for generating texture feature vectors is:
[0116] F T =[C,E,H]
[0117] Among them, F Trepresents the texture feature vector, C, E, and H represent the contrast, energy, and homogeneity of the integrated image, respectively;
[0118] The resulting comprehensive feature vector is:
[0119] K=[F L ,F T ]
[0120] Among them, K represents the comprehensive feature vector.
[0121] Step 5: Generate a deep learning network, take the comprehensive feature vector of the polyester filament sample as input and the hair distribution data as a label, input it into the deep learning network for training, and obtain a hair detection model whose input value is the comprehensive feature vector and whose output value is the hair distribution data;
[0122] In this embodiment, the structure of the deep learning network is:
[0123] Input layer: contains 1 neuron and inputs the comprehensive feature vector;
[0124] The first hidden layer: contains 128 neurons, activated by the ReLU function;
[0125] The second hidden layer: contains 64 neurons, activated by the ReLU function;
[0126] Output layer: contains 1 neuron, which outputs whether there is hair.
[0127] Step 6: Collect visible light images and near-infrared images of the polyester filaments to be detected in real time, generate a comprehensive feature vector according to the above steps, input the comprehensive feature vector into the trained hair detection model, and output the hair distribution data of the polyester filaments to be detected.
[0128] An image to be detected is divided into several areas, and each area is detected by the hair detection model. The distribution of hair in polyester filaments is determined by judging whether there is hair in different areas.
[0129] See also Figure 2 The present invention also provides a polyester filament hair detection system based on image processing technology, and the system is used to implement the polyester filament hair detection method based on image processing technology, which specifically includes:
[0130] The equipment installation module is used to install a visible light LED lamp and a near-infrared LED lamp side by side directly above the polyester filament production line, ensuring that they are directly facing the running track of the polyester filament and maintaining a distance of 50 to 100 cm from the polyester filament production line;
[0131] An image acquisition module is used to pass a polyester filament sample with known hair distribution data through the irradiation area of a visible light LED lamp and a near-infrared LED lamp, collect visible light images and near-infrared images, scale the collected images to a size of 224×224, convert the images into grayscale images after denoising, set them as a first recognition image and a second recognition image respectively, establish a plane rectangular coordinate system in the first recognition image, and map the second recognition image to the first recognition image one by one in the coordinate system;
[0132] An image fusion module, used for weighted averaging the grayscale values of pixels of the first recognition image and the second recognition image, and generating a composite image by image fusion;
[0133] A feature extraction module is used to extract edge pixel points of a comprehensive image through canny edge detection, generate an edge pixel map of the comprehensive image, extract texture features of the comprehensive image based on a gray-level co-occurrence matrix, generate an edge feature vector based on the edge pixel map, generate a texture feature vector based on the texture features, and generate a comprehensive feature vector by combining the edge feature vector and the texture feature vector;
[0134] A model training module is used to generate a deep learning network, which takes the comprehensive feature vector of the polyester filament sample as input and the hair distribution data as a label, and inputs it into the deep learning network for training to obtain a hair detection model whose input value is the comprehensive feature vector and whose output value is the hair distribution data;
[0135] The data output module is used to collect visible light images and near-infrared images of the polyester filaments to be detected in real time, generate a comprehensive feature vector according to the above steps, input the comprehensive feature vector into the trained hair detection model, and output the hair distribution data of the polyester filaments to be detected.
[0136] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0137] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A polyester filament hair detection method based on image processing technology, characterized in that: The specific steps include: Step 1: Install a visible light LED lamp and a near-infrared LED lamp side by side directly above the polyester filament production line, ensuring that they are facing the running track of the polyester filament and keep a distance of 50 to 100 cm from the polyester filament production line; Step 2: Pass the polyester filament sample with known hair distribution data through the irradiation area of the visible light LED lamp and the near-infrared LED lamp, collect visible light images and near-infrared images, scale the collected images to a size of 224×224, and convert the images into grayscale images after denoising, set them as the first recognition image and the second recognition image respectively, establish a plane rectangular coordinate system in the first recognition image, and map the second recognition image to the first recognition image one by one in the coordinate system; Step 3: Taking a weighted average of the grayscale values of the pixels of the first recognition image and the second recognition image, and generating a composite image by image fusion; Step 4: extract edge pixels of the comprehensive image through canny edge detection, generate an edge pixel map of the comprehensive image, extract texture features of the comprehensive image based on the gray-level co-occurrence matrix, generate edge feature vectors based on the edge pixel map, generate texture feature vectors based on texture features, and combine the edge feature vector and texture feature vector to generate a comprehensive feature vector; Step 5: Generate a deep learning network, take the comprehensive feature vector of the polyester filament sample as input and the hair distribution data as a label, input it into the deep learning network for training, and obtain a hair detection model whose input value is the comprehensive feature vector and whose output value is the hair distribution data; Step 6: Collect visible light images and near-infrared images of the polyester filaments to be detected in real time, generate a comprehensive feature vector according to the above steps, input the comprehensive feature vector into the trained hair detection model, and output the hair distribution data of the polyester filaments to be detected.
2. The method for detecting polyester filament hairiness based on image processing technology according to claim 1, characterized in that: In the step 1, the visible light LED lamp is a white light LED lamp, and the near infrared LED lamp is a near infrared LED lamp with a wavelength of 850nm.
3. The method for detecting polyester filament hairiness based on image processing technology according to claim 1, characterized in that: In the step 2, the white light LED lamp and the near infrared LED lamp are respectively fixed on both sides of the image acquisition device, and the angle between the irradiation area of the LED lamp and the polyester filament production line is between 30° and 45°; In the first recognition image, the column where the leftmost pixel of the first recognition image is located is used as the y-axis, and the row where the bottommost pixel is located is used as the x-axis, to establish a plane rectangular coordinate system in which all pixels are in the first quadrant and each pixel has unique coordinates.
4. The method for detecting polyester filament hairiness based on image processing technology according to claim 1, characterized in that: The formula for weighted averaging of pixels in step 3 is: I fus (x,y)=α·I vis (x,y)+(1-α)·I NIR (x,y) Among them, I fus (x,y) represents the gray value of the pixel with coordinates (x,y) in the integrated image, I vis (x, y) represents the grayscale value of the pixel with coordinates (x, y) in the first recognition image, NIR (x, y) represents the grayscale value of the pixel with coordinates (x, y) in the second recognition image, and α represents the weight of the pixel of the first recognition image in the image fusion.
5. The method for detecting polyester filament hairiness based on image processing technology according to claim 1, characterized in that: The principle for generating the edge strength of the comprehensive image in step 4 is: For each pixel in the composite image, the pixel and the neighboring pixel are convolved with the horizontal template and the vertical template of the Prewitt operator to generate the grayscale difference of the pixel in the horizontal and vertical directions. The formula is: Among them, P X represents the horizontal template of the Prewitt operator, P Y represents the vertical template of the Prewitt operator, G x Represents the horizontal difference of the pixel, G y Represents the vertical difference of the pixel point, (x, y) represents the coordinates of the pixel point; The gradient amplitude of each pixel is generated based on the grayscale difference in the horizontal and vertical directions. The formula is: Among them, G(x,y) represents the gradient amplitude of the pixel point with coordinates (x,y), G x Represents the horizontal difference of the pixel, G y Indicates the vertical difference of the pixel; An edge threshold is preset. When the gradient amplitude of a pixel point is higher than the edge threshold, the pixel point is retained as an edge pixel point, and all edge pixels constitute an edge pixel map.
6. The method for detecting polyester filament hairiness based on image processing technology according to claim 1, characterized in that: The principle for extracting the texture features of the comprehensive image in step 4 is: The formula for generating the gray-level co-occurrence matrix is: Wherein, P(i,j) represents the value of the i-th row and j-th column in the gray-level co-occurrence matrix, i represents the gray value of the pixel value in the integrated image, j represents the gray value of another pixel value different from i in the integrated image, and i=0, 1, 2, ..., N, j=0, 1, 2, ..., N, N represents the total number of gray levels appearing in the image, g(x,y) represents the gray value of the pixel point with coordinates (x,y) in the integrated image, g(x+dx,y+dy) represents the gray value of the pixel point with coordinates (x+dx,y+dy) in the integrated image, and dx and dy represent the relative displacement between pixels; Based on the gray level co-occurrence matrix, the contrast of the integrated image is extracted according to the following formula: Where C represents the contrast of the integrated image; The energy of the composite image is extracted based on the formula: Where E represents the energy of the integrated image; The homogeneity of the composite image is extracted based on the formula: Among them, H represents the homogeneity of the comprehensive image.
7. The method for detecting polyester filament hairiness based on image processing technology according to claim 1, characterized in that: The principle for generating the comprehensive feature vector in step 4 is: The formula for generating edge feature vectors is: F L =[L avg ,L std ] Among them, L avg represents the average edge strength of edge pixels, (x0, y0) represents the coordinates of the pixel in the edge pixel map, X represents the number of pixels in the horizontal direction of the edge pixel map, Y represents the number of pixels in the vertical direction of the edge pixel map, M represents the total number of pixels in the edge pixel map, and M = X·Y, G0(x0, y0) represents the gradient amplitude of the edge pixel with coordinates (x0, y0), L std Indicates the edge standard deviation of edge pixels, F L represents the edge feature vector; The formula for generating texture feature vectors is: F T =[C,E,H] Among them, F T represents the texture feature vector, C, E, and H represent the contrast, energy, and homogeneity of the integrated image, respectively; The resulting comprehensive feature vector is: K=[F L ,F T ] Among them, K represents the comprehensive feature vector.
8. A polyester filament hair detection system based on image processing technology, characterized in that: The system is used to implement the polyester filament hair detection method based on image processing technology according to any one of claims 1 to 7, specifically comprising: The equipment installation module is used to install a visible light LED lamp and a near-infrared LED lamp side by side directly above the polyester filament production line, ensuring that they are directly facing the running track of the polyester filament and maintaining a distance of 50 to 100 cm from the polyester filament production line; An image acquisition module is used to pass a polyester filament sample with known hair distribution data through the irradiation area of a visible light LED lamp and a near-infrared LED lamp, collect visible light images and near-infrared images, scale the collected images to a size of 224×224, convert the images into grayscale images after denoising, set them as a first recognition image and a second recognition image respectively, establish a plane rectangular coordinate system in the first recognition image, and map the second recognition image to the first recognition image one by one in the coordinate system; An image fusion module, used for weighted averaging the grayscale values of pixels of the first recognition image and the second recognition image, and generating a composite image by image fusion; A feature extraction module is used to extract edge pixel points of a comprehensive image through canny edge detection, generate an edge pixel map of the comprehensive image, extract texture features of the comprehensive image based on a gray-level co-occurrence matrix, generate an edge feature vector based on the edge pixel map, generate a texture feature vector based on the texture features, and generate a comprehensive feature vector by combining the edge feature vector and the texture feature vector; A model training module is used to generate a deep learning network, which takes the comprehensive feature vector of the polyester filament sample as input and the hair distribution data as a label, and inputs it into the deep learning network for training to obtain a hair detection model whose input value is the comprehensive feature vector and whose output value is the hair distribution data; The data output module is used to collect visible light images and near-infrared images of the polyester filaments to be detected in real time, generate a comprehensive feature vector according to the above steps, input the comprehensive feature vector into the trained hair detection model, and output the hair distribution data of the polyester filaments to be detected.
Citation Information
Patent Citations
A method for detecting fuzzy fibers in polyester filaments based on image processing technology
CN111415349B
Wool cashmere classification method based on scanning electron microscope image processing
CN115082465A
Textile AI flaw detection method, system and equipment
CN118154605A
Yarn detection system based on image processing
CN118941553A
Method for detection and recognition of fog presence within an aircraft compartment using video images
US20050069207A1