Cloth flaw detection method and system based on machine vision

Through machine vision technology, the characteristics of fabric defects and environmental interference are extracted, defect classification and environmental interference models are constructed, and the problems of irregular shapes and similar colors are solved in the detection of fabric defects, and the problems of environmental factors are affected by environmental factors, achieving efficient and accurate defects Inspection and early warning ensure product quality.

CN119198751AInactive Publication Date: 2024-12-27SHAOXING DA GAMA TEXTILE CO LTD

Patent Information

Application Number
CN202411533301.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, it is difficult to accurately identify defects with irregular shapes and similar colors to backgrounds in cloth defect detection, and are susceptible to environmental factors, affecting the accuracy of detection.

Method used

Using machine vision-based detection methods, we can capture image and environmental factor data by deploying high-resolution industrial cameras and sensors, and extract defect characteristics and environmental interference characteristics after preprocessing. We can build defect classification models and environmental interference models in combination with machine learning algorithms to build defect classification models and environmental interference models. Flaw warning model reduces the influence of environmental factors and improves detection accuracy.

Benefits of technology

It realizes efficient and accurate detection of cloth defects, improves detection efficiency and accuracy, reduces labor costs, promptly detects defects and issues early warnings, reduces production risks, and ensures the stability of product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119198751A_ABST
    Figure CN119198751A_ABST
Patent Text Reader

Abstract

The invention discloses a cloth defect detection method and system based on machine vision, and relates to the technical field of detection and evaluation, and the method comprises the following steps: optimizing a cloth detection environment, deploying an industrial camera and a sensor to capture an image of a cloth surface and environmental factor data, and preprocessing the collected data; according to the preprocessed data, defect features and environment interference features are extracted, and the extracted defect features and environment interference features are marked. According to the cloth flaw detection method and system based on machine vision, continuous and uninterrupted detection of cloth surface flaws is realized through automatic image acquisition and processing, and compared with a traditional manual detection mode, the detection efficiency is greatly improved, the labor cost is reduced, and the detection efficiency is improved. Automatic detection can ensure that products on a production line quickly pass through a detection area, and defect positions are found and marked in time, so that subsequent treatment is quicker and more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of detection and evaluation, and in particular to a cloth defect detection method and system based on machine vision. Background Art

[0002] As a new type of environmentally friendly material, cloth is widely used in sanitary products (such as sanitary napkins, diapers, sanitary pads, etc.), medical supplies, packaging materials, agricultural coverings and other fields due to its unique physical and chemical properties, such as high mechanical strength, water resistance, wear resistance, heat resistance, corrosion resistance and good hygiene performance. With the continuous expansion of market demand, the production scale of cloth is also growing rapidly, which puts higher requirements on the quality of cloth. Machine vision technology, with its high speed, high precision, non-contact and automation, can perform real-time detection without affecting production, and can play a more important role in the cloth detection process.

[0003] In the prior art, there are many kinds of cloth defects. During detection, it is difficult to accurately identify defects with irregular shapes and colors similar to the background. In addition, during detection, the machine vision system is easily affected by environmental factors, which in turn affects the accuracy of detection. Therefore, how to weaken the impact of environmental factors on the cloth detection process and improve the accuracy of cloth defect detection is the problem we need to solve. To this end, a cloth defect detection method and system based on machine vision are proposed. Summary of the invention

[0004] To achieve the above objectives, the present invention is implemented through the following technical solutions: In the first aspect, a cloth defect detection method based on machine vision comprises the following steps: Step 1: Optimize the cloth inspection environment, deploy high-resolution industrial cameras and sensors to capture images of the cloth surface and environmental factor data, and pre-process the collected data; Step 2: Extract defect features and environmental interference features based on the preprocessed data, mark the extracted defect features and environmental interference features, and integrate the associated data samples to obtain a defect feature table and an environmental interference feature table; Step 3: Traverse the sample data marked in the defect feature sequence table, build a defect classification model based on the machine learning algorithm to distinguish different types of defects, and use the sample data in the environmental interference feature table to build an environmental interference model based on the deep learning algorithm to distinguish the interference conditions of different environmental characteristics; Step 4: Combine the defect classification model, environmental interference model and related data to build a defect warning model, divide the warning level, and conduct warning analysis on the severity of the defects detected in the cloth; Step 5: Based on the early warning analysis results, the classified defect characteristics are compared with the preset defect detection standards, and the corresponding test report is output.

