Warp and weft adaptive texture detection method, computer system and storage medium
Through the detection method of adaptive texture changes, the technical complexity and type limitations of traditional systems are solved, rapid textile detection and light source independence are achieved, and operation difficulty and cost are reduced.
Patent Information
- Application Number
- CN202411639880.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional warp and weft inspection system is complex in technology and can only detect specific types of textiles. It relies on the stability of the Led light source, which leads to difficulty in operation and maintenance. The system needs to be replaced when replacing the product, which increases the cost and time period.
Adaptive texture change detection method is adopted, and standard images are collected, image pyramid models are generated, Gaussian hybrid models are established, and the calculation is carried out based on the brightness of the light source and the rotation angle of the textile. Multiple Gaussian models are aggregated as detection models, and images of the product to be detected are taken for testing. Training, enter defect classification rules for detection.
The rapid detection of different types of textiles is achieved, which avoids system replacement costs, reduces dependence on ambient light sources, simplifies operation and maintenance, and reduces the need for image processing and modeling of technicians.
Smart Images

Figure CN119152230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition processing, and in particular to a warp and weft yarn adaptive texture detection method, a computer system and a storage medium. Background Art
[0002] The warp and weft yarn inspection system is an automated inspection device used in the textile industry that uses machine vision and image processing technology to inspect the quality of textiles. These systems are able to detect parameters including density, defects, color, etc. of warp and weft yarns to ensure the quality and consistency of textiles.
[0003] The current detection system in the industry generally consists of the following processes: 1. Image preprocessing: color space conversion, Gaussian filtering, edge impact, etc.; 2. Density detection: calculate the density of warp and weft yarns; 3. Color detection: Check the color of the yarn using color space and threshold segmentation; 4. Defects: The blob method is used to calculate defects on the yarn, such as dirt, broken yarn, hair, mosquitoes, etc.
[0004] However, although the traditional detection method improves the detection efficiency and accuracy of the product, it still has the following disadvantages: 1. Complex technology: The detection system involves complex image processing algorithms and requires the setting of a large number of detection parameters, which places high demands on the operation and maintenance of users; 2. Limitations: The detection system can only detect specific types of textiles. When the product is changed, it is necessary to replace the different systems, which will incur huge costs and time cycles; 3. Lighting environment: The detection system is highly dependent on the stability of the LED light source. When the LED light source decays, the accuracy of the detection decreases.
[0005] Therefore, based on the above-mentioned shortcomings of the existing technology, our company specially proposes a warp and weft yarn detection technology based on adaptive texture changes. Summary of the invention
[0006] The object of the present invention is to provide a warp and weft yarn adaptive texture detection method, a computer system and a storage medium to solve the problems raised in the background technology.
[0007] To achieve the above object, the present invention provides the following technical solution: a warp and weft yarn adaptive texture detection method, the method comprising the following steps: Step 1: Collect standard images and segment texture features; Step 2: Generate an image pyramid model according to step 1; Step 3: Use image threshold segmentation to extract the warp and weft yarns in the image and establish a Gaussian mixture model, and perform a Gaussian mixture model calculation on each layer of the pyramid image; Step 4: According to the different brightness of the light source and the different rotation angles of the standard textile, recalculate steps 1 and 2 and obtain a new density distribution; Step 5: According to step 4, multiple Gaussian models of the same standard textile are obtained and aggregated together as a detection model; Step 6: Take multiple images of the product to be inspected and record their longitude and latitude nodes into the inspection model to train the inspection model; Step 7: Input the defect classification rules of textiles of different material types into the detection model for detection and obtain the output results.
[0008] In the warp and weft yarn adaptive texture detection method of the present invention, the pyramid model is as follows: , Where: P(X,Y) is the pixel point at the coordinate (X,Y) of the target image; I(X,Y) is the pixel point at the original image coordinates (X,Y); K is the scaling factor and has a value range of 1-8.
[0009] In the warp and weft yarn adaptive texture detection method of the present invention, the Gaussian mixture model is as follows: ; in: is the mean vector of the kth Gaussian distribution; is the covariance matrix of the kth Gaussian distribution; is the weight coefficient of the kth Gaussian distribution; N is the number of Gaussian distributions; x is the coordinate value of the node where the longitude and latitude lines intersect.
[0010] The warp and weft yarn adaptive texture detection method of the present invention introduces a parameter Z and solves the Gaussian mixture model according to the following equation group: ; ; ; Among them, P Z is the weight, Z is the weight constant and its value is 0.5; P k is the weight of each layer model.
[0011] The warp and weft yarn adaptive texture detection method of the present invention, wherein: The calculation formula is: ; Where X is the node data, N is the number of samples and its value range is 3-50.
[0012] The warp and weft yarn adaptive texture detection method of the present invention comprises: The calculation formula is: ; Where S(x,y) is the covariance, X i and Y i are two variable sample values, and are the means of the two variables, and n is the sample size.
[0013] The warp and weft yarn adaptive texture detection method of the present invention comprises: The calculation formula is: ; ; Among them, x and y are coordinate values, is the variance of x.
[0014] In addition, the present invention also provides a computer control system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0015] In addition, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that the computer program implements the steps of the above method when executed by a processor.
[0016] Compared with the prior art, the present invention has the following beneficial effects: after adopting the adaptive texture change model, fast detection of different types of textiles can be achieved. There is no need to replace the system when the product is changed, which ensures the rapidity of the production cycle and avoids the replacement cost, and greatly reduces the dependence of the system stability on the ambient light source. In addition, technicians do not need to understand the relevant knowledge of image processing and modeling, nor do they need to set modeling parameters such as image processing and threshold segmentation. They only need to simply set simple rules for defect classification of textiles of different material types after the detection is completed. For example, the defect area must be greater than 0.02mm before it needs to be detected, which greatly reduces the difficulty of technical operation, is more user-friendly for operation and maintenance, and reduces the cost of use and the operating threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 The present invention is a flowchart of the method steps of an embodiment of the method of the present invention.
[0019] Figure 2 This is a diagram showing the actual effect after being processed by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the following will be described clearly and completely in combination with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are partial embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0021] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0022] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments: Embodiment 1
[0023] Figure 1 The flow of a warp and weft yarn detection method based on adaptive texture change provided by the first embodiment of the present invention is shown. A new mathematical modeling method is used in combination with a traditional image processing method, so that in the actual production process, a set of systems can cover the defect detection of textiles (color, weaving method, yarn transformation) of different processes. For the sake of convenience, only the part related to the embodiment of the present invention is shown. The method includes the following steps: Step 1: Collect standard images and segment texture features; Step 2: Generate an image pyramid model according to step 1; Step 3: Use image threshold segmentation to extract the warp and weft yarns in the image and establish a Gaussian mixture model, and perform a Gaussian mixture model calculation on each layer of the pyramid image; Step 4: According to the different brightness of the light source and the different rotation angles of the standard textile, recalculate steps 1 and 2 and obtain a new density distribution; the way to change the brightness is generally to automatically adjust the brightness of the LED light source; and because the textile has a certain elasticity, it will have different degrees of stretching deformation when moving and taking images on the automated machine, and the shape of the longitude and latitude intersection nodes will change, so it is necessary to rotate the current captured image and recalculate steps 1 and 2; Step 5: According to step 4, multiple Gaussian models of the same standard textile are obtained and aggregated together as a detection model; Step 6: Take multiple images of the product to be inspected and record their longitude and latitude nodes into the inspection model to train the inspection model. During the training process, dynamically change the image brightness value and rotate the product angle. All the collected images are added to the inspection model to enhance the detection robustness when the light changes in the acquisition environment and the product deflection occur. Step 7: Input the defect classification rules of textiles of different material types into the detection model for detection and obtain the output results; during the detection process, the features on the product that are outside the detection model will be detected, and various defects will be screened and classified by setting detection specifications such as defect area size, defect location, defect shape, color difference range, etc.; after adopting the adaptive texture change model, technicians do not need to understand the relevant knowledge of image processing and modeling. Technicians do not need to set modeling parameters such as image processing and threshold segmentation. They only need to simply set the defect classification rules of textiles of different material types after the detection is completed. For example, the defect area size must be greater than 0.02mm before it needs to be detected, or the defect color difference must be greater than delta(3) before it needs to be detected. The specific detection effect is as follows Figure 2 (a), (b), (c) and (d) in the figure.
[0024] The color difference specification adopts the CMC international standard of the textile industry. Delta (3) is the test specification, which is the difference between the actual product color and the ideal product color. The color difference resolution ability of the human eye is generally between delta (3) and delta (5), so products with a defective color difference greater than delta (3) are marked as defective.
[0025] After adopting the adaptive texture change model, it can be well compatible with natural changes such as longitude and latitude density and brightness. During the modeling process, there is no need for technicians to set complex detection parameters, and the entire process is automatically calculated. After the detection is completed, traditional Blob morphology can be used to calculate defect features for classification, which is simple and easy.
[0026] It should be noted that blob morphology is used to classify defect features, specifically to determine the type of defect based on the size of the defect, its location, shape characteristics, color difference value, etc., and to reversely infer the links that need to be improved in the generation process. This rule is common knowledge among technicians in this field and will not be elaborated in this solution.
[0027] Specifically, the pyramid model is as follows: , Where: P(X,Y) is the pixel point at the coordinate (X,Y) of the target image; I(X,Y) is the pixel point at the original image coordinates (X,Y); K is the scaling factor and has a value range of 1-8.
[0028] Specifically, the Gaussian mixture model is as follows: ; in: is the mean vector of the kth Gaussian distribution; is the covariance matrix of the kth Gaussian distribution; is the weight coefficient of the kth Gaussian distribution; N is the number of Gaussian distributions; x is the coordinate value of the node where the longitude and latitude lines intersect.
[0029] Specifically, the parameter Z is introduced and the Gaussian mixture model is solved according to the following equations: ; ; ; Among them, P Z is the weight, Z is the weight constant and its value is 0.5; P k is the weight of each layer model.
[0030] Specifically, The calculation formula is: ; Where X is the node data, N is the number of samples and its value range is 3-50.
[0031] Specifically, The calculation formula is: ; Where S(x,y) is the covariance, X i and Y i are two variable sample values, and are the means of the two variables, and n is the sample size.
[0032] Specifically, The calculation formula is: ; ; Among them, x and y are coordinate values, is the variance of x.
[0033] After adopting the adaptive texture change model, fast detection of different types of textiles can be achieved. There is no need to replace the system when the product is changed, which ensures the rapidity of the production cycle and avoids the replacement cost. It also greatly reduces the dependence of the system stability on the ambient light source. In addition, technicians do not need to understand the relevant knowledge of image processing and modeling, nor do they need to set modeling parameters such as image processing and threshold segmentation. They only need to simply set simple rules for defect classification of textiles of different material types after the inspection is completed. For example, the defect area must be greater than 0.02mm before it needs to be detected, which greatly reduces the difficulty of technical operation, is more user-friendly for operation and maintenance, and reduces the cost of use and the operating threshold. Embodiment 2
[0034] In an embodiment of the present invention, a computer control system is provided. For ease of description, only parts related to the embodiment of the present invention are shown.
[0035] The computer control system of the embodiment of the present invention comprises a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the warp and weft yarn detection method based on adaptive texture change are implemented. Embodiment 3
[0036] In an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps in the embodiment of the warp and weft yarn detection method based on adaptive texture change are implemented.
[0037] The computer-readable storage medium of the embodiment of the present invention may include any entity or device or recording medium capable of carrying computer program code, for example, ROM / RAM, magnetic disk, optical disk, flash memory and other memories.
[0038] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A warp and weft yarn detection method based on adaptive texture change, characterized in that: The method comprises the following steps: Step 1: Collect standard images of standard textiles and segment texture features; Step 2: Generate an image pyramid model according to step 1; Step 3: Use image threshold segmentation to extract the warp and weft yarns in the image and establish a Gaussian mixture model, and perform a Gaussian mixture model calculation on each layer of the pyramid image; Step 4: According to the different brightness of the light source and the different rotation angles of the standard textile, recalculate steps 1 and 2 and obtain a new density distribution; Step 5: According to step 4, multiple Gaussian models of the same standard textile are obtained and aggregated together as a detection model; Step 6: Take multiple images of the product to be inspected and record their longitude and latitude nodes into the inspection model to train the inspection model; Step 7: Input the defect classification rules of textiles of different material types into the detection model for detection and obtain the output results.
2. The warp and weft yarn detection method based on adaptive texture change according to claim 1, characterized in that: The pyramid model is as follows: , Where: P(X,Y) is the pixel point at the coordinate (X,Y) of the target image; I(X,Y) is the pixel point at the original image coordinates (X,Y); K is the scaling factor and has a value range of 1-8.
3. The warp and weft yarn detection method based on adaptive texture change according to claim 1 or 2, characterized in that: The Gaussian mixture model is as follows: ; in: is the mean vector of the kth Gaussian distribution; is the covariance matrix of the kth Gaussian distribution; is the weight coefficient of the kth Gaussian distribution; N is the number of Gaussian distributions; x is the coordinate value of the node where the longitude and latitude lines intersect.
4. The warp and weft yarn detection method based on adaptive texture change according to claim 3, characterized in that: Introducing the parameter Z, the Gaussian mixture model is solved according to the following equations: ; ; ; Among them, P Z is the weight, Z is the weight constant and its value is 0.5; P k is the weight of each layer model.
5. The warp and weft yarn detection method based on adaptive texture change according to claim 4, characterized in that: in, The calculation formula is: ; Where X is the node data, N is the number of samples and its value range is 3-50.
6. The warp and weft yarn detection method based on adaptive texture change according to claim 4, characterized in that: in The calculation formula is: ; Where S(x,y) is the covariance, X i and Y i are two variable sample values, and are the means of the two variables, and n is the sample size.
7. The warp and weft yarn detection method based on adaptive texture change according to claim 4, characterized in that: in The calculation formula is: ; ; Among them, x and y are coordinate values, is the variance of x.
8. A computer control system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
A cloth defect detection method based on GMM and image pyramid
CN109509171A
Edge detection method of improved canny operator based on texture features
CN114782432A
Textile defect detection method and system based on machine vision
CN118898610A
Fabric defect detection method
US20240193752A1
