A textile production control method based on image enhancement

By adjusting the number of grayscale levels and introducing evaluation functions, the accuracy problem of textile defect detection under the background of complex textures is solved, the accuracy enhancement of defect areas and the suppression of non-defective areas is achieved, and the detection efficiency and accuracy are improved.

CN120279025BActive Publication Date: 2025-08-22SHANXI PROVINCE YINHUA TEXTILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510766471.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-08-22
Estimated Expiration
2045-06-10

AI Technical Summary

Technical Problem

The prior art is difficult to accurately highlight the texture characteristics of defects such as holes and broken lines in textile production under the background of complex textures, resulting in insufficient detection efficiency and accuracy.

Method used

By adjusting the number of grayscale levels, adjusting the grayscale value using the degree of distribution anomalies, setting the number of grayscale levels intervals, introducing evaluation functions, filtering out images with enhanced effects, suppressing non-defective area textures, enhancing defect area textures, and combining with histogram equalization algorithm for image enhancement.

Benefits of technology

Accurate enhancement of defective areas under complex texture backgrounds is achieved, interference in non-defective areas is suppressed, and the accuracy and efficiency of defect detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279025B_ABST
    Figure CN120279025B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing, and more specifically, to a textile production control method based on image enhancement. The method comprises: acquiring a textile image; calculating the distribution anomaly of each pixel in the textile image, multiplying the grayscale value of each pixel by the distribution anomaly degree, and then performing regularization processing to obtain a defect correction value for each pixel; performing threshold segmentation based on the distribution anomaly degree to obtain suspected defective pixels and suspected normal pixels; setting grayscale number intervals; calculating an evaluation function for each grayscale number based on the grayscale number intervals; and performing textile production control based on an enhanced image when the evaluation function reaches its maximum value. Image enhancement suppresses the textile's own texture, enhances defective textures, and improves the accuracy of defect detection.
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, and more particularly to a textile production control method based on image enhancement. Background Art

[0002] In the textile production sector, fabric defect detection is a core component of quality control. With the widespread adoption of automated production, hidden defects such as holes and broken threads in fabrics are difficult to fully detect through manual visual inspection. Traditional image detection technology often results in inaccurate feature extraction due to interference from the fabric's own texture. For example, in the production of complex textured fabrics such as knitted fabrics, defects such as frizzy yarns at the edges of holes and disordered fibers at broken threads can be easily masked by the fabric's inherent warp and weft patterns, resulting in misjudgments or missed detections, directly impacting the finished product's pass rate and brand reputation.

[0003] Current image detection technology faces the following limitations: Strong textures in non-defective areas (such as the graininess of woolen fabrics) create visual noise, interfering with the algorithm's ability to identify defect boundaries. While existing filtering algorithms can blur non-defective textures, they also weaken subtle features in defective areas, resulting in loss of fiber breakage details at the edges of holes. Traditional fixed-parameter image enhancement methods struggle to adaptively highlight defective textures. For example, when inspecting fabrics with inherent texture, traditional histogram equalization can over-enhance the texture, reducing contrast in the hole area and potentially leading to missed defects.

[0004] In summary, existing technologies struggle to accurately highlight the texture features of defects like holes and broken threads against complex textured backgrounds, resulting in insufficient detection efficiency and accuracy. Developing an image enhancement method that can enhance texture information in defective areas while suppressing interference from non-defective areas is crucial for overcoming the current bottleneck in textile production control technology. Summary of the Invention

[0005] In order to solve the problem of how to adaptively enhance defective textures and suppress interference from non-defective textures, the present invention proposes a textile production control method based on image enhancement, which includes the following steps:

[0006] Acquiring textile images;

[0007] The degree of distribution anomaly of each pixel in the textile image is calculated, and the grayscale value of each pixel is multiplied by the degree of distribution anomaly and then regularized to obtain the defect correction value of each pixel; threshold segmentation is performed based on the degree of distribution anomaly to obtain suspected defective pixels and suspected normal pixels; a grayscale number interval is set, wherein the lower limit of the grayscale number interval is negatively correlated with the contrast mean of the suspected normal pixels, and the upper limit of the grayscale number interval is negatively correlated with the contrast mean of the suspected defective pixels;