[0005] In a second aspect, a machine vision-based cloth defect detection system is used to implement a machine vision-based cloth defect detection method, including a detection platform, wherein the detection platform is communicatively connected with an image acquisition module, an environment monitoring module, a data preprocessing module, a feature extraction module, a model building module, an early warning analysis module, and a report generation module, wherein the modules are electrically connected; The image acquisition module is used to capture the image of the cloth surface, and uses a high-definition, high-frame-rate camera to ensure the quality of the acquired image is clear; The environmental monitoring module is used to monitor the environmental parameters of temperature, humidity and dust concentration in the detection area in combination with sensors, obtain environmental interference factor data, ensure the stability of the detection environment, and reduce the impact of environmental factors on image quality; The data preprocessing module is used to preprocess the collected image data and preprocess the environmental interference factor data acquired by the environmental monitoring module; The feature extraction module is used to extract the defect features of texture, edge, shape and color from the preprocessed image, provide key information for defect classification, improve the accuracy of detection, and extract the environmental interference features of temperature, humidity and dust concentration from the preprocessed environmental interference factor data; The model building module uses a machine learning algorithm to build a defect classification model based on the extracted defect features, classifies defects, distinguishes different types of defects, and analyzes environmental factor data to identify the impact of environmental changes on detection. It builds an environmental interference model based on the extracted environmental interference features, analyzes the interference of different environmental features on the cloth detection process, and improves the robustness of the system under different environmental conditions; The early warning analysis module combines the outputs of the defect classification model and the environmental interference model to build a cloth defect early warning model, and comprehensively considers the conveying speed during cloth detection to perform real-time early warning analysis, discover potential defect problems, and issue early warnings according to the severity; The report generation module is used to organize the test results, generate detailed test reports, manage test data, and provide clear quality control records to facilitate tracking and improving the production process.

[0006] The present invention provides a method and system for detecting cloth defects based on machine vision, which has the following beneficial effects: 1. This machine vision-based cloth defect detection method and system realizes continuous and uninterrupted detection of cloth surface defects through automated image acquisition and processing. Compared with traditional manual detection methods, it greatly improves detection efficiency and reduces labor costs. Automated detection can ensure that products on the production line pass through the detection area quickly, and defect locations are discovered and marked in time, making subsequent processing faster and more accurate. In addition, defects are classified and identified through machine learning algorithms, and various types of defects can be identified with extremely high accuracy, including tiny defects that are difficult to be detected by the human eye. The automated detection process significantly improves detection efficiency and accuracy, ensuring the stability of product quality.

[0007] 2. The machine vision-based cloth defect detection method and system, through the set early warning function, can issue an alarm signal once a defect is detected, and record the defect information in detail in the test report, so that production personnel can respond quickly, deal with the defects or adjust production parameters, thereby effectively reducing production risks. The early warning measures not only reduce the possibility of defective products entering the market, but also avoid serious consequences such as production line shutdown or equipment damage due to the accumulation of defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 A method flow chart of a cloth defect detection method and system based on machine vision of the present invention; Figure 2 A flow chart for constructing a defect classification model and an environmental interference model of the present invention; Figure 3 This is a flow chart of the present invention for early warning analysis of cloth detection defects; Figure 4 This is a diagram of the module structure of the present invention. DETAILED DESCRIPTION

[0009] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are provided for the purpose of illustration and description, and are not intended to be exhaustive or to limit the present invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention, and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

