Fabric production line monitoring method and system based on machine vision

By calculating the possibility of fiber ends and the degree of broken wire of each pixel point in the fabric image, adaptively adjusting the significance detection scale, solving the problem of low accuracy in fabric defect detection, and achieving high accuracy defect detection of complex fabrics.

CN119477914BActive Publication Date: 2025-04-11SHAANXI YOUBANG BIOLOGICAL PROD MFG CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510059773.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-11
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

When the prior art detects defects on fabrics with relatively complex structures, there is a problem that the defect detection results are low accuracy, especially the characteristics of the natural fiber ends and the ends of the broken wire ends, resulting in deviations in the defect edge area.

Method used

By obtaining the grayscale image to be detected of the fabric, the possibility that each pixel point is the end of the fiber is calculated, and the degree of broken wire is calculated based on the possibility of the end of the fiber and the gradient direction characteristics, and the number of scales during significance detection is adaptively adjusted to improve the accuracy of defect detection.

Benefits of technology

This method can accurately determine the pixel points in the end of the fiber that are the end of the broken wire, reduce the influence of the end of the natural fiber, improve the accuracy of defect detection on complex fabrics, and achieve accurate monitoring of the fabric production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477914B_ABST
    Figure CN119477914B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and more specifically, to a method and system for monitoring a fabric production line based on machine vision, the method comprising: obtaining a grayscale image to be detected, and calculating the possibility that each pixel is a fiber end, calculating the degree of broken wire at the pixel based on the possibility that any pixel is a fiber end, and updating the number of scales when performing significance detection on the pixel, wherein the updated number of scales is negatively correlated with the degree of broken wire at the pixel, so that defect detection is performed on the grayscale image to be detected according to the updated number of scales of each pixel. The present invention can adaptively adjust the number of scales when performing significance detection on each pixel according to the degree of broken wire at each pixel, can better capture subtle significance changes, can improve the accuracy of defect detection, and thus achieve accurate monitoring of the fabric production process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and more specifically, to a method and system for monitoring a cloth production line based on machine vision. Background Art

[0002] Fabric is the basis of clothing, household items and industrial materials, and its quality is directly related to the service life, comfort and safety of the product. When broken yarn or thread appears on the surface of the fabric, the tightness of the local area will be reduced, and may even cause further damage. Therefore, the improvement of defect detection methods can improve product quality, especially for fabrics with more complex structures. The monitoring system based on machine vision can effectively improve the detection efficiency of defect detection.

[0003] In the related art, a method for detecting fabric defects that is resistant to texture interference is disclosed in a patent application document with publication number CN114820631A. The method includes: using the characteristics of the frequency spectrum corresponding to the texture edge image of the fabric to be detected to determine the texture direction angle of the fabric to be detected, and using a sliding window template determined according to the texture direction angle to traverse the texture edge image, thereby determining the degree of matching between each pixel point and the sliding window template, and removing the texture edge pixel points, thereby determining the defective edge pixel points and obtaining the defective edge area.

[0004] Generally speaking, fabrics with more complex structures may contain untrimmed or unprocessed natural fibers, and the ends of natural fibers are usually irregular or forked. As a result, the texture edge image of the fabric determined by the above scheme may contain pixels of natural fiber ends. The features of natural fiber ends and broken wire ends are similar, and the determined defective edge pixels may contain pixels of natural fiber ends, resulting in a certain deviation in the obtained defective edge area, thereby reducing the accuracy of the defect detection results to a certain extent. Summary of the invention

[0005] In order to solve the problem of low accuracy of defect detection results obtained when performing defect detection on cloth, the present invention provides a cloth production line monitoring method and system based on machine vision.

[0006] According to a first aspect of an embodiment of the present invention, a method for monitoring a cloth production line based on machine vision is provided, comprising:

[0007] Obtain a grayscale image of the fabric to be detected; calculate the possibility that each pixel in the grayscale image to be detected is a fiber end, and the possibility of the fiber end is positively correlated with the difference between the average and median grayscale values ​​of all pixels in a preset initial area corresponding to the pixel, and the cumulative sum of the gradient amplitudes of the pixels in the initial area in four gradient directions;

[0008] Expand the side length of the initial area to the preset value to obtain the reference area, and calculate the degree of broken wire at any pixel point: ; is the grayscale image to be detected The degree of broken wires per pixel; To preset hyperparameters; is the maximum value of the sum of the gradient amplitudes of all pixels in the reference area in the four gradient directions; In the reference area, except The cumulative sum of the gradient amplitudes in the other three gradient directions; For the The probability that a pixel is the end of a fiber; , are the maximum values ​​of the gradient amplitudes of the pixels in the grayscale image to be detected and the reference area respectively; is the natural exponential function;

[0009] The number of scales used for saliency detection of each pixel is updated, and the updated number of scales is negatively correlated with the degree of broken wires of the corresponding pixel, so that defect detection is performed on the grayscale image to be detected according to the updated number of scales.

[0010] The present invention determines the possibility of each pixel being a fiber end by comprehensively analyzing various data, so as to ensure the accuracy of the possibility of each pixel being a fiber end. Based on the possibility of each pixel being a fiber end, the degree of broken wire at each pixel is determined, so as to further determine the possibility of each pixel being a broken wire end, thereby reducing the influence of natural fiber ends. According to the degree of broken wire at each pixel, the number of scales when performing significance detection on each pixel is adaptively adjusted, so as to better capture the subtle significance changes of each pixel, thereby improving the accuracy of defect detection on fabrics with more complex structures.

[0011] Preferably, the possibility that each pixel in the grayscale image to be detected is a fiber end satisfies the following relationship:

[0012] ;

[0013] In the formula, For the The probability that a pixel is the end of a fiber; For the The average value of the pixels in the initial area of ​​pixels; For the The median of the pixels in the initial area of ​​pixels; is the absolute value symbol; For the The first pixel in the initial area pixels, in the The gradient magnitude in each gradient direction; is the number of pixels in the initial area; is the summation symbol.

[0014] The present invention determines the degree of broken wires at each pixel point by comprehensively considering multiple aspects, thereby ensuring the accuracy of the determined degree of broken wires, and thus accurately determining the pixel point at the fiber end that is the broken wire end.

[0015] Preferably, the method for obtaining the gradient amplitude includes:

[0016] The Sobel operator is used to obtain the gradient amplitude of the pixels in the initial area in each gradient direction.

[0017] Preferably, the number of scales for saliency detection of each pixel is updated to satisfy the following relationship:

[0018] ;

[0019] In the formula, For the The number of scales for saliency detection of pixels; For the The degree of broken wires at each pixel; is the preset scale quantity; To preset the minimum number of scales; For natural numbers The exponential function with base , is the ceiling function.

[0020] The present invention can accurately correct the number of scales when performing saliency detection on each pixel point.

[0021] Preferably, performing defect detection on the grayscale image to be detected according to the updated number of scales includes:

[0022] Obtain the updated scale number of each pixel point, and expand the initial area of ​​each pixel point a corresponding number of times according to the preset length to obtain a corresponding number of measurement areas;

[0023] Calculate the difference between the possibility of each pixel being a fiber end in any measurement area and the possibility of the remaining pixels in the grayscale image to be detected being fiber ends, and use the average value of the difference as the significance value of the corresponding pixel in any measurement area;

[0024] The average value of the significance value of each pixel in each measurement area is taken as the final significance value of the corresponding pixel, so as to perform defect detection on the grayscale image to be detected according to the final significance value.

[0025] The present invention can comprehensively analyze the significance of each pixel at multiple scales and determine the final significance of each pixel, so as to accurately perform defect detection on the grayscale image to be detected based on the final significance.

[0026] Preferably, defect detection is performed on the grayscale image to be detected according to the final significance value, including:

[0027] When the final significance value of any pixel point is greater than a preset threshold, it is determined that any pixel point belongs to the broken wire defect area, and all pixel points belonging to the broken wire defect area in the grayscale image to be detected are obtained to obtain the broken wire defect area.

[0028] Preferably, obtaining a grayscale image of the cloth to be detected includes:

[0029] A grayscale image of the cloth is obtained, and the grayscale image is denoised using a non-local mean filtering algorithm. The grayscale image after denoising is used as the grayscale image to be detected.