[0008] Calculate the evaluation function for each gray level , an image composed of defect correction values ​​of all pixels is recorded as a defect correction image, the i-th integer value is selected in the gray level number interval as the optional gray level number, the optional gray level number is used as the enhanced gray level number, and the defect correction image is enhanced using the histogram equalization algorithm; They represent the mean contrast values ​​of all suspected defective pixels and the mean contrast values ​​of all suspected normal pixels in the enhanced image obtained under the optional grayscale, They represent the number of missing texture pixels of all suspected defective pixels and the number of missing texture pixels of all suspected normal pixels in the enhanced image obtained at the selected grayscale level respectively;

[0009] Textile production control is performed based on the enhanced image when the evaluation function takes the maximum value.

[0010] The present invention suppresses the texture in normal pixels and enhances the texture in defective pixels by adjusting the number of gray levels, thereby providing a basis for subsequent defect detection; further, in the process of adjusting the number of gray levels, the gray value is first adjusted by the degree of distribution abnormality, thereby widening the contrast difference between defective pixels and normal pixels, providing a basis for subsequent gray level adjustment; further, in the process of adjusting the number of gray levels, the gray level number interval is also set by the contrast of suspected normal pixels and suspected defective pixels, and values ​​are taken within the interval when setting the number of gray levels, so that the gray level number obtained on this basis can merge the gray levels with a contrast greater than the contrast mean of normal pixels, and split the gray levels with a contrast less than the contrast mean of defective pixels, thereby suppressing the texture information of normal pixels while enhancing the texture information of defective pixels; further, by introducing an evaluation function, images with enhanced effects are screened out, providing a basis for subsequent accurate defect detection.

[0011] Preferably, the calculating the distribution abnormality degree of each pixel in the textile image includes:

[0012] Obtaining the period length in each direction and the period reference pixel of each pixel in each direction;

[0013] The degree of deviation of the distance between each pixel and the periodic reference pixel in each direction from the periodic length is recorded as the distribution abnormality degree of each pixel in each direction;

[0014] The mean value of the distribution abnormality of each pixel in all directions is taken as the distribution abnormality of each pixel.

[0015] The present invention takes into account that the texture intervals of normal pixels have certain regularity, and thus accurately evaluates the distribution anomaly of each pixel by analyzing the deviation of the distribution intervals of each pixel from the periodic reference pixel, providing a basis for subsequent effective enhancement.

[0016] Preferably, the method for obtaining the period length in each direction includes:

[0017] Clustering is performed on the grayscale values ​​of pixels in the textile image to obtain several categories. The connected domains formed by the pixels of any category are obtained, and the geometric center distance between each connected domain and the nearest connected domain in any direction is used as the adjacent distance of each connected domain in that direction.

[0018] The median of the adjacent distances of all connected domains obtained for this category in this direction is used as the candidate cycle length for this category in this direction;

[0019] The median of the alternative cycle lengths of all categories in this direction is taken as the cycle length in this direction.

[0020] The present invention obtains the period length by introducing the distance between connected domains of similar pixels. This method of obtaining the period length is relatively simple and has higher implementation efficiency.

[0021] Preferably, the method for acquiring the periodic reference pixels of each pixel in each direction includes:

[0022] Obtain a connected domain formed by pixels of the same category as the grayscale value of any pixel as the analysis connected domain, and use the connected domain closest to the analysis connected domain where the pixel is located in any direction as the periodic reference connected domain of the pixel in that direction;

[0023] In the periodic reference connected domain in the direction, a pixel whose interval distance with the pixel is closest to the period length is obtained as the periodic reference pixel of the pixel in the direction.

[0024] Preferably, the regularization process is to normalize the data to an integer between 0 and 255.

[0025] The present invention can make it more consistent with the pixel value characteristics through regularization processing, providing a basis for subsequent enhancement processing.