[0010] The first embodiment, as Figure 1 , Figure 2 As shown, the present invention provides a technical solution: a cloth defect detection method based on machine vision, comprising the following steps: Step 1: Optimize the cloth inspection environment, deploy high-resolution industrial cameras and sensors to capture images of the cloth surface and environmental factor data, pre-process the collected data, optimize and control the ambient light in the cloth inspection area, ensure that the lighting in the inspection area is uniform and stable, avoid the alternating influence of direct sunlight and shadows, and use a shadowless bright field to form the inspection environment, that is, one light source is transmitted under the material, and the other light source is reflected above the material. The combination of the light sources transmitted below and reflected above eliminates the influence of shadows and direct sunlight to improve image quality, and installs a background plate with high contrast to the cloth to enhance the contrast between defects and the background, making defects easier to identify. Configure high-resolution and high-sensitivity industrial cameras according to the size, speed and surface characteristics of the cloth, and deploy sensors for monitoring environmental factors in the inspection area, including temperature sensors, humidity sensors and optical sensors, to collect environmental factor data, and use the deployed industrial cameras to image the surface of the cloth. Capture and collect environmental factor data such as temperature, humidity and dust concentration through sensors. Preprocess the collected cloth surface images, including denoising, grayscale and contrast enhancement, to improve image quality. The denoising process uses filtering algorithms to remove noise in the image, such as Gaussian filtering, median filtering, etc. The contrast enhancement process adjusts the contrast of the image to make the difference between the defect and the cloth background more obvious. The grayscale process converts the color image into a grayscale image to simplify the subsequent processing process. The environmental factor data is cleaned and standardized to reduce the impact of environmental changes on the detection results. The data cleaning process is to remove outliers, missing values ​​or duplicate values ​​to ensure the accuracy and reliability of the data. The standardization process is to convert the environmental factor data into a unified measurement unit or range for subsequent analysis and comparison. The preprocessed image data and environmental factor data are synchronized in time, and the environmental factor data are associated with the corresponding cloth image. Step 2: Extract defect features and environmental interference features based on the preprocessed data, mark the extracted defect features and environmental interference features, integrate the associated data samples to obtain defect feature tables and environmental interference feature tables, extract the preprocessed cloth surface image, use the grayscale co-occurrence matrix algorithm to analyze the image texture, extract texture features, apply the Canny edge detection algorithm to identify the edge features in the image, so as to identify the outline of the defect, and analyze the shape features of the image by calculating the area, perimeter and shape factors (such as circularity, aspect ratio, etc.) in the image, analyze the color features of the image by extracting the color histogram, preset the defect attributes of the cloth according to the production standards and quality requirements of the cloth, such as type, size, shape, etc., analyze the extracted texture features, edge features, shape features and color features, distinguish between normal and defective areas to determine the features that characterize the defects, extract defect features and mark them, analyze the preprocessed environmental factor data, extract the environmental The interference characteristics of the factors are temperature characteristics, humidity characteristics and dust concentration characteristics. According to the environmental requirements and experience of cloth detection, the environmental interference attributes of the cloth are preset, the environmental interference characteristics that interfere with the cloth detection are identified and extracted, the extracted environmental interference characteristics are marked, and identifiers are assigned to the marked defect characteristics and environmental interference characteristics. For the defect characteristics, the corresponding defect number, image position, size and shape are recorded, and for the environmental interference characteristics, the corresponding environmental conditions and timestamp information are recorded. The marked defect characteristics and environmental interference characteristics are associated with the corresponding image data and environmental factor data to form a complete data sample, and all the data on the defect characteristics are sorted into a defect feature table, including defect number, category, position, size, shape feature information, and the corresponding image data index. All the data on the environmental interference characteristics are sorted into an environmental interference feature table, including interference type, intensity, environmental conditions (such as temperature, humidity), and timestamp information; Step 3. Traverse the sample data marked in the defect feature sequence table, build a defect classification model based on the machine learning algorithm to distinguish different types of defects, use the sample data in the environmental interference feature table to build an environmental interference model based on the deep learning algorithm to distinguish the interference of different environmental characteristics, extract the marked defect feature sample data from the defect feature sequence table, divide the data set of the defect feature sample data into a defect feature training set and a defect feature test set, the training set is used for model training, and the test set is used to adjust the model parameters and evaluate the model performance, and convert the defect category into a numerical form for processing by the machine learning algorithm, use the defect feature training set data combined with the decision tree classification algorithm to build a defect classification model, and use the defect feature test set to test and evaluate the defect classification model, based on the defect classification model and defect features The associated data in the sequence table are used to obtain a defect classification evaluation index, distinguish the severity of defects to determine different types of defects, extract sample data of environmental interference features from the environmental interference feature table, and divide the data set of environmental interference feature sample data into an environmental interference feature training set and an environmental interference feature test set, and convert the interference type of environmental interference into a numerical form to meet the input requirements of the deep learning model, build an environmental interference model based on the environmental interference feature training set data and the deep learning algorithm of the convolutional neural network, and use the environmental interference feature test set data to evaluate the performance of the environmental interference model, analyze the recognition ability of the environmental interference model for different environmental interferences, obtain the environmental interference evaluation index according to the environmental interference model and the associated data in the environmental interference feature table, and analyze the interference of different environmental features on the cloth detection process; Furthermore, the expression of the defect classification evaluation index is: ; in, is the defect classification evaluation index, For the The texture feature value of samples, For the The marginal eigenvalues ​​of samples, For the The shape feature values ​​of samples, is the reference value of the color feature, is the sample size, It is the defect classification evaluation index magnification factor, which is used to adjust the sensitivity of the defect classification evaluation index. It is the reference value offset of the defect classification evaluation index, which is used to adjust the reference point of the defect classification evaluation index. The higher the value, the more serious the defect. Defects with complex texture, obvious edges, irregular shapes and large color differences will have higher Value, for all samples Sum and combine the comprehensive impact of all sample defect characteristics, and use Enhance the influence of edge features by Take the square root of the sum, where As a root index, adjust the intensity of the combined effect according to the color characteristics, As a reference value, used to adjust The overall level of the index can be set to ensure that it is within the appropriate range. and The value of Under certain conditions, it tends to the limit value to facilitate classification and judgment; The expression of environmental interference assessment index is: ; in, is the environmental disturbance assessment index, For the The temperature value of each sample, For the The humidity value of each sample, For the The dust concentration value of each sample is , and Respectively represent the reference values ​​of temperature, humidity and dust concentration, is the sample size, is the environmental interference assessment index amplification factor, which is used to adjust the sensitivity of the environmental interference assessment index. It is the reference value offset of the environmental interference assessment index, used to adjust the reference point of the environmental interference assessment index. The higher the value, the more serious the environmental interference. Excessive temperature, humidity or dust concentration will cause The value increases, for all samples Sum up to express the combined impact of all sample environmental interference features, using Enhance the influence of humidity characteristics, so that humidity plays a greater role in environmental disturbance assessment, through the root formula The benchmark values ​​are synthesized to balance the importance of different environmental factors. , and As a reference value, used to standardize actual measured values ​​for comparison and evaluation, and For adjustment Value ranges and benchmarks to suit different application requirements; Step 4: Combine the defect classification model, environmental interference model and related data to build a defect warning model, divide the warning level, and conduct warning analysis on the severity of the defects detected in the cloth; Step 5: Based on the early warning analysis results, the classified defect characteristics are compared with the preset defect detection standards, and the corresponding test report is output.