[0030] The present invention performs noise reduction processing on the acquired grayscale image, which can reduce the phenomenon of false detection and missed detection when performing defect detection on the cloth, thereby improving the accuracy of defect detection on the cloth to a certain extent.

[0031] According to a second aspect of the present invention, a machine vision-based cloth production line monitoring system is provided. The system includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the steps of the first aspect of the present invention.

[0032] The present invention has the following effects:

[0033] The present invention determines the possibility that each pixel point is a fiber end, and then uses the distinguishing features of the broken wire end and the natural fiber end, that is, the overall gradient direction of the pixel points in the area where the broken wire end is located is relatively chaotic, the overall gradient direction of the pixel points in the area where the natural fiber end is located is relatively consistent, and the gradient amplitude of the broken wire end is larger than that of the natural fiber end, to calculate the broken wire degree of each pixel point, and can accurately measure the possibility that each pixel point is a broken wire end, thereby reducing the influence of the natural fiber end; and according to the broken wire degree of each pixel point, the number of scales when performing significance detection on each pixel point is adaptively adjusted, and the subtle significance changes of each pixel point can be better captured, so that the broken wire defect in the cloth can be accurately detected, and the accuracy of defect detection of cloth with a relatively complex structure can be improved, thereby realizing accurate monitoring of the cloth production process. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] 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:

[0035] Figure 1 It is a flowchart of the steps of a method for monitoring a cloth production line based on machine vision according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] 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.

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

[0038] Reference Figure 1 The cloth production line monitoring method based on machine vision includes steps S1 to S4, which are as follows:

[0039] S1: Obtain a grayscale image of the cloth to be detected.

[0040] In an exemplary embodiment of the present invention, the determination of the grayscale image to be detected can be achieved by the following steps:

[0041] A grayscale image of the cloth is obtained, and the grayscale image is denoised using a non-local mean filtering algorithm. The grayscale image after denoising is used as the grayscale image to be detected.

[0042] The grayscale image to be detected can be a grayscale image of an image of a fabric to be detected, which is used as a basic image for defect detection. Specifically, a high-definition camera can be used to capture an image of the fabric to be detected, and then the captured image can be grayscaled, and the grayscale image obtained by the grayscale processing can be subjected to noise reduction processing to reduce the influence of noise in the grayscale image.

[0043] Optionally, since the cloth has a relatively complex texture and structure, a non-local mean filtering algorithm is used to perform denoising on the grayscale image of the cloth, which can effectively remove various types of noise such as Gaussian noise and salt and pepper noise in the grayscale image, and can retain the real texture and structure in the grayscale image, thereby retaining more detail information in the grayscale image, thereby providing a more reliable basis for subsequent image processing and analysis. It should be noted that using a non-local mean filtering algorithm to perform denoising on an image is a prior art, and this embodiment does not provide a detailed description of the denoising process of the grayscale image.

[0044] S2: Calculate the possibility that each pixel in the grayscale image to be detected is the fiber end. The possibility of the fiber end is positively correlated with the difference between the mean and median grayscale values ​​of all pixels in the preset initial area of ​​the corresponding pixel, and the cumulative sum of the gradient amplitudes of the pixels in the initial area in the four gradient directions.

[0045] It should be noted that since the broken wire defect area is an obvious broken area in the fabric fiber, that is, there is a fiber end at the broken wire, and the grayscale value of the fiber end in the corresponding initial area is more prominent, and the grayscale change intensity is larger, therefore, this characteristic can be used to determine the possibility that each pixel in the grayscale image to be detected is a fiber end.

[0046] In an exemplary embodiment of the present invention, the preset initial region refers to the initial scale set when performing significance detection on any pixel point, and is used as a region for analyzing the possibility that each pixel point is a fiber end at the initial scale. The initial region of each pixel point can be a range region centered on the corresponding pixel point and having a side length of a fixed value such as 7, and the size of the initial region of each pixel point is the same. Of course, an initial region of a suitable size can also be set according to specific circumstances. This embodiment does not specifically limit the size of the initial region of each pixel point.

[0047] Gradient direction and gradient magnitude are both important indicators for measuring pixel features. The gradient direction reflects the directionality of the pixel edge, while the gradient magnitude indicates the strength of the edge or the significance of the change.

[0048] Optionally, by counting the gradient amplitudes of each pixel point in the initial area in each gradient direction, the intensity of grayscale change in the area can be determined. When it is determined that the intensity of grayscale change in the area is large, it means that the possibility of the existence of fiber ends in the area is large. Therefore, the intensity of grayscale change in the initial area can be used to evaluate the possibility of the existence of fiber ends in the corresponding area.

[0049] In an exemplary embodiment of the present invention, the determination of the gradient magnitude of any pixel point can be achieved by the following steps:

[0050] The Sobel operator is used to obtain the gradient amplitude of the pixels in the initial area in each gradient direction.

[0051] Optionally, the Prewitt operator may be used to obtain the gradient amplitude of the pixel point. This embodiment does not specifically limit the method for determining the selected gradient amplitude. It should be noted that using the Sobel operator to obtain the gradient amplitude of the pixel point in each gradient direction is a prior art and will not be described in detail here.

[0052] Specifically, the possibility that any pixel in the grayscale image to be detected is the fiber end satisfies the following relationship:

[0053] ;

[0054] In the formula, For the The probability that a pixel is the end of a fiber; For the The average value of the pixels in the initial area of ​​pixels; For the The median of the pixels in the initial area of ​​pixels; is the absolute value symbol; For the The first pixel in the initial area pixels, in the The gradient magnitude in each gradient direction; is the number of pixels in the initial area; is the summation symbol.

[0055] in, Reflects the The difference between the mean and median grayscale values ​​of all pixels in the initial region of pixels; the larger the value, the greater the difference between the overall grayscale mean and the median grayscale value in the region, the greater the possibility of the existence of extreme grayscale values ​​in the region, and the corresponding possibility of the existence of fiber ends in the region is relatively large, then the The more pixels there are, the more likely they are fiber ends.

[0056] Reflects the The grayscale change intensity in the initial area of ​​each pixel point. The larger the value, the larger the cumulative sum of the gradient amplitudes of each pixel point in the area in all gradient directions. The gradient amplitude reflects the change intensity of the grayscale value. Therefore, the larger the value, the stronger the grayscale change in the area. When the value is larger, the credibility of the value is greater, and the possibility of the existence of fiber ends in the corresponding area is relatively large. The more pixels there are, the more likely they are fiber ends.

[0057] S3: Expand the side length of the initial area to a preset value to obtain a reference area, and calculate the degree of broken wire at any pixel point.

[0058] It should be noted that since the natural fiber ends of fabric fibers are usually similar to broken fiber ends, it depends on the possibility of each pixel being a fiber end, and it is impossible to distinguish whether the fiber end is a natural fiber end or a broken fiber end. Therefore, it is necessary to further analyze the possibility of each pixel being a broken fiber end based on the possibility of each pixel being a fiber end.

[0059] In an exemplary embodiment of the present invention, the reference area refers to an area formed by an initial area and a surrounding area corresponding to the initial area, which is used as an area for analyzing the possibility that each pixel is a broken wire end. For example, the preset value can be set to 13, and then the side length of the initial area can be expanded to 13 to obtain the reference area, that is, when the initial area of ​​any pixel is a 7×7 range area, the corresponding reference area is a range area with the pixel as the center and a side length of 13. Of course, a reference area of ​​a suitable size can also be set according to the specific situation. This embodiment does not specifically limit the side length of the reference area.

[0060] The degree of broken wire refers to the possibility that the corresponding pixel is the end of the broken wire, and is used to determine the possibility that all the pixels in the grayscale image to be detected are the ends of the broken wire. If the degree of broken wire of any pixel is large, the possibility that the pixel is the end of the broken wire is relatively large. On the contrary, if the degree of broken wire of any pixel is small, the possibility that the pixel is the end of the broken wire is relatively small.

[0061] Specifically, the degree of broken wire at any pixel in the grayscale image to be detected satisfies the following relationship:

[0062] ;

[0063] In the formula, is the grayscale image to be detected The degree of broken wires per pixel; To preset hyper parameters, in this embodiment , by setting the hyperparameters, we can prevent as well as The occurrence of zero, thus ensuring the adaptability of the calculation formula for the degree of wire breakage; is the maximum value of the sum of the gradient amplitudes of all pixels in the reference area in the four gradient directions; In the reference area, except The cumulative sum of the gradient amplitudes in the other three gradient directions; , are the maximum values ​​of the gradient amplitudes of the pixels in the grayscale image to be detected and the reference area respectively; For the The probability that a pixel is the end of a fiber; is the absolute value symbol; is a natural exponential function, where the natural exponential function refers to a function with a natural constant An exponential function with base .

[0064] in, Reflects the The larger the value, the more consistent the gradient directions of all pixels in the region; the smaller the value, the more chaotic the gradient directions of all pixels in the region.

[0065] It should be noted that the natural fiber ends are usually consistent with the surrounding fiber structure, and the area where the broken fiber ends are located is usually a loosely structured area. When it is larger, it can be said that the region is more likely to be a dense fiber structure region. If the probability that a pixel is the fiber end is high, then the probability that the pixel is the natural fiber end is high, and the corresponding degree of broken fiber at the pixel is low; When the value of is small, it can be said that the region is more likely to be a loose fiber structure region. When the possibility that a pixel point is the fiber end is greater, the possibility that the pixel point is the broken wire end is greater, and the corresponding degree of broken wire at the pixel point is greater.

[0066] It reflects the intensity of grayscale change in the reference area. The smaller the value, the closer the grayscale change intensity in the area is to the grayscale change intensity of the grayscale image to be detected. On the contrary, the larger the value, the greater the difference between the grayscale change intensity in the area and the grayscale change intensity of the grayscale image to be detected.

[0067] It should be noted that, since the natural fiber end has a more gradual or soft edge, while the broken fiber end has a sharper edge, the grayscale change intensity of the natural fiber end is often smaller than that of the broken fiber end. When it is larger, it means that the grayscale change intensity of the pixels in the reference area is smaller, which can indicate that there may be no fiber ends in the reference area, or it is more likely that the fiber ends in the reference area are natural. On the contrary, when When it is smaller, it means that there are pixels with larger grayscale change intensity in the reference area. Since the grayscale change intensity of the natural fiber end is smaller, when this value is smaller, it can be said that there is a high possibility that there are broken fiber ends in the reference area, and the corresponding pixel point has a relatively large degree of broken fiber.

[0068] S4: updating the number of scales for saliency detection of each pixel point, wherein the updated number of scales is negatively correlated with the degree of broken wires of the corresponding pixel point, so as to perform defect detection on the grayscale image to be detected according to the updated number of scales.

[0069] Optionally, a context-aware saliency detection algorithm (CA algorithm) can be used to perform saliency detection on each pixel in the grayscale image to be detected, so as to determine the saliency of each pixel, and then determine the broken wire defect area in the grayscale image to be detected based on the pixels with higher saliency. It should be noted that the traditional CA algorithm uses a fixed number of scales when performing saliency detection, but since the probability of each pixel being the end of a broken wire is different, when using the traditional CA algorithm to perform saliency detection on each pixel, it may not be possible to accurately capture the saliency changes of details. Therefore, it is necessary to adaptively adjust the number of scales for performing saliency detection on each pixel.

[0070] It should be noted that the broken wire defect area often has relatively subtle texture and edge changes. If a large number of scales are set to perform saliency detection on the pixel, the detail information at too many scales will be averaged, so that the obtained saliency detection result may not accurately reflect the detail information of the pixel. Therefore, when the number of scales corresponding to each pixel is updated, the updated number of scales is negatively correlated with the degree of broken wire of the corresponding pixel, so that the subtle texture and edge changes can be better captured, and the broken wire defect area can be accurately determined.

[0071] Specifically, the number of scales for saliency detection of each pixel is updated to satisfy the following relationship:

[0072] ;

[0073] In the formula, For the The number of scales when performing saliency detection on pixels; For the The degree of broken wires at each pixel; is the preset scale quantity. In this embodiment, ; To preset the minimum scale quantity, in this embodiment, ; is the natural exponential function; is the ceiling function.

[0074] In another embodiment, the updated scale quantity may also be determined by other calculation formulas, such as by a ratio calculation formula instead of by a gamma change of the deformation.

[0075] In an exemplary embodiment of the present invention, defect detection of a grayscale image to be detected can be achieved by the following steps:

[0076] Step 1: Obtain the updated scale number of each pixel point, and expand the initial area of ​​each pixel point for a corresponding number of times according to the preset length to obtain the corresponding number of measurement areas;

[0077] For example, the preset length can be set to 2. If the updated scale number of any pixel point is , when the initial area is a 7×7 range area centered on the pixel point, the initial area of ​​the pixel point is expanded for the first time, and the expanded area obtained is a 9×9 range area centered on the pixel point, and so on, the expanded area obtained by each expansion is obtained until the initial area is completed The expansion is continued until In this embodiment, there is no special limitation on the difference between the side lengths of adjacent expansion areas, that is, the preset length.

[0078] Step 2: Calculate the difference between the possibility of each pixel being a fiber end in any measurement area and the possibility of the remaining pixels in the grayscale image to be detected being fiber ends, and use the average value of the difference as the significance value of the corresponding pixel in any measurement area;

[0079] It should be noted that in order to reduce the computational complexity of the CA algorithm and improve the adaptability of the algorithm, the present invention obtains a grayscale image of the fabric, that is, by analyzing the grayscale features of each pixel, instead of converting the RGB value of each pixel of the image into a Lab value for feature analysis in the traditional CA algorithm, thereby improving the efficiency of the algorithm in defect detection of fabrics to a certain extent.

[0080] Among them, the significance value refers to the data that can measure the prominent features of the corresponding pixel point, which is used to determine the possibility that each pixel point belongs to the broken wire defect area in each measurement area. For example, when the significance value of any pixel point in any measurement area is high, it means that the possibility that the pixel point belongs to the broken wire defect area in the measurement area is greater, and vice versa, the possibility that the pixel point belongs to the broken wire defect area in the measurement area is smaller.

[0081] Specifically, the possibility that any pixel point in each measurement area is a fiber end can be used as the characteristic value of the pixel point in the corresponding measurement area, and the possibility that each pixel point in the grayscale image to be detected except the pixel point is a fiber end can be used as the characteristic value of the corresponding pixel point. Then, the difference between the characteristic value of the pixel point in any measurement area and the characteristic values ​​of each pixel point in the grayscale image to be detected except the pixel point can be calculated in sequence, and the average value of all the differences can be used as the significance value of the pixel point in the measurement area, thereby determining the significance value of each pixel point in each measurement area.

[0082] Step 3: The average value of the significance value of each pixel in each measurement area is taken as the final significance value of the corresponding pixel, so as to perform defect detection on the grayscale image to be detected according to the final significance value.

[0083] In an exemplary embodiment of the present invention, defect detection can be performed on a grayscale image to be detected according to the final saliency value by the following steps:

[0084] When the final significance value of any pixel point is greater than a preset threshold, it is determined that any pixel point belongs to the broken wire defect area, and all pixel points belonging to the broken wire defect area in the grayscale image to be detected are obtained to obtain the broken wire defect area.

[0085] Optionally, the preset threshold can be set to 0.8. When the final significance value of any pixel is greater than 0.8, the pixel is determined to belong to the broken wire defect area, so that all pixels belonging to the broken wire defect area in the grayscale image to be detected can be determined, and then the broken wire defect area can be obtained. Of course, a suitable threshold can also be set according to the specific situation. This embodiment does not specifically limit the setting of the threshold.

[0086] The present invention also provides a machine vision-based fabric production line monitoring system, the system includes a memory and a processor, and a computer program is stored in the memory, the computer program integrates the functions of the machine vision-based fabric production line monitoring method, when the computer program is executed, the machine vision-based fabric production line monitoring method can adaptively adjust the number of scales for significance detection of each pixel point according to the degree of broken wire of each pixel point, can better capture subtle significance changes, can improve the accuracy of defect detection, and thus realize accurate monitoring of the fabric production process.

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

[0088] 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 cloth production line monitoring method based on machine vision, characterized in that: include: Obtain the grayscale image of the cloth to be detected; Calculating the possibility that each pixel in the grayscale image to be detected is a fiber end, the possibility of the fiber end is positively correlated with the difference between the average and median grayscale values ​​of all pixels in a preset initial region corresponding to the pixel, and the cumulative sum of the gradient amplitudes of the pixels in the initial region in four gradient directions; The side length of the initial area is expanded to a preset value to obtain a reference area, and the degree of broken wire at any pixel point is calculated: ; is the grayscale image to be detected The degree of broken wires per pixel; To preset hyperparameters; is the maximum value of the sum of the gradient amplitudes of all pixels in the reference area in the four gradient directions; In the reference area, except The cumulative sum of the gradient amplitudes in the other three gradient directions; For the The probability that a pixel is the end of a fiber; , are the maximum values ​​of the gradient amplitudes of the pixels in the grayscale image to be detected and the reference area respectively; is the natural exponential function; The number of scales used for significance detection of each pixel is updated, and the updated number of scales is negatively correlated with the degree of broken wires of the corresponding pixel, so as to perform defect detection on the grayscale image to be detected according to the updated number of scales.

2. The method for monitoring a cloth production line based on machine vision according to claim 1, characterized in that: The possibility that each pixel in the grayscale image to be detected is a fiber end satisfies the following relationship: ; In the formula, For the The probability that a pixel is the end of a fiber; For the The average value of the pixels in the initial area of ​​pixels; For the The median of the pixels in the initial area of ​​pixels; is the absolute value symbol; For the The first pixel in the initial area pixels, in the The gradient magnitude in each gradient direction; is the number of pixels in the initial area; is the summation symbol.

3. The method for monitoring a cloth production line based on machine vision according to claim 2, characterized in that: The method for obtaining the gradient amplitude includes: The Sobel operator is used to obtain the gradient amplitude of the pixel points in the initial area in each gradient direction.

4. The method for monitoring a cloth production line based on machine vision according to claim 1, characterized in that: The updating of the number of scales for saliency detection of each pixel satisfies the following relationship: ; In the formula, For the The number of scales when performing saliency detection on pixels; For the The degree of broken wires per pixel; is the preset scale quantity; To preset the minimum number of scales; is the natural exponential function; is the ceiling function.

5. The method for monitoring a cloth production line based on machine vision according to claim 1, characterized in that: The performing defect detection on the grayscale image to be detected according to the updated scale quantity includes: Obtaining the updated scale quantity of each pixel point, and sequentially expanding the initial area of ​​each pixel point a corresponding number of times according to a preset length to obtain a corresponding number of measurement areas; Calculate the difference between the possibility that each pixel point is a fiber end in any measurement area and the possibility that the remaining pixels in the grayscale image to be detected are fiber ends, and use the average value of the difference as the significance value of the corresponding pixel point in any measurement area; An average value of the significance values ​​of each pixel point in each measurement area is used as a final significance value of the corresponding pixel point, so as to perform defect detection on the grayscale image to be detected according to the final significance value.

6. The method for monitoring a cloth production line based on machine vision according to claim 5, characterized in that: The step of performing defect detection on the grayscale image to be detected according to the final significance value comprises: When the final significance value of any pixel point is greater than a preset threshold, it is determined that the any pixel point belongs to the broken wire defect area, and all the pixel points belonging to the broken wire defect area in the grayscale image to be detected are obtained to obtain the broken wire defect area.

7. The method for monitoring a cloth production line based on machine vision according to claim 1, characterized in that: The step of obtaining the grayscale image of the cloth to be detected comprises: A grayscale image of the cloth is obtained, and a non-local mean filtering algorithm is used to perform noise reduction on the grayscale image, and the grayscale image after the noise reduction is used as the grayscale image to be detected.

8. The cloth production line monitoring system based on machine vision is characterized by: The machine vision-based fabric production line monitoring system comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of the machine vision-based fabric production line monitoring method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Fabric defect detection method capable of resisting texture interference

    CN114820631A

  • Method for quickly detecting raw grey cloth based on computer vision technology

    CN108364291A

  • Defect detection method and device

    CN108387587A