Fabric defect detection method for producing protective clothing

Through local binary mode algorithm and grayscale value correction technology, the problem of edge intersection deviation caused by fixed standard width in protective clothing fabric detection is solved, and the accurate identification and detection of fabric defects is achieved.

CN119313676AInactive Publication Date: 2025-01-14邦威防护科技股份有限公司

Patent Information

Application Number
CN202411857540.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When detecting defects in protective clothing fabrics, the deviation of edge intersection points due to the limitation of fixed standard widths, affecting the identification accuracy of abnormal threads.

Method used

The local binary mode algorithm is used to extract the texture characteristics of the fabric, calculate the characteristic prominence of the pixel points, correct the grayscale value, and calculate the defect degree of the fabric based on similarity. The accuracy and difference of the calculation results are ensured through various data calculations.

Benefits of technology

It improves the accuracy of fabric defect detection and the accuracy of identification difficulty, and can accurately identify defect areas under complex textures, reducing the amount of calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313676A_ABST
    Figure CN119313676A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to a fabric defect detection method for producing protective clothing, and the method comprises the steps: obtaining a grey-scale map of a fabric for producing the protective clothing, extracting the texture features of the grey-scale map through a local binary pattern algorithm, and obtaining the feature value of each pixel point in the grey-scale map; the method comprises the following steps: continuously selecting a plurality of pixel points in a current row by taking any pixel point as a starting point to obtain a continuous pixel set of any pixel point, calculating the feature prominence degree of any pixel point in any row, and correcting the gray value of the pixel point in the current row by utilizing the index difference of the pixel point with the maximum feature prominence degree in the current row and the adjacent row to obtain a gray value of the pixel point in the current row. And obtaining the similarity between the corrected grey-scale map and a pre-stored intact grey-scale map, calculating the defect degree of the fabric, and carrying out defect detection on the fabric based on a comparison result of the defect degree and a preset threshold value. According to the invention, the fabric defect detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and more specifically, to a fabric defect detection method for producing protective clothing. Background Art

[0002] Protective clothing plays a vital role in isolating external threats such as germs and harmful ultrafine dust. Its integrity is the basic premise for ensuring effective protection. The quality of protective clothing fabrics directly determines the protective performance of protective clothing. Therefore, in order to ensure that the protective clothing produced can achieve the expected protective effect, it is very important to conduct defect detection on the fabrics used to produce protective clothing.

[0003] In the related art, a method for identifying fabric defect line defects for textile production is disclosed in a patent application document with publication number CN115311264A, the method comprising: obtaining a standard edge intersection position based on a standard width of a stitch area of ​​an image of a fabric area to be detected; obtaining a mismatch degree of each edge intersection according to the standard edge intersection position and the corresponding actual edge intersection position, and screening out abnormal edge intersections; screening out abnormal pixel points according to the degree of abnormality; marking the abnormal pixel point as an abnormal weaving line pixel point if the distance between the abnormal pixel point and the abnormal edge intersection point is within a preset distance range; and obtaining abnormal weaving lines according to the abnormal weaving line pixel points.

[0004] However, when determining the standard edge intersection position in the above scheme, it depends on the standard width of the stitching area. The standard width is a fixed value. However, since the stitching quality of the fabric may be affected by different fabric types, stitching processes and machine settings, the standard of setting a fixed width may not be able to adapt to all situations, resulting in a certain deviation in the determined standard edge intersection position, thereby affecting the determination of the mismatch of the edge intersection, and further resulting in the accuracy of the identified abnormal weaving lines being limited. Summary of the invention

[0005] In order to solve the problem of being unable to accurately identify defects in fabrics, the present invention proposes a fabric defect detection method for producing protective clothing. The method comprises: Obtain a grayscale image of the fabric used to produce protective clothing, extract texture features of the grayscale image using a local binary pattern algorithm, and obtain feature values ​​of each pixel in the grayscale image; Starting from any pixel point, multiple pixels are continuously selected in the current row to obtain a continuous pixel set of any pixel point, and the feature prominence of any pixel point in any row is calculated. , is the number of consecutive pixels in the pixel point The probability of the feature value of a pixel appearing in the set of feature values ​​of all pixels, The difficulty of defect recognition of fabrics represents the complexity of fabric texture. is the number of pixels in a continuous pixel set, The natural constant An exponential function with base ; Using the index difference of the pixel with the most prominent feature in the current row and the adjacent row, the gray value of the pixel in the current row is corrected, and the correction value is negatively correlated with the index difference; The similarity between the corrected grayscale image and the pre-stored intact grayscale image is obtained to calculate the defect degree of the fabric. The defect degree is negatively correlated with the similarity, so that defect detection of the fabric is performed based on the comparison result between the defect degree and the preset threshold.