[0011] The second embodiment is based on the first embodiment. Figure 3 As shown, in step 4, the process of early warning analysis of cloth detection defects includes: The output data of the defect classification model and the environmental interference model are associated to analyze the potential relationship between defects and environmental interference, and the historical defect data, environmental condition records, and production parameter information are integrated to combine the defect features and environmental interference features to form a comprehensive feature set. Based on the analysis results of the associated data and the associated data of the comprehensive feature set, a cloth defect warning model is constructed to conduct early warning analysis on the defects detected in the cloth. Combined with the defect classification evaluation index and the environmental interference evaluation index, the analysis results of the cloth defect warning model and the conveying speed during cloth detection are combined to obtain the defect warning coefficient, evaluate the severity of the defects detected in the cloth, and calculate the defect classification evaluation index based on the output of the defect classification model to quantify the severity of the defects. According to the output of the environmental interference model, the environmental interference evaluation index is calculated to quantify the impact of the environment on the occurrence of defects. According to the combination of the severity and frequency of defects, different warning levels are set, namely blue warning level, yellow warning level, orange warning level and red warning level, where the warning level increases gradually from blue to red. Combined with the defect warning coefficient, the corresponding warning threshold is divided for the set warning level, and corresponding response measures are formulated for each warning level. Furthermore, the expression of the defect warning coefficient is: ; in, It is the defect warning coefficient, which is used to evaluate the severity of defects in cloth detection. For the The defect classification evaluation index of a sample is the defect classification evaluation index calculated based on the defect features (such as texture, edge, shape, and color) of a single sample. For the The environmental interference assessment index of a sample is the environmental interference assessment index calculated based on environmental factors (such as temperature, humidity, and dust concentration) for a single sample. The current cloth inspection conveying speed affects the accuracy of inspection and the visibility of defects. It is the preset reference speed value, indicating the speed at which the defect is considered to be most likely to be accurately detected. It is used to adjust the impact of speed on the detection effect. is the sample size, The value range is between 0 and 1, where 0 indicates no defect risk and 1 indicates the highest defect risk. The higher the value, the more serious the defect is and the more urgent the measures to be taken are. The defect assessment index and environmental interference assessment index of each sample are weighted and summed, and an exponential function is applied to enhance the impact of environmental interference. The square root of the sum of the comprehensive features is calculated using the root formula (square root) to balance the impact of the eigenvalues ​​and prevent a single eigenvalue from having too much impact on the results. The exponential sigmoid function is used to simulate the impact of speed on the detection effect. When the speed is close to the baseline value, When the speed deviates from the reference value, the sigmoid function value is close to 1, indicating that the detection effect is the best; when the speed deviates from the reference value, the function value decreases, indicating that the detection effect is getting worse.