[0026] Preferably, the method for obtaining the lower limit value of the gray level quantity interval includes:

[0027] The total grayscale number of all pixels in the textile image is obtained, and the total grayscale number is divided by the contrast mean of the suspected normal pixels and then rounded down to obtain the lower limit of the grayscale number range.

[0028] Preferably, the method for obtaining the upper limit value of the gray level quantity interval includes:

[0029] The total number of gray levels is divided by the average contrast value of the suspected defective pixels and then rounded down to obtain the upper limit value of the gray level number range.

[0030] Preferably, the method for obtaining the contrast value includes:

[0031] The local contrast is obtained by taking the absolute value of the difference between the defect correction value of each pixel and the adjacent pixels;

[0032] The local contrast average of each pixel and all adjacent pixels is used as the contrast value of each pixel.

[0033] Preferably, the method for obtaining the number of missing texture pixels includes:

[0034] Performing edge detection on the enhanced image to obtain an enhanced edge image, recording edge pixels in the enhanced edge image as enhanced texture pixels, performing edge detection on the textile image to obtain an original edge image, recording edge pixels in the original edge image as original texture pixels;

[0035] The difference between the number of enhanced texture pixels and the number of original texture pixels in the suspected defective pixel / suspected normal pixel is used as the number of texture pixel missing.

[0036] The present invention obtains the number of missing texture pixels by calculating the difference in the number of texture pixels between the enhanced image and the unenhanced textile image. This implementation method is relatively simple and has higher implementation efficiency.

[0037] Preferably, the textile production control based on the enhanced image when the evaluation function takes the maximum value includes:

[0038] The enhanced image when the evaluation function takes the maximum value is taken as the final enhanced image;

[0039] Obtain the contrast value of each pixel in the final enhanced image, perform threshold segmentation based on the contrast value, and regard pixels with contrast values ​​greater than the threshold as defective pixels;

[0040] If the area of ​​the connected domain formed by the defective pixels is larger than the preset area threshold, it is determined that the textile is defective and a warning is issued.

[0041] The present invention has the following beneficial effects:

[0042] The present invention suppresses the texture in normal pixels and enhances the texture in defective pixels by adjusting the number of gray levels, thereby providing a basis for subsequent defect detection.

[0043] Furthermore, in the process of adjusting the number of gray levels, the gray values ​​are first adjusted by distributing the abnormality degree, thereby widening the contrast difference between defective pixels and normal pixels, providing a basis for subsequent gray level adjustment;

[0044] Furthermore, in the process of adjusting the number of gray levels, the gray level number interval is set by using the contrast between suspected normal pixels and suspected defective pixels. When setting the number of gray levels, values ​​are taken within this interval. The gray level number obtained on this basis can merge gray levels with a contrast greater than the contrast mean of normal pixels, while splitting gray levels with a contrast less than the contrast mean of defective pixels. This can suppress the texture information of normal pixels while enhancing the texture information of defective pixels.

[0045] Furthermore, by introducing an evaluation function, images with enhanced effects are screened out, providing a basis for subsequent accurate defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flowchart of the steps of a textile production control method based on image enhancement in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0048] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0049] See also Figure 1 , which shows a flowchart of a textile production control method based on image enhancement provided by one embodiment of the present invention, the method comprising the following steps:

[0050] S1: Acquire textile images.

[0051] Specifically, during the production process, a textile image is collected once at a preset interval, and the collected textile image is grayscaled to obtain a grayscale image of the textile image; for the sake of convenience of description, the grayscale image of the textile image will still be referred to as the textile image.

[0052] S2: Calculate the degree of distribution abnormality of each pixel in the textile image, multiply the grayscale value of each pixel by the degree of distribution abnormality, and then perform regularization to obtain the defect correction value of each pixel; perform threshold segmentation according to the defect correction value to obtain suspected defective pixels and suspected normal pixels; set a grayscale number interval, the lower limit value of the grayscale number interval is negatively correlated with the contrast mean of the suspected normal pixels, and the upper limit value of the grayscale number interval is negatively correlated with the contrast mean of the suspected defective pixels.

[0053] It's important to note that the histogram equalization algorithm achieves image enhancement by merging and splitting grayscale levels to achieve a similar number of pixels with different grayscale values ​​in the histogram. Grayscale merging can remove some subtle textures. Therefore, by controlling the grayscale merging method, it's possible to remove relatively low-contrast fabric texture information while enhancing relatively high-contrast defect texture information.

[0054] It should be further explained that the fewer grayscale levels in the enhanced histogram, the stronger the removal of detailed textures and the greater the enhancement of stronger textures. Therefore, by adjusting the number of grayscale levels in the enhanced histogram, it is possible to remove fabric texture while enhancing defective textures.

[0055] S20: Calculating the distribution abnormality degree of each pixel in the textile image.

[0056] It's important to note that the difference between the intensity of a textile's own texture and that of a defect is minimal. Therefore, when grayscale merging is used to eliminate the textile's own texture, the defective texture can easily be removed as well. Therefore, it's necessary to exploit the fact that each pixel is a defect to maximize this difference in texture intensity. First, we analyze the situation where each pixel is a defect.

[0057] It should be noted that since the texture of textiles generally has a certain distribution pattern, while defective textures generally do not have such a distribution pattern, it is possible to determine whether each pixel is a defect by analyzing the conformity of the distribution information of each pixel with the distribution pattern.

[0058] Optionally, as an example, calculating the degree of distribution abnormality of each pixel in the textile image includes:

[0059] A local window is obtained with each pixel in the textile image as the center, and the gradient values ​​of all pixels in the local window are obtained. The gradient values ​​of all pixels in the local window are statistically analyzed to obtain a gradient histogram, and the cosine similarity between the gradient histogram of each pixel and the gradient histogram of other pixels is recorded as the texture similarity of each pixel; the opposite of the texture similarity of each pixel and the mean of the texture similarity is used as the exponent, and a natural constant is used as the base to perform power calculation to obtain the distribution abnormality degree of each pixel.

[0060] It is understandable that analyzing the distribution defect of each pixel by means of a gradient histogram is easily interfered by the gradient information of surrounding pixels, resulting in inaccurate analysis results.

[0061] Preferably, as an example, calculating the distribution abnormality degree of each pixel in the textile image includes:

[0062] Clustering is performed on the grayscale values ​​of pixels in textile images to obtain several categories. The connected domain formed by the pixels of any category is obtained, and the geometric center distance between each connected domain and the nearest connected domain in any direction is used as the adjacent distance of each connected domain in that direction; the median of the adjacent distances of all connected domains obtained for that category in that direction is used as the alternative period length of that category in that direction; and the median of the alternative period lengths of all categories in that direction is used as the period length in that direction.

[0063] A connected domain formed by pixels of the same category as the grayscale value of any pixel is obtained as the analysis connected domain, and the connected domain closest to the analysis connected domain of the pixel in any direction is used as the periodic reference connected domain of the pixel in that direction; in the periodic reference connected domain in that direction, the pixel whose interval distance from the pixel is closest to the period length is obtained as the periodic reference pixel of the pixel in that direction.

[0064] The absolute value of the difference between the distance between the pixel and the periodic reference pixel in that direction and the period length is recorded as the distribution deviation degree of the pixel in that direction; the distribution deviation degree of the pixel in that direction is divided by the mean value of the distribution deviation degree to obtain the distribution anomaly degree of the pixel in that direction; the mean value of the distribution anomaly degree of each pixel in all directions is taken as the distribution anomaly degree of each pixel.

[0065] It can be understood that the period length reflects the length of the variation pattern. If the pixel distribution interval is significantly different from the period length, it means that the texture distribution of the pixel is significantly different from the distribution pattern, and thus the distribution abnormality of the pixel is relatively high.

[0066] S21: multiplying the grayscale value of each pixel by the degree of distribution abnormality and then performing regularization processing to obtain the defect correction value of each pixel.

[0067] Preferably, as an example, the grayscale value of each pixel is multiplied by the degree of distribution abnormality and then regularized to obtain the defect correction value of each pixel, including:

[0068] The defect adjustment value of each pixel is obtained by multiplying the grayscale value of each pixel by the distribution abnormality degree, and the ratio of the defect adjustment value of each pixel to the maximum defect adjustment value is multiplied by 255 and then rounded up to obtain the defect correction value of each pixel.

[0069] It can be understood that by multiplying the grayscale value of each pixel by the degree of distribution abnormality, the grayscale value of the pixel with a small defect degree is compressed, and the grayscale value of the pixel with a large defect degree is stretched, thereby achieving the contrast difference between defective pixels and normal pixels, providing a basis for subsequent enhancement processing.

[0070] S22: Perform threshold segmentation according to the degree of distribution abnormality to obtain suspected defective pixels and suspected normal pixels; set a grayscale number interval, wherein the lower limit value of the grayscale number interval is negatively correlated with the contrast mean of the suspected normal pixels, and the upper limit value of the grayscale number interval is negatively correlated with the contrast mean of the suspected defective pixels.

[0071] It's important to note that to remove the fabric's inherent texture, the grayscale levels of pixels with contrast values ​​greater than the fabric's inherent texture can be merged to eliminate their contrast and suppress the inherent texture. However, pixels with contrast values ​​greater than the fabric's inherent texture may also contain defective pixels. Merging the grayscale levels of all pixels with contrast values ​​greater than the fabric's inherent texture will also remove the defective texture. Therefore, the grayscale levels of pixels with contrast values ​​less than the defective pixel's contrast must not be merged. Therefore, the grayscale level range can be set based on the contrast of the fabric's inherent texture and the contrast of the defective pixels. First, it's necessary to filter out possible defective pixels and possible normal pixels.

[0072] S220: Perform threshold segmentation according to the degree of distribution abnormality to obtain suspected defective pixels and suspected normal pixels.

[0073] Preferably, as an example, performing threshold segmentation based on the degree of distribution abnormality to obtain suspected defective pixels and suspected normal pixels includes:

[0074] According to the degree of distribution abnormality, all pixels are segmented using the Otsu threshold method. Pixels larger than the threshold are regarded as suspected defective pixels, and pixels smaller than the threshold are regarded as suspected normal pixels.

[0075] S221: Setting the grayscale number interval.

[0076] Preferably, as an example, setting the gray level quantity interval includes:

[0077] The total grayscale number of all pixels in the textile image is obtained, and the total grayscale number is divided by the contrast mean of the suspected normal pixels and then rounded down to obtain the lower limit of the grayscale number range.

[0078] The total number of gray levels is divided by the average contrast value of the suspected defective pixels and then rounded down to obtain the upper limit value of the gray level number range.

[0079] The interval between the lower limit value and the upper limit value is taken as the grayscale quantity interval.

[0080] It can be understood that the grayscale span of the grayscale value histogram obtained based on the number of grayscale levels within the grayscale number interval is greater than the contrast mean of normal pixels and smaller than the contrast mean of defective pixels. Therefore, the grayscale levels of pixels with a contrast greater than the contrast mean of normal pixels will be merged, and the grayscale levels of pixels with a contrast less than the contrast mean of defective pixels will be separated, thereby suppressing the texture of normal pixels and enhancing the texture of defective pixels.

[0081] It should be added that the method for obtaining the contrast value includes:

[0082] The local contrast is obtained by taking the absolute value of the difference between the defect correction value of each pixel and the adjacent pixels;

[0083] The local contrast average of each pixel and all adjacent pixels is used as the contrast value of each pixel.

[0084] S3: Calculate the evaluation function for each grayscale level.

[0085] It should be noted that the possible value range of the number of gray levels obtained in the above process is such that a gray level number with the best enhancement effect needs to be selected within the possible value range to achieve image enhancement.

[0086] It should be further explained that an evaluation function must be constructed to evaluate the enhancement effect. A good enhancement effect means that the contrast of normal pixels is suppressed and the contrast of defective pixels is enhanced. At the same time, the enhancement should minimize the loss of texture information of defective pixels.

[0087] Preferably, as an example, calculating the evaluation function of each gray level includes:

[0088]

[0089] The image formed by the defect correction values ​​of all pixels is recorded as the defect correction image, the i-th integer value is selected in the gray level number interval as the optional gray level number, the optional gray level number is used as the enhanced gray level number, and the defect correction image is enhanced using a histogram equalization algorithm based on the enhanced gray level number; They represent the mean contrast values ​​of all suspected defective pixels and the mean contrast values ​​of all suspected normal pixels in the enhanced image obtained under the optional grayscale, They represent the number of missing texture pixels of all suspected defective pixels and the number of missing texture pixels of all suspected normal pixels in the enhanced image obtained under the optional grayscale.

[0090] It should be noted that the enhancement process of the defect-corrected image using the histogram equalization algorithm based on the number of enhanced gray levels is an existing technology and will not be described in detail here.

[0091] It is understandable that The larger the value, the greater the contrast difference between the defective pixel and the normal pixel. Therefore, the defective pixel can be distinguished more clearly through contrast, and thus the enhancement effect is better. The larger the value, the larger the number of texture pixels removed from normal pixels, and the larger the number of texture pixels retained from defective pixels, and the better the enhancement effect. right The processing is to prevent it from taking negative values, using the exponential function right The purpose of this process is to prevent it from taking negative values. and When both take negative values, the product of the two is a positive value.

[0092] It should be added that the method for obtaining the number of missing texture pixels of all suspected defective pixels and the number of missing texture pixels of all suspected normal pixels in the enhanced image obtained at the optional grayscale level includes:

[0093] Performing edge detection on the enhanced image to obtain an enhanced edge image, recording edge pixels in the enhanced edge image as enhanced texture pixels, performing edge detection on the textile image to obtain an original edge image, recording edge pixels in the original edge image as original texture pixels;

[0094] The difference between the number of enhanced texture pixels in the suspected defective pixel and the number of original texture pixels in the suspected defective pixel is used as the number of texture pixel missing of the suspected defective pixel.

[0095] The difference between the number of enhanced texture pixels in the suspected normal pixel and the number of original texture pixels in the suspected normal pixel is used as the number of texture pixel missing of the suspected normal pixel.

[0096] S4: Textile production control based on the enhanced image when the evaluation function takes the maximum value.

[0097] Preferably, as an example, performing textile production control based on the enhanced image when the evaluation function takes the maximum value includes:

[0098] The enhanced image when the evaluation function takes the maximum value is taken as the final enhanced image;

[0099] Obtain the contrast value of each pixel in the final enhanced image, perform threshold segmentation based on the contrast value, and regard pixels with contrast values ​​greater than the threshold as defective pixels;

[0100] If the area of ​​the connected domain formed by the defective pixels is larger than the preset area threshold, it is determined that the textile is defective and a warning is issued.

[0101] At this point, this embodiment is completed.

[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A textile production control method based on image enhancement, characterized in that: include: Acquiring textile images; Calculate the distribution anomaly degree of each pixel in the textile image, multiply the grayscale value of each pixel by the distribution anomaly degree, and then perform regularization to obtain the defect correction value of each pixel; Threshold segmentation is performed based on the degree of distribution abnormality to obtain suspected defective pixels and suspected normal pixels; a grayscale number interval is set, wherein the lower limit of the grayscale number interval is negatively correlated with the contrast mean of the suspected normal pixels, and the upper limit of the grayscale number interval is negatively correlated with the contrast mean of the suspected defective pixels; Calculate the evaluation function for each gray level , an image composed of defect correction values ​​of all pixels is recorded as a defect correction image, the i-th integer value is selected in the gray level number interval as the optional gray level number, the optional gray level number is used as the enhanced gray level number, and the defect correction image is enhanced using the histogram equalization algorithm; They represent the mean contrast values ​​of all suspected defective pixels and the mean contrast values ​​of all suspected normal pixels in the enhanced image obtained under the optional grayscale, They represent the number of missing texture pixels of all suspected defective pixels and the number of missing texture pixels of all suspected normal pixels in the enhanced image obtained at the selected grayscale level respectively; Textile production control is performed based on the enhanced image when the evaluation function takes the maximum value.

2. The textile production control method based on image enhancement according to claim 1, characterized in that: The calculating the distribution abnormality degree of each pixel in the textile image includes: Obtaining the period length in each direction and the period reference pixel of each pixel in each direction; The degree of deviation of the distance between each pixel and the periodic reference pixel in each direction from the periodic length is recorded as the distribution abnormality degree of each pixel in each direction; The mean value of the distribution abnormality of each pixel in all directions is taken as the distribution abnormality of each pixel.

3. The textile production control method based on image enhancement according to claim 2, characterized in that: The method for obtaining the period length in each direction includes: Clustering is performed on the grayscale values ​​of pixels in the textile image to obtain several categories. The connected domains formed by the pixels of any category are obtained, and the geometric center distance between each connected domain and the nearest connected domain in any direction is used as the adjacent distance of each connected domain in that direction. The median of the adjacent distances of all connected domains obtained for this category in this direction is used as the candidate cycle length for this category in this direction; The median of the alternative cycle lengths of all categories in this direction is taken as the cycle length in this direction.

4. The textile production control method based on image enhancement according to claim 3, characterized in that: The method for acquiring periodic reference pixels of each pixel in each direction includes: Obtain a connected domain formed by pixels of the same category as the grayscale value of any pixel as the analysis connected domain, and use the connected domain closest to the analysis connected domain where the pixel is located in any direction as the periodic reference connected domain of the pixel in that direction; In the periodic reference connected domain in the direction, a pixel whose interval distance with the pixel is closest to the period length is obtained as the periodic reference pixel of the pixel in the direction.

5. The textile production control method based on image enhancement according to claim 1, characterized in that: The normalization process is to normalize the data to integers between 0 and 255.

6. The textile production control method based on image enhancement according to claim 1, characterized in that: The method for obtaining the lower limit value of the gray level quantity interval includes: The total grayscale number of all pixels in the textile image is obtained, and the total grayscale number is divided by the contrast mean of the suspected normal pixels and then rounded down to obtain the lower limit of the grayscale number range.

7. The textile production control method based on image enhancement according to claim 6, characterized in that: The method for obtaining the upper limit value of the gray level quantity interval includes: The total number of gray levels is divided by the average contrast value of the suspected defective pixels and then rounded down to obtain the upper limit value of the gray level number range.

8. The textile production control method based on image enhancement according to claim 1, characterized in that: The method for obtaining the contrast value includes: The local contrast is obtained by taking the absolute value of the difference between the defect correction value of each pixel and the adjacent pixels; The local contrast average of each pixel and all adjacent pixels is used as the contrast value of each pixel.

9. The textile production control method based on image enhancement according to claim 1, characterized in that: The method for obtaining the number of missing texture pixels includes: Performing edge detection on the enhanced image to obtain an enhanced edge image, recording edge pixels in the enhanced edge image as enhanced texture pixels, performing edge detection on the textile image to obtain an original edge image, recording edge pixels in the original edge image as original texture pixels; The difference between the number of enhanced texture pixels and the number of original texture pixels in the suspected defective pixel or the suspected normal pixel is used as the number of texture pixel missing.

10. The textile production control method based on image enhancement according to claim 1, characterized in that: The textile production control based on the enhanced image when the evaluation function takes the maximum value includes: The enhanced image when the evaluation function takes the maximum value is taken as the final enhanced image; Obtain the contrast value of each pixel in the final enhanced image, perform threshold segmentation based on the contrast value, and regard pixels with contrast values ​​greater than the threshold as defective pixels; If the area of ​​the connected domain formed by the defective pixels is larger than the preset area threshold, it is determined that the textile is defective and a warning is issued.

Citation Information

Patent Citations

  • Textile warp and weft defect detection method

    CN115311303A

  • Blending defect detection method based on artificial intelligence

    CN116152133A