[0006] The present invention combines a variety of data to calculate the feature prominence of pixel points, thereby ensuring the accuracy of the calculation results. When the grayscale value of the pixel points is corrected, the grayscale difference between the pixel points in the defective area and the pixel points in the normal area can be increased. Therefore, when there are defects in the fabric, the difference between the corrected grayscale image and the intact grayscale image can be increased, thereby accurately identifying the fabric defects.

[0007] Preferably, the defect recognition difficulty satisfies the following relationship: ; In the formula, Difficulty in identifying fabric defects; is the average value of the gradient amplitude of the pixel points in the grayscale image; is the number of different eigenvalues ​​in the eigenvalue set; is the variance of the number of pixels corresponding to different eigenvalues; is the maximum number of pixels corresponding to different eigenvalues; The natural constant An exponential function with base .

[0008] The present invention determines the difficulty of defect recognition of fabrics by integrating a variety of data, can ensure the accuracy of the calculation results, and can limit the range of the defect recognition difficulty to 0-1, thereby reducing the amount of calculation.

[0009] Preferably, the method for obtaining the characteristic value includes: Taking any pixel as the center, preset a neighborhood window of any pixel, and calculate the gray value difference between the pixels in the neighborhood window except any pixel and any pixel; If the gray value difference is greater than or equal to zero, it is marked as 1, if it is less than zero, it is marked as 0, and the binary string in the neighborhood window is obtained. The binary string is converted into decimal to obtain the characteristic value of any pixel point.

[0010] The present invention calculates the characteristic value of a pixel point, and can utilize the characteristic distribution difference between the pixel points in the normal area and the pixel points in the defect area to evaluate the possibility that each pixel point is a pixel point in the defect area.

[0011] Preferably, the method for obtaining the gradient amplitude of a pixel point in a grayscale image includes: The Sobel operator is used to obtain the horizontal and vertical gradients of each pixel in the grayscale image, and the arithmetic square root of the sum of the squares of the horizontal and vertical gradients of any pixel is calculated to obtain the gradient amplitude of any pixel.

[0012] Preferably, the correction value satisfies the following relationship: ; In the formula, In the grayscale image Line Correction value of the gray value of each pixel; , as well as They are the grayscale images Row, No. Row and The index value of the pixel with the most prominent feature in the row; is the absolute value symbol; The natural constant An exponential function with base ; In the grayscale image Line The gray value of a pixel.

[0013] Based on the feature that the defective area usually appears as a continuous area, the present invention adopts gamma transformation to correct the gray value of the pixel point, thereby ensuring the accuracy of the correction result.

[0014] Preferably, the method for obtaining the similarity between the corrected grayscale image and the pre-stored intact grayscale image includes: Performing vectorization processing on the corrected grayscale image and the intact grayscale image to obtain a first vector and a second vector; The cosine similarity between the first vector and the second vector is calculated to obtain the similarity between the corrected grayscale image and the intact grayscale image.

[0015] The present invention obtains the similarity between the corrected grayscale image and the pre-stored intact grayscale image based on the template matching algorithm, and can identify the subtle differences between images with complex textures, thus ensuring the accuracy of the similarity.

[0016] Preferably, the defect degree satisfies the following relationship: ; In the formula, The degree of fabric defects; is the similarity between the corrected grayscale image and the intact grayscale image; The natural constant An exponential function with base .

[0017] Preferably, defect detection of fabrics includes: A preset threshold is obtained. When the defect degree of the fabric is greater than the preset threshold, the fabric is judged to be defective; when the defect degree of the fabric is less than or equal to the preset threshold, the fabric is judged to be intact.

[0018] The present invention has the following effects: 1. The present invention combines the difficulty of fabric defect recognition and the difference in the characteristic value distribution of pixels in the normal area and pixels in the defective area, and can accurately measure the possibility that each pixel is a pixel in the defective area, thereby ensuring the accuracy of the determined feature prominence.