[0012] Furthermore, multiple warning levels correspond to multiple warning thresholds, and the warning thresholds include an upper threshold and a lower threshold. The corresponding relationship between the multiple warning levels and the multiple warning thresholds is: Blue warning level ; It is a minor defect with low risk, which is not sensitive to environmental interference and has little impact on product quality. It may be caused by accidental factors and requires enhanced monitoring, data recording, and observation of whether it continues to occur; Yellow warning level ; It is a medium defect with medium risk, which may be affected by certain environmental interference, have a certain impact on product quality, and may be sensitive to the environment or production parameters. It is necessary to adjust production parameters, check equipment status, and strengthen environmental monitoring; Orange warning level ; It is a serious defect with high risk, which is greatly affected by environmental interference, has a significant impact on product quality, is sensitive to changes in the environment or production parameters, and may affect product quality. It is necessary to suspend production, conduct a comprehensive inspection, find out the root cause of the problem, and resume production after repair; Red alert level ; Extremely serious defects with serious risks may be caused by extreme environmental interference, which will have a serious impact on product quality. They may be caused by extreme environmental interference or equipment failure, which will seriously affect product quality and production safety. Production should be stopped immediately, emergency plans should be initiated, and a technical team should be organized to conduct investigations and repairs; in, is the defect warning coefficient, is the lower threshold corresponding to the yellow warning level and the upper threshold corresponding to the blue warning level. is the lower threshold corresponding to the orange warning level and the upper threshold corresponding to the yellow warning level. is the lower threshold corresponding to the red warning level and the upper threshold corresponding to the orange warning level. , , ; In step 5, the output process of the test report includes: Receive the warning analysis results from the cloth defect warning model, including the location, type, and warning level of the defect, and classify the detected defect features according to the warning analysis results, such as appearance defects, size defects, and functional defects. Read the judgment criteria for various defects from the database, and preset the defect detection standards. Compare the classified defect features with the preset defect detection standards to determine whether they meet any one or more conditions in the preset defect detection standards. According to the comparison results, determine whether the detected defects truly meet the definition of defects and preset standards. If the defect features exceed the allowable range of the preset standards or do not meet any of the conditions in the standards, it is determined to be a real defect. Organize the detected defect information (including location, type, size, shape, etc.) and the judgment results (whether it is a real defect), and write a detailed test report based on the organized test information. The test report includes the test date, time, defect type, location, and warning level information. Output the test report in the form of an electronic document and distribute it to relevant departments or personnel.

[0013] The third embodiment is based on the first and second embodiments. Figure 4 As shown, the present invention also provides a machine vision-based cloth defect detection system for implementing a machine vision-based cloth defect detection method, including a detection platform, the detection platform is communicatively connected with an image acquisition module, an environment monitoring module, a data preprocessing module, a feature extraction module, a model building module, an early warning analysis module and a report generation module, wherein the modules are connected by electrical signals; The image acquisition module is used to capture images of the cloth surface. It uses a high-definition, high-frame-rate camera to ensure that the captured images are clear and can accurately reflect the details of the cloth surface. The environmental monitoring module is used to combine sensors to monitor the environmental parameters of the temperature, humidity, and dust concentration in the detection area, obtain environmental interference factor data, ensure the stability of the detection environment, and reduce the impact of environmental factors on image quality; The data preprocessing module is used to preprocess the collected image data, such as noise removal, contrast enhancement, etc., to improve the quality and clarity of the image, provide more favorable conditions for subsequent defect identification, and preprocess the environmental interference factor data obtained by the environmental monitoring module; Feature extraction module, used to extract texture, edge, shape and color defect features from the preprocessed image, provide key information for defect classification, improve detection accuracy, and extract environmental interference features such as temperature, humidity and dust concentration from the preprocessed environmental interference factor data; Model building module: Based on the extracted defect features, a defect classification model is built using a machine learning algorithm to classify defects, distinguish different types of defects, and analyze environmental factor data to identify the impact of environmental changes on detection. An environmental interference model is built in combination with the extracted environmental interference features to analyze the interference of different environmental features on the cloth detection process, thereby improving the robustness of the system under different environmental conditions. The early warning analysis module combines the output of the defect classification model and the environmental interference model to build a cloth defect early warning model. It also conducts real-time early warning analysis based on the conveying speed during cloth inspection, discovers potential defect problems, and issues early warnings based on the severity. The report generation module is used to organize test results, generate detailed test reports, and manage test data to provide clear quality control records for easy tracking and improvement of production processes.

[0014] Obviously, the described embodiments are only some 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 and related fields without creative work should fall within the scope of protection of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention are implemented according to the conventional means in the field unless otherwise specified and limited.

Claims

1. A cloth defect detection method based on machine vision, characterized in that: The following steps are involved: Step 1: Optimize the cloth inspection environment, deploy industrial cameras and sensors to capture images of the cloth surface and environmental factor data, and pre-process the collected data; Step 2: Extract defect features and environmental interference features based on the preprocessed data, mark the extracted defect features and environmental interference features, and integrate the associated data samples to obtain a defect feature table and an environmental interference feature table; Step 3: Traverse the sample data marked in the defect feature sequence table, build a defect classification model based on the machine learning algorithm to distinguish different types of defects, and use the sample data in the environmental interference feature table to build an environmental interference model based on the deep learning algorithm to distinguish the interference conditions of different environmental characteristics; Step 4: Combine the defect classification model, environmental interference model and related data to build a defect warning model, divide the warning level, and conduct warning analysis on the severity of the defects detected in the cloth; Step 5: Based on the early warning analysis results, the classified defect characteristics are compared with the preset defect detection standards, and the corresponding test report is output.

2. The method for detecting cloth defects based on machine vision according to claim 1, characterized in that: In step 1, the process of capturing the image of the cloth surface and the environmental factor data includes: The lighting in the cloth inspection area is optimized by adopting a shadowless bright field. The combination of light sources transmitted from below and reflected from above is used to eliminate the influence of shadows and direct sunlight. A high-contrast background plate is installed to enhance the contrast between defects and background. Industrial cameras are configured according to the size, speed and surface characteristics of the cloth. Temperature, humidity and optical sensors are deployed in the inspection area to collect environmental factor data. The surface image of the cloth is captured by industrial cameras, and the temperature, humidity and dust concentration data are collected by sensors. The image is denoised, grayscaled and contrast enhanced. The environmental data is cleaned and standardized, and the image and environmental data are synchronized.

3. The method for detecting cloth defects based on machine vision according to claim 2, characterized in that: In the step 2, the process of obtaining the defect feature table and the environmental interference feature table includes: Extract the preprocessed cloth surface image, use the gray-level co-occurrence matrix algorithm to analyze the texture of the image, extract the texture features, apply the Canny edge detection algorithm to identify the edge features in the image, and analyze the shape features of the image by calculating the area, perimeter and shape factor in the image. Analyze the color features of the image by extracting the color histogram; According to the production standards and quality requirements of the cloth, the defect attributes of the cloth are preset, the extracted texture features, edge features, shape features and color features are analyzed, the normal area and the defect area are distinguished, the features that characterize the defects are determined, and the defect features are extracted for marking; Analyze the pre-processed environmental factor data, extract the interference features of the environmental factors, which are temperature features, humidity features and dust concentration features. According to the environmental requirements and experience of cloth detection, preset the environmental interference properties of the cloth, identify and extract the environmental interference features that interfere with cloth detection, and mark the extracted environmental interference features. Assign identifiers to the marked defect features and environmental interference features, record the corresponding defect number, image position, size and shape of the defect features, and record the corresponding environmental conditions and timestamp information of the environmental interference features; associate the marked defect features and environmental interference features with the corresponding image data and environmental factor data to form a complete data sample; All data about defect features are organized into a defect feature table, including defect number, category, location, size, shape feature information, and corresponding image data index; all data about environmental interference features are organized into an environmental interference feature table, including interference type, interference intensity, environmental conditions and timestamp information.

4. The method for detecting cloth defects based on machine vision according to claim 3, characterized in that: In step 3, the construction process of the defect classification model and the environmental interference model includes: The labeled defect feature sample data is extracted from the defect feature sequence table, the data set is divided into a defect feature training set and a test set, and the defect category is converted into a numerical form. The defect feature training set is used in combination with the decision tree classification algorithm to build a defect classification model, and the test set is used to test and evaluate the model. Based on the classification model and the associated data in the defect feature sequence table, the defect classification evaluation index is obtained to distinguish the severity of the defects to determine different types of defects. Sample data is extracted from the environmental interference feature table, the data set is divided into an environmental interference feature training set and a test set, and the interference type is converted into a numerical form. An environmental interference model is built based on the training set and a convolutional neural network, and the model performance is evaluated using the test set to analyze its recognition ability for different interferences. According to the associated data between the model and the environmental interference feature table, the environmental interference evaluation index is obtained, and the interference of environmental features on cloth detection is analyzed.

5. The method for detecting cloth defects based on machine vision according to claim 4, characterized in that: The expression of the defect classification evaluation index is: ; in, is the defect classification evaluation index, For the The texture feature value of samples, For the The marginal eigenvalues ​​of samples, For the The shape feature values ​​of samples, is the reference value of the color feature, is the sample size, It is the defect classification evaluation index magnification factor, which is used to adjust the sensitivity of the defect classification evaluation index. It is the reference value offset of the defect classification evaluation index, which is used to adjust the reference point of the defect classification evaluation index. The higher the value, the more serious the defect; The expression of the environmental interference assessment index is: ; in, is the environmental disturbance assessment index, For the The temperature value of each sample, For the The humidity value of each sample, For the The dust concentration value of each sample is , and Respectively represent the reference values ​​of temperature, humidity and dust concentration, is the sample size, is the environmental interference assessment index amplification factor, which is used to adjust the sensitivity of the environmental interference assessment index. It is the reference value offset of the environmental interference assessment index, used to adjust the reference point of the environmental interference assessment index. The higher the value, the more serious the environmental interference.

6. The method for detecting cloth defects based on machine vision according to claim 5, characterized in that: In step 4, the process of early warning analysis of cloth detection defects includes: The output data of the defect classification model and the environmental interference model are correlated, the potential relationship between defects and environmental interference is analyzed, and historical defect data, environmental condition records, and production parameter information are integrated. The defect characteristics and environmental interference characteristics are combined to form a comprehensive feature set. Based on the correlation data analysis results and the comprehensive feature set, a cloth defect early warning model is constructed to conduct early warning analysis on defects in cloth detection. The defect warning coefficient is obtained by combining the defect classification evaluation index, the environmental interference evaluation index, the cloth defect early warning model analysis results, and the conveying speed during cloth detection. The severity of defects in cloth detection is evaluated, and the warning level is set according to the severity and frequency of defects, including blue, yellow, orange and red warning levels. The severity of the warning level increases gradually from blue to red, and warning thresholds and response measures are set for each level.

7. The method for detecting cloth defects based on machine vision according to claim 6, characterized in that: The expression of the defect warning coefficient is: ; in, It is the defect warning coefficient, which is used to evaluate the severity of defects in cloth detection. For the The defect classification evaluation index of samples, For the The environmental disturbance assessment index of the samples, is the current cloth detection and conveying speed, is the preset reference speed value, is the sample size, The higher the value, the more severe the defect.

8. The method for detecting cloth defects based on machine vision according to claim 7, characterized in that: The plurality of warning levels correspond to the plurality of warning thresholds, the warning thresholds include an upper threshold and a lower threshold, and the correspondence between the plurality of warning levels and the plurality of warning thresholds is as follows: Blue warning level ; Yellow warning level ; Orange warning level ; Red alert level ; in, is the defect warning coefficient, is the lower threshold corresponding to the yellow warning level and the upper threshold corresponding to the blue warning level. is the lower threshold corresponding to the orange warning level and the upper threshold corresponding to the yellow warning level. It is the lower threshold corresponding to the red warning level and the upper threshold corresponding to the orange warning level.

9. The method for detecting cloth defects based on machine vision according to claim 8, characterized in that: In step 5, the output process of the test report includes: Receive the warning analysis results from the cloth defect warning model, including the location, type and warning level of the defect, and classify the detected defect features according to the warning analysis results, read the judgment criteria for various defects from the database and preset the defect detection standards, compare the classified defect features with the preset standards to determine whether they meet any one or more conditions, and determine whether the detected defects exceed the allowable range of the preset standards or do not meet the standards based on the comparison results. If they meet the standards, they are determined to be real defects, and organize the defect information and the judgment results to generate a test report containing the test date, time, defect type, location, and warning level information, and output it to relevant departments or personnel in the form of electronic documents.

10. A machine vision-based cloth defect detection system, used to implement the machine vision-based cloth defect detection method according to any one of claims 1 to 9, comprising a detection platform, characterized in that: The detection platform is communicatively connected with an image acquisition module, an environmental monitoring module, a data preprocessing module, a feature extraction module, a model building module, an early warning analysis module and a report generation module, wherein the modules are electrically connected with each other; The image acquisition module is used to capture the image of the surface of the cloth; The environmental monitoring module is used to monitor the environmental parameters of temperature, humidity and dust concentration in the detection area in combination with sensors to obtain environmental interference factor data; The data preprocessing module is used to preprocess the collected image data and preprocess the environmental interference factor data acquired by the environmental monitoring module; The feature extraction module is used to extract the defect features of texture, edge, shape and color from the preprocessed image to provide key information for defect classification, and to extract the environmental interference features of temperature, humidity and dust concentration from the preprocessed environmental interference factor data; The model building module uses a machine learning algorithm to build a defect classification model based on the extracted defect features, classifies defects, distinguishes different types of defects, analyzes environmental factor data, identifies the impact of environmental changes on detection, and builds an environmental interference model based on the extracted environmental interference features to analyze the interference of different environmental features on the cloth detection process; The early warning analysis module combines the outputs of the defect classification model and the environmental interference model to build a cloth defect early warning model, and comprehensively considers the conveying speed during cloth detection to perform real-time early warning analysis, discover potential defect problems, and issue early warnings according to the severity; The report generation module is used to organize the test results, generate detailed test reports, and manage test data.

Citation Information

Patent Citations

  • Method and system for detecting defects of textile surface based on significance detection

    CN107064160A

  • Cloth defect detection method with defect grading function

    CN110889837A

  • Non-woven fabric flaw detection and classification method and system based on machine vision

    CN113554080A

  • Non-woven fabric defect detection method based on deep learning method

    CN115170475A

  • Deep learning-based colored cloth defect detection method and system, and storage medium

    CN115661118A

Cited By

  • Fabric production method capable of randomly changing appearance and function and fabric

    CN119795684A

  • Bag production method capable of randomly changing appearance and function

    CN119821843A

  • Quality evaluation method and device based on non-woven fabric defect detection

    CN120181649A

  • A quality evaluation method and device based on non-woven fabric defect detection

    CN120181649B

  • Method for automatically detecting surface defects of printed matter by utilizing machine vision

    CN120446143A