[0019] 2. The present invention utilizes the fact that fabric defects usually exist in patches. Based on the index difference of the pixel points with the greatest feature prominence in the current row and the adjacent row, the positional distance of the pixel points that may belong to the defective area in different rows is measured to determine whether the fabric has defects.

[0020] 3. The present invention corrects the grayscale value of the pixel based on the index difference, which can increase the difference between the pixel points in the defective area and the pixel points in the normal area, so that when there are defects in the fabric, there is a large difference between the corrected grayscale image and the intact grayscale image, thereby accurately detecting fabric defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 The present invention is a schematic flow chart of the steps of a fabric defect detection method for producing protective clothing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0023] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0024] Reference Figure 1 , a fabric defect detection method for producing protective clothing, comprising steps S1 to S5, specifically as follows: S1: Obtain a grayscale image of the protective clothing fabric, extract the texture features of the grayscale image using a local binary pattern algorithm, and obtain the feature value of each pixel in the grayscale image.

[0025] First, fixed lighting conditions can be maintained at the fabric unwinding and conveying point, and image acquisition equipment, such as industrial cameras, high-definition cameras, etc., can be installed at a position where the front view of the fabric can be captured to capture images of the fabric used to produce protective clothing in real time.

[0026] Then, the collected image can be grayed using an image graying processing method, such as a weighted average method, a threshold method, etc., to obtain a grayscale image of the collected image. This embodiment does not specifically limit the graying processing method.

[0027] It should be noted that since there are many types of fabrics used to make protective clothing, and the surface texture of each fabric is different, the defect characteristics will also be different. The present invention can effectively measure and distinguish the texture characteristics of different fabrics by calculating the characteristic values ​​of pixel points, thereby identifying and analyzing the defects of various fabrics.

[0028] In an exemplary embodiment of the present invention, the characteristic value of a pixel in a grayscale image may be determined by the following steps: Taking any pixel as the center, preset a neighborhood window of any pixel, and calculate the grayscale value difference between the pixels in the neighborhood window except any pixel and any pixel; if the grayscale value difference is greater than or equal to zero, it is marked as 1, if it is less than zero, it is marked as 0, and the binary string in the neighborhood window is obtained. The binary string is converted into decimal to obtain the eigenvalue of any pixel.

[0029] Exemplarily, taking the selection of a 3×3 neighborhood window as an example, the determination of the characteristic value of a pixel point is described in detail. First, any pixel point and its eight neighboring pixel points can be regarded as the pixel points in the neighborhood window of the pixel point, and then, the gray value difference between the eight neighboring pixel points and the pixel point is calculated respectively, and the eight neighboring pixel points whose gray value difference is greater than or equal to zero are marked as 1, and the eight neighboring pixel points whose gray value difference is less than zero are marked as 0, and the corresponding label values ​​of all eight neighboring pixel points are counted in a clockwise or counterclockwise order to obtain a binary string, and finally, the binary string is converted into decimal to obtain the characteristic value of the pixel point.

[0030] S2: Calculate the defect recognition difficulty of the fabric. The defect recognition difficulty represents the complexity of the fabric texture.

[0031] Specifically, the difficulty of fabric defect recognition satisfies the following relationship: ; In the formula, Difficulty in identifying fabric defects; is the average value of the gradient amplitude of the pixel points in the grayscale image; is the number of different eigenvalues ​​in the eigenvalue set; is the variance of the number of pixels corresponding to different eigenvalues; is the maximum number of pixels corresponding to different eigenvalues, used for Perform normalization; The natural constant An exponential function with 255 as the base. 255 is the maximum grayscale value of a pixel. Normalize; Since the grayscale value of a pixel ranges from 0 to 255, 256 is the number of different grayscale values ​​within this range. Normalize.

[0032] in, It reflects the overall level of the gradient amplitude of all pixels in the grayscale image. The larger the value, the more complex and diverse the texture of the fabric. When detecting defects in fabrics, complex and diverse textures will interfere with the identification of defects, making it relatively difficult to identify defects in fabrics.

[0033] It should be noted that when the texture distribution of the fabric is more uniform, the eigenvalue distribution of the local binary mode of the grayscale image is more concentrated, and the number of different eigenvalues ​​is smaller. When there are defects in the fabric, the eigenvalue distribution of the local binary mode of the grayscale image will deviate significantly, making the defects in the fabric easier to identify. On the contrary, when the texture of the fabric is more complex, the eigenvalue distribution of the local binary mode of the grayscale image is more dispersed, and the number of different eigenvalues ​​is larger. When there are defects in the fabric, the difference between the eigenvalue of the local binary mode of the defect area and the surrounding texture is not obvious, resulting in some defects being confused with the texture, which increases the difficulty of identifying defects in the fabric. Therefore, The smaller it is, the more evenly distributed the fabric texture is, and the easier it is to identify fabric defects. The larger the value, the more complex the fabric texture is, and the more difficult it is to identify fabric defects.

[0034] in, It reflects the concentration of the eigenvalue distribution of the grayscale image. The larger the value, the more frequent eigenvalues ​​appear in the grayscale image, that is, the vast majority of pixels have the same eigenvalue, indicating that the fabric has relatively uniform texture characteristics. When there are defects in the fabric, the eigenvalues ​​of the pixels in the defective area are quite different from those of the surrounding normal textures. More pixels with different eigenvalues ​​may appear, causing the uniform texture characteristics to be destroyed, making the eigenvalues ​​of the pixels in the defective area more prominent, thereby reducing the difficulty of defect recognition.

[0035] It should be noted that the more complex the texture of the fabric, the more difficult it is to identify fabric defects.

[0036] In an exemplary embodiment of the present invention, the determination of the gradient magnitude of a pixel point may be achieved by the following steps: The Sobel operator is used to obtain the horizontal and vertical gradients of each pixel in the grayscale image, and the arithmetic square root of the sum of the squares of the horizontal and vertical gradients of any pixel is calculated to obtain the gradient amplitude of any pixel.

[0037] Optionally, other operators, such as Prewitt operator, etc., may also be used to calculate the gradient amplitude of the pixel point. It should be noted that the process of calculating the gradient amplitude of the pixel point using the Prewitt operator is a prior art and will not be described in detail in this embodiment.

[0038] S3: Starting from any pixel point, multiple pixels are continuously selected in the current row to obtain a continuous pixel set of any pixel point, and the feature prominence of any pixel point is calculated.

[0039] It should be noted that, since fabric defects usually have a certain length or continuity, the present invention can capture the spatial distribution information of the defective area by measuring the feature using a continuous pixel set of pixel points.

[0040] Optionally, the number of pixels selected continuously in the current row starting from any pixel point may be the number of pixels corresponding to the minimum length of defects that have appeared in the fabric, or the number of pixels corresponding to the median length of defects that have appeared in the fabric. This embodiment does not specifically limit this.

[0041] Among them, the feature prominence refers to data that can characterize the possibility that the feature value of a pixel point is generated by a fabric defect. For example, when the feature value of any pixel point is more likely to be generated by a fabric defect, the feature prominence of the pixel point is greater; conversely, when the feature value of any pixel point is less likely to be generated by a fabric defect, it means that the feature value is more likely to be generated by fabric texture, and the corresponding feature prominence of the pixel point is relatively small.

[0042] Specifically, the feature prominence of any pixel satisfies the following relationship: ; In the formula, Grayscale image Line The feature prominence of each pixel; is the number of consecutive pixels in the pixel point The probability of the eigenvalue of a pixel appearing in the set of eigenvalues ​​of all pixels, where: , is the number of consecutive pixels in the pixel point The feature value of a pixel, the number of times it appears in the feature value set of all pixels, is the number of pixels in the grayscale image; Difficulty in identifying fabric defects; is the number of pixels in a continuous pixel set; The natural constant An exponential function with base .

[0043] in, The larger the value is, the more pixels the eigenvalue corresponds to. The eigenvalue is more likely to represent the texture of the image, and the possibility that the continuous pixel set is a defect is lower. Line The feature prominence of each pixel is low; The smaller the value, the smaller the number of pixels corresponding to the eigenvalue is. The eigenvalue is more likely to be caused by a fabric defect, and the possibility that the continuous pixel set is a defect is higher. Line The feature prominence of each pixel is high.

[0044] It should be noted that due to the different complexity of the texture of different fabrics, there are different characteristic differences between the defective part and the normal texture part. Therefore, the present invention combines the difficulty of defect recognition of fabrics to Make corrections. Among them, The smaller the defect, the easier it is to identify. The smaller the degree of correction; on the contrary, The larger the defect is, the harder it is to identify. A larger degree of correction is performed, so that the characteristic values ​​generated by fabric defects are more prominent.

[0045] S4: using the index difference between the pixel points with the most prominent features in the current row and the adjacent row, the grayscale value of the pixel points in the current row is corrected, and the correction value is negatively correlated with the index difference.

[0046] Specifically, the correction value of the grayscale value of any pixel in any row satisfies the following relationship: ; In the formula, In the grayscale image Line Correction value of the gray value of each pixel; , as well as They are the grayscale images Row, No. Row and The index value of the pixel with the most prominent feature in the row, where the index value is the position of the pixel in the corresponding row; is the absolute value symbol; The natural constant An exponential function with base ; In the grayscale image Line The gray value of a pixel.

[0047] Optionally, if the index difference between the pixel points with the greatest feature prominence in the current row and the adjacent row is large, it means that the positions of the possible defective areas in the current row and the adjacent row are far apart. At this time, the feature prominence of the pixel points in the current row may be due to the randomness of fabric production, so there is no need to correct the grayscale value of the pixel points in the current row; on the contrary, when the index difference is small, it means that the positions of the possible defective areas in the current row and the adjacent rows are closer. At this time, the pixel points in the current row are more likely to be the pixels in the defective area. A greater degree of correction of the grayscale value of the pixel points in the current row can increase the impact of the pixels in the defective area.

[0048] In another embodiment, the negative correlation may also be represented by other calculation formulas, such as not being determined by gamma transformation but being determined directly by a multiplication calculation formula.

[0049] S5: Obtain the similarity between the corrected grayscale image and the pre-stored intact grayscale image, calculate the defect degree of the fabric, and the defect degree is negatively correlated with the similarity, so as to perform defect detection on the fabric based on the comparison result between the defect degree and the preset threshold.

[0050] The intact grayscale image refers to a grayscale image of a fabric without defects, which is used as a comparison reference. It should be noted that the method for determining the intact grayscale image is exactly the same as the method for determining the grayscale image of the fabric, and the present invention will not be described in detail here.

[0051] Optionally, a template matching algorithm can be used to obtain the similarity between the corrected grayscale image and the pre-stored intact grayscale image; the similarity between images can also be obtained using mean square error (MSE), structural similarity index (SSIM), etc. The present invention does not specifically limit the method for obtaining the similarity between images, and when the present invention obtains the similarity between images, a correlation-based template matching algorithm is used.

[0052] In an exemplary embodiment of the present invention, the similarity between the modified grayscale image and the pre-stored intact grayscale image can be determined by the following steps: The corrected grayscale image and the intact grayscale image are vectorized to obtain a first vector and a second vector; the cosine similarity between the first vector and the second vector is calculated to obtain the similarity between the corrected grayscale image and the intact grayscale image.

[0053] Specifically, when the cosine similarity between the first vector and the second vector is larger, the similarity between the corrected grayscale image and the intact grayscale image is higher, indicating that the possibility of defects in the fabric is smaller; conversely, when the cosine similarity between the first vector and the second vector is smaller, the similarity between the corrected grayscale image and the intact grayscale image is lower, indicating that the possibility of defects in the fabric is greater.

[0054] Furthermore, after determining the similarity between the corrected grayscale image and the pre-stored intact grayscale image, the degree of defect of the fabric can be calculated. Specifically, the degree of defect of the fabric satisfies the following relationship: ; In the formula, The degree of fabric defects; is the similarity between the corrected grayscale image and the intact grayscale image; The natural constant An exponential function with base .

[0055] in, is the normalized value of the similarity between the corrected grayscale image and the intact grayscale image.

[0056] In another embodiment, the degree of fabric defects can also be calculated by other methods, such as using The similarity is normalized, and then the negative correlation is not expressed by taking the opposite number, but by taking the reciprocal number.

[0057] In an exemplary embodiment of the present invention, fabric defects can be detected by the following steps: A preset threshold is obtained. When the defect degree of the fabric is greater than the preset threshold, the fabric is judged to be defective; when the defect degree of the fabric is less than or equal to the preset threshold, the fabric is judged to be intact.

[0058] Specifically, the threshold may be set to 0.3. When the defect degree of the fabric collected at any sampling moment is greater than 0.3, it is determined that there are defects in the fabric collected at that moment; if it is less than or equal to 0.3, it is determined that the fabric collected at that moment is intact.

[0059] Optionally, if the defect levels of the fabrics collected within a certain sampling period, such as within 1.5 seconds, are all greater than 0.3, the fabric is determined to be defective; otherwise, the fabric is determined to be intact.

[0060] Furthermore, when any of the above two solutions is used to determine that the fabric has defects, the operator can be notified in time to handle it, thereby realizing defect detection of the fabric.

[0061] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0062] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A fabric defect detection method for producing protective clothing, characterized in that: include: Obtaining a grayscale image of fabrics used to produce protective clothing, extracting texture features of the grayscale image using a local binary pattern algorithm, and obtaining a feature value of each pixel in the grayscale image; Starting from any pixel point, multiple pixels are continuously selected in the current row to obtain a continuous pixel set of any pixel point, and the feature prominence of any pixel point in any row is calculated. , is the number of consecutive pixels in the pixel point The probability of the feature value of a pixel appearing in the set of feature values ​​of all pixels, is the difficulty of fabric defect recognition, which represents the complexity of fabric texture. is the number of pixels in a continuous pixel set, The natural constant An exponential function with base ; Using the index difference between the pixel points with the most prominent features in the current row and the adjacent row, the grayscale value of the pixel points in the current row is corrected, and the correction value is negatively correlated with the index difference; The similarity between the corrected grayscale image and the pre-stored intact grayscale image is obtained, and the defect degree of the fabric is calculated. The defect degree is negatively correlated with the similarity, so as to perform defect detection on the fabric based on the comparison result of the defect degree with a preset threshold.

2. A fabric defect detection method for producing protective clothing according to claim 1, characterized in that: The defect recognition difficulty satisfies the following relationship: ; In the formula, Difficulty in identifying fabric defects; is the average value of the gradient amplitude of the pixel points in the grayscale image; is the number of different eigenvalues ​​in the eigenvalue set; is the variance of the number of pixels corresponding to different eigenvalues; is the maximum number of pixels corresponding to different eigenvalues; The natural constant An exponential function with base .

3. A fabric defect detection method for producing protective clothing according to claim 1 or 2, characterized in that: The method for obtaining the characteristic value includes: Taking any pixel point as the center, a neighborhood window of the any pixel point is preset, and the grayscale value difference between the pixel points in the neighborhood window except the any pixel point and the any pixel point is calculated; If the gray value difference is greater than or equal to zero, it is marked as 1, if it is less than zero, it is marked as 0, and a binary string in the neighborhood window is obtained, and the binary string is converted into decimal to obtain the characteristic value of any pixel point.

4. A fabric defect detection method for producing protective clothing according to claim 2, characterized in that: The method for obtaining the gradient amplitude of a pixel point in the grayscale image comprises: The Sobel operator is used to obtain the horizontal gradient and the vertical gradient of each pixel in the grayscale image, and the arithmetic square root of the sum of the squares of the horizontal gradient and the vertical gradient of any pixel is calculated to obtain the gradient amplitude of any pixel.

5. The fabric defect detection method for producing protective clothing according to claim 1, characterized in that: The correction value satisfies the following relationship: ; In the formula, In the grayscale image Line Correction value of the gray value of each pixel; , as well as They are the grayscale images Row, No. Row and The index value of the pixel with the most prominent feature in the row; is the absolute value symbol; The natural constant An exponential function with base ; In the grayscale image Line The gray value of a pixel.

6. A fabric defect detection method for producing protective clothing according to claim 1, characterized in that: The method for obtaining the similarity between the modified grayscale image and the pre-stored intact grayscale image includes: Performing vectorization processing on the corrected grayscale image and the intact grayscale image to obtain a first vector and a second vector; The cosine similarity between the first vector and the second vector is calculated to obtain the similarity between the corrected grayscale image and the intact grayscale image.

7. A fabric defect detection method for producing protective clothing according to claim 6, characterized in that: The degree of defect satisfies the following relationship: ; In the formula, The degree of fabric defects; is the similarity between the corrected grayscale image and the intact grayscale image; The natural constant An exponential function with base .

8. The fabric defect detection method for producing protective clothing according to claim 1, characterized in that: The defect detection of fabrics comprises: A preset threshold is obtained. When the defect degree of the fabric is greater than the preset threshold, it is determined that the fabric has defects; when the defect degree of the fabric is less than or equal to the preset threshold, it is determined that the fabric is intact.

Citation Information

Patent Citations

  • Fabric flaw line defect identification method for textile production

    CN115311264A

Cited By

  • Automobile precision component surface defect detection method and system based on machine vision

    CN121563991A