Method for detecting multiple defects on surface of strip steel based on fuzzy measurement

The surface of the strip is grayed out and the membership matrix structure is constructed through fuzzy measurement methods, which solves the problem of poor detection effect in the prior art and realizes efficient defect detection, especially accurate identification of low-contrast images and subtle defects.

CN120411024APending Publication Date: 2025-08-01ZHEJIANG GUOCHEN INTELLIGENT INSPECTION TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510500726.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing non-destructive testing methods are poor in detecting strip surface defects, especially in low-contrast images and complex textures, and are difficult to integrate into the production line.

Method used

The method based on fuzzy measurement is adopted to detect the defects of the strip steel surface through grayscale processing, grayscale histogram fitting, membership function construction and fuzzy communication domain binarization.

Benefits of technology

The accuracy of defect detection is improved, especially for low-contrast images and subtle defects, and the calculation is small and easy to implement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411024A_ABST
    Figure CN120411024A_ABST
Patent Text Reader

Abstract

The invention discloses a strip steel surface multiple defect detection method based on fuzzy measurement. The surface of the strip steel is shot and subjected to graying treatment, and a surface grayscale image is obtained; calculating a gray level histogram of the surface gray level image, and performing Gaussian function fitting on the gray level histogram to obtain an image background model; performing calculation and construction according to the image background model to obtain a membership function, and performing defect estimation on the surface grayscale image by adopting the membership function to obtain a membership matrix; and carrying out binarization processing on the surface grayscale image according to the membership matrix to obtain a strip steel surface defect area. The method is accurate and practical in detection, can detect various different types of surface defects, particularly has good detection performance for low-contrast images and fine defects, has relatively high application value for defect detection of the strip steel surface, and is relatively small in calculation amount and relatively high in accuracy due to linear operation mainly concentrated on a single pixel. The realization is easy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a computer vision image processing method, and particularly to a method for detecting various defects on the surface of a strip steel based on fuzzy measurement. Background Art

[0002] In the industrial production process, the collection of product surface quality information helps to detect relevant faults of production equipment in a timely manner. At present, there are already a variety of non-destructive testing (NDT) methods, such as microwave and magnetic imaging, which can detect surface, subsurface or inhomogeneity defects that are invisible to machine vision. However, these methods usually require specific equipment and may be difficult to integrate into the production line. In recent years, computer vision detection technology has been widely applied in various production industries, including learning-based methods and anomaly detection-based methods. Learning-based methods rely on the integrity of large-scale datasets and high-dimensional features, while anomaly detection-based methods do not require a training set and a classifier, but find regions that do not conform to the expected pattern by comparing image textures. However, in some cases, such as low-contrast images or complex textures, the detection effect of these methods is not good. Therefore, new surface defect detection methods are needed to overcome these challenges. Summary of the Invention

[0003] In order to overcome the limitations of the prior art, the present invention provides a method for detecting various defects on the surface of a strip steel based on fuzzy measurement.

[0004] The steps of the technical solution adopted by the present invention to solve its technical problems are as follows:

[0005] The method for detecting various defects on the surface of a strip steel includes the following steps:

[0006] S1. Take a picture of the strip steel surface and perform grayscale processing to obtain a surface grayscale image;

[0007] S2. Calculate the grayscale histogram of the surface grayscale image, and then perform Gaussian function fitting on the grayscale histogram to obtain an image background model;

[0008] S3. Calculate and construct a membership function according to the image background model, and then use the membership function to estimate the defects of the surface grayscale image to obtain a membership matrix;

[0009] S4. Perform binarization processing on the surface grayscale image according to the membership matrix to obtain the strip steel surface defect area.

[0010] The specific content of S2 is as follows:

[0011] S21. Calculate the grayscale histogram of the surface grayscale image;

[0012] S22. Calculate the mean of the defect-free pixels in several surface grayscale images based on several grayscale histograms, and then obtain the mean estimate value according to the following formula:

[0013]

[0014] Among them, represents the mean estimate value of the defect-free pixels, μ max and μ min represent the maximum and minimum mean defect-free pixels in the statistically grayscale histogram respectively, γ represents the extension amount of the preset search range, f(g i ) represents the pixel frequency with the grayscale value of g i , arg max represents the value of g i when f(g i ) takes the maximum value;

[0015] S23. Select a set of points as the fitting data set within the upper and lower ranges of the mean estimate value according to the following formula:

[0016]

[0017] Among them, represents the mean estimate value of the defect-free pixels, n1 and n2 represent the preset number of points less than and greater than respectively, g i represents the grayscale value;

[0018] S24. Use the least squares method to perform Gaussian function fitting on the fitting data set to obtain the image background model.

[0019] The image background model is set according to the following formula:

[0020]

[0021] Among them, represents the estimated value of the pixel frequency with the grayscale value of g i after fitting, and represent the estimated values of the mean and standard deviation of the defect-free pixels in the image respectively, represents the estimated value of the number of defect-free pixels.

[0022] The specific content of S3 is as follows:

[0023] S31. Calculate the probability of the appearance of defect-free pixels according to the image background model according to the following formula:

[0024]

[0025] Among them, Indicates the gray value is g i An estimate of the frequency of defect-free pixels, Indicates that the gray value after fitting is g i An estimate of the pixel frequency, represents the estimated number of defect-free pixels, p(g i ) represents the gray value g i The probability of defect-free pixels appearing;

[0026] S32, constructing a membership function based on the probability of occurrence of defect-free pixels;

[0027] S33, using the membership function to estimate defects on the surface grayscale image, and converting it into a membership matrix according to the following formula:

[0028] M(x,y)=μ A (I(x,y))

[0029] Among them, M(x,y) represents the membership matrix, I(x,y) represents the grayscale value of the pixel in the xth row and yth column of the surface grayscale image, μ A (I(x,y)) represents the membership value corresponding to the grayscale value of the pixel in the xth row and yth column in the surface grayscale image.

[0030] The membership function is constructed according to the following formula:

[0031]

[0032] Among them, μ A (g i ) indicates the gray value is g i The probability function of the pixel belonging to the defect, g i represents the grayscale value, Represents the estimated value of the mean value of defect-free pixels in the image, n1 and n2 represent the preset values less than and greater than The number of points, p1 represents the gray value g i The probability that the defect-free pixel frequency is n, p2 represents the probability that the gray value is g i When the frequency of defect-free pixels is n and the gray value is g i The probability that a pixel is defective, f(g i ) indicates the gray value is g i The pixel frequency, n represents the pixel frequency, n∈[0,f(g i )], Indicates from The number of combinations of n elements selected from n elements, p(g i ) indicates the gray value is g i The probability of defect-free pixels appearing.

[0033] Specifically, S4 is as follows:

[0034] S41. Take the connected region formed by the pixels in the surface gray-scale image corresponding to adjacent non-zero membership values in the membership matrix as the fuzzy connected domain;

[0035] S42. Extract all the fuzzy connected domains in the surface gray-scale image, and perform binarization processing on all the fuzzy connected domains according to the membership matrix to obtain the strip surface defect region.

[0036] The binarization processing is maximum criterion binarization or cumulative value criterion binarization;

[0037] The maximum criterion binarization is set according to the following formula:

[0038]

[0039] where i represents the fuzzy connected domain index, i ∈ [0, N], C i represents the set of pixels in the i-th connected domain, (x, y) represents the pixel coordinates of the surface gray-scale image, M(x, y) represents the membership matrix, and R(x, y) represents the gray value of the image after binarization processing;

[0040] The cumulative value criterion binarization is set according to the following formula:

[0041]

[0042] where C i represents the set of pixels in the i-th connected domain, |C i | represents the number of pixels in the set C i j represents the pixel index in the set C i j ∈ [0, |C i |], (x, y) represents the pixel coordinates of the surface gray-scale image, M(x, y) represents the membership matrix, R(x, y) represents the gray value of the image after binarization processing, and TH represents a preset threshold.

[0043] The beneficial effects of the present invention are as follows:

[0044] Compared with the prior art, the method provided by the present invention has a higher detection rate, and is applicable to the detection of different types of defects, especially has good detection performance for low-contrast images and subtle defects. In addition, due to the linear operations mainly concentrated on individual pixels, the method has a small amount of calculation and is easy to implement. Description of the Drawings

[0045] Figure 1 is the flowchart of the method of the present invention.

[0046] Figure 2 is the original image in Embodiment 1 of the present invention.

[0047] Figure 3 is Figure 2 the corresponding detection result image.

[0048] Figure 4 is Figure 2 membership matrix one corresponding to the randomly selected 7×7 image block in

[0049] Figure 5 is Figure 4 the binarized image processed by the maximum value criterion binarization.

[0050] Figure 6 is Figure 2 membership matrix two corresponding to the randomly selected 7×7 image block in

[0051] Figure 7 is Figure 6 the binarized image processed by the cumulative value criterion binarization.

[0052] Figure 8 is the defect original Figure 2 .

[0053] Figure 9 is Figure 8 the corresponding detection result image.

[0054] Figure 10 is the defect original Figure 3 .

[0055] Figure 11 is Figure 10 the corresponding detection result image.

[0056] Figure 12 is the defect original Figure 4 .

[0057] Figure 13 is Figure 12 the corresponding detection result image. Detailed implementation manners

[0058] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0059] As Figure 1 shown, the embodiments of the present invention and their implementation processes are as follows:

[0060] A strip steel surface multiple defect detection method based on fuzzy measurement is as Figure 1 shown, including the following steps:

[0061] S1. Photograph the strip steel surface and perform graying processing to obtain the surface gray image P(x, y);

[0062] S2. Calculate the gray histogram f(g i ) of the surface gray image, and then perform Gaussian function fitting on the gray histogram to obtain the image background model

[0063] Generally speaking, the Gaussian function is set according to the following formula:

[0064]

[0065] where g i represents the gray level of the image, μ and σ respectively represent the mean and standard deviation of defect-free pixels in the image, Γ represents the frequency of defect-free pixels, and f C (g i ) represents the pixel frequency with the gray value of g i .

[0066] S21. Calculate the gray histogram f(g i ) of the surface gray image;

[0067] S22. According to several gray histograms, statistically calculate the mean of defect-free pixels of several surface gray images, obtain the fluctuation range of the gray mean, and determine a reasonable search interval, and then process according to the following formula to obtain the mean estimate value

[0068] Specifically, statistically calculate the means of a certain number of test images, determine the fluctuation range of the means, appropriately expand the search range, and find the g i value corresponding to the maximum f(g i ) within the search range. This value is the estimated value of the mean μ.

[0069]

[0070] where represents the estimated value of the mean of defect-free pixels, μ max and μ min respectively represent the maximum mean of defect-free pixels and the minimum mean of defect-free pixels in the statistically calculated gray histogram, γ represents the extension amount of the preset search range, used to control the search range of the mean estimate value, f(g i ) represents the pixel frequency with the gray value of g i , and arg max represents the value of g i when f(g i ) takes the maximum value;

[0071] In this embodiment, the fluctuation of the mean is in the range of [115.3, 128.5], set the value of γ to 10, and search for the maximum f(g i) corresponding to g i value.

[0072] S23. Select a set of points within the upper and lower ranges of the mean estimate as the fitting data set according to the following formula:

[0073]

[0074] in, Represents the estimated mean value of defect-free pixels, n1 and n2 represent the preset values less than and greater than The number of points, g i Indicates the grayscale value; in this embodiment, the values of n1 and n2 are both set to 8.

[0075] S24. Use the least squares method to perform Gaussian function fitting on the fitting data set to obtain an image background model.

[0076] The image background model is set according to the following formula:

[0077]

[0078] in, Indicates that the gray value after fitting is g i The pixel frequency f C (g i ), and denote the estimated mean and standard deviation of defect-free pixels in the image, Indicates an estimate of the number of non-defective pixels.

[0079] The specific calculation formula is as follows:

[0080]

[0081] Where g i represents the gray level of the image, f(g i ) indicates the gray value is g i The pixel frequency, n1 and n2 represent the preset selection less than and greater than The number of points.

[0082] S3, based on image background model Calculate and construct the membership function μ A (g i ), and then use the membership function to perform defect estimation transformation on the surface grayscale image P(x,y) to obtain the membership matrix M(x,y);

[0083] S31, calculate the gray value g according to the following formula based on the image background model iThe probability p(g) of the occurrence of defect - free pixels i ):

[0084]

[0085] wherein, represents the estimated value of the frequency of defect - free pixels with gray - level value g i , represents the estimated value of the frequency f i (g C ) of pixels with gray - level value g after fitting i , represents the estimated value of the frequency of defective pixels with gray - level value g i , and f(g i ) represents the frequency of pixels with gray - level value g i . represents the estimated value of the number of defect - free pixels, and p(g i ) represents the probability of the occurrence of defect - free pixels with gray - level value g i ;

[0086] S32. Construct a membership function according to the probability p(g i ) of the occurrence of defect - free pixels;

[0087] S33. Use the membership function to estimate the defects of the surface gray - level image P(x, y), and convert it to a membership matrix M(x, y) according to the following formula:

[0088] M(x, y)=μ A (I(x, y))

[0089] wherein, M(x, y) represents the membership matrix, I(x, y) represents the gray - level value of the pixel in the x - th row and y - th column of the surface gray - level image, and μ A (I(x, y)) represents the membership value corresponding to the gray - level value of the pixel in the x - th row and y - th column of the surface gray - level image.

[0090] The membership function is constructed according to the following formula:

[0091]

[0092] wherein, μ A (g i ) represents the probability function of the pixel with gray - level value g i belonging to the defect, that is, the membership function, g i represents the gray - level value, represents the estimated value of the mean of defect - free pixels in the image, n1 and n2 respectively represent the preset number of selected points less than and greater than , and p1 represents the gray - level value g iThe probability that the frequency of defect - free pixels is n, p2 represents when the gray - level value is g i The frequency of defect - free pixels is n and the gray - level value is g i The probability that the pixel belongs to a defect, f(g i ) represents the frequency of pixels with gray - level value g i The frequency of pixels, n represents the pixel frequency, n ∈ [0, f(g i )], represents the combination number of selecting n elements from elements, p(g i ) represents the probability that defect - free pixels with gray - level value g i appear, p n (g i ) represents the n - th power of p(g i ), j represents the pixel index of the pixel with gray - level value g i j ∈ [1, f(g i )], represents the coordinates of the j - th pixel with gray - level value g i , F represents the set of defective pixels.

[0093] S4. Binarize the surface gray - level image P(x, y) according to the membership matrix M(x, y) to obtain the strip - steel surface defect area, as Figure 3 shown. Figure 8 . Figure 10 and Figure 12 are different - shaped defects respectively, Figure 9 . Figure 11 and Figure 13 are respectively Figure 8 . Figure 10 and Figure 12 corresponding detection result images.

[0094] S41. Consider the connected region formed by the pixels in the surface gray - level image corresponding to adjacent non - zero membership values in the membership matrix M(x, y) as a fuzzy connected domain;

[0095] S42. Extract all the fuzzy connected domains in the surface gray - level image P(x, y), and binarize all the fuzzy connected domains according to the membership matrix M(x, y) to obtain the strip - steel surface defect area. Specifically, after binarization, further extract the connected domain formed by the connected corresponding gray - level values as the strip - steel surface defect area.

[0096] The binarization is maximum - criterion binarization or cumulative - value - criterion binarization;

[0097] The maximum - criterion binarization is set according to the following formula:

[0098]

[0099] Among them, i represents the fuzzy connected component index, i ∈ [0, N], C i represents the set of pixels within the i-th connected component, (x, y) represents the pixel coordinates of the surface grayscale image, M(x, y) represents the membership matrix, and R(x, y) represents the grayscale value of the image after binarization;

[0100] Specifically, when there is a pixel with a membership value of 1 within the connected component, this pixel is regarded as a defective pixel, and at the same time, all pixels within this connected component are determined to be defective, and the defective pixels are marked as 1. The remaining pixels are marked as 0. From Figure 2 a 7×7 image block is randomly selected from the corresponding membership matrix, as Figure 4 shown, and its corresponding binarization result is as Figure 5 shown.

[0101] The cumulative value criterion binarization is set according to the following formula:

[0102]

[0103] Among them, C i represents the set of pixels within the i-th connected component, |C i | represents the number of pixels in the set C i , j represents the pixel index within the set C i , j ∈ [0, |C i |], (x, y) represents the pixel coordinates of the surface grayscale image, M(x, y) represents the membership matrix, R(x, y) represents the grayscale value of the image after binarization, and TH represents a preset threshold.

[0104] Specifically, defect localization is performed according to the cumulative value of all pixels within the fuzzy connected component. A binarization threshold TH is set. When the cumulative value of the pixels within the connected component is greater than or equal to TH, all pixels within this connected component are marked as 1, otherwise, all pixels are marked as 0. From Figure 2 a 7×7 image block is randomly selected from the corresponding membership matrix, as Figure 6 shown, and its corresponding binarization result is as Figure 7 shown.

[0105] The present invention first generates a histogram of the image to be detected and estimates the background model parameters according to the histogram; then defines a membership function to estimate the degree to which each gray level in the image belongs to a defect, and converts the image into a corresponding membership matrix; finally, combines pixel connectivity to perform defect localization using the maximum value and cumulative value of the fuzzy connected regions.

[0106] After multiple implementations of the embodiment, the accuracy rate of the method of the present invention reaches 96.8%.

[0107] As can be seen from the comparison between the original images and the detection result images in the above respective embodiments, the present invention can accurately locate various different types of defects on the strip surface, and has great application value for the defect detection of the strip surface.

[0108] The above specific embodiments are used to explain the present invention rather than limit the present invention. Any modification and change made to the present invention within the spirit and scope of the claims of the present invention fall within the protection scope of the present invention.

Claims

1. A method for detecting multiple defects on the surface of strip steel based on fuzzy measurement, characterized in that, The method includes the following steps: S1. Take a picture of the strip steel surface and perform grayscale processing to obtain a surface grayscale image; S2. Calculate the grayscale histogram of the surface grayscale image, and then perform Gaussian function fitting on the grayscale histogram to obtain an image background model; S3. Calculate and construct a membership function according to the image background model, and then use the membership function to estimate the defects of the surface grayscale image to obtain a membership matrix; S4. Perform binarization processing on the surface grayscale image according to the membership matrix to obtain the strip steel surface defect area.

2. The method for detecting various defects on the strip steel surface based on fuzzy measurement according to claim 1, wherein: Specifically, S2 is as follows: S21. Calculate the grayscale histogram of the surface grayscale image; S22. According to several grayscale histograms, statistically calculate the mean value of defect-free pixels of several surface grayscale images, and then obtain a mean value estimate according to the following formula: Among them, represents the mean estimated value of defect-free pixels, μ max and μ min respectively represent the maximum mean of defect-free pixels and the minimum mean of defect-free pixels in the statistical gray histogram, γ represents the extension amount of the preset search range, f(g i ) represents the pixel frequency with gray value g i , arg max represents the value of g i when f(g i ) takes the maximum value; S23. Select a set of points within the upper and lower ranges of the mean value estimate as the fitting data set according to the following formula: Among them, represents the estimated value of the mean of defect-free pixels, and n1 and n2 respectively represent the preset numbers of selected points less than and greater than , and g i represents the gray value; S24. Use the least squares method to perform Gaussian function fitting on the fitting data set to obtain an image background model.

3. A method for detecting various defects on the strip surface based on fuzzy measurement according to claim 1, characterized in that: The image background model is set according to the following formula: Among them, represents the estimated value of the pixel frequency with the gray value of g after fitting, i and and respectively represent the estimated values of the mean and standard deviation of the defect-free pixels in the image, represents the estimated value of the number of defect-free pixels.

4. A method for detecting various defects on the surface of strip steel based on fuzzy measurement according to claim 1, characterized in that: Specifically, S3 is as follows: S31. Calculate the probability of the occurrence of defect-free pixels according to the image background model according to the following formula: Among them, represents the estimated value of the frequency of defect-free pixels with a gray value of g i , represents the estimated value of the pixel frequency with a gray value of g after fitting i , represents the estimated value of the number of defect-free pixels, and p(g i ) represents the probability of the occurrence of defect-free pixels with a gray value of g i ; S32. Construct a membership function according to the probability of the occurrence of defect-free pixels; S33. Use the membership function to estimate the defects of the surface grayscale image, and convert it into a membership matrix according to the following formula: M(x,y) = μ A (I(x,y)) Among them, M(x, y) represents the membership matrix, I(x, y) represents the pixel gray value of the x-th row and y-th column in the surface gray image, and μ A (I(x, y)) represents the membership value corresponding to the pixel gray value of the x-th row and y-th column in the surface gray image.

5. A method for detecting multiple defects on the surface of a strip steel based on fuzzy measurement according to claim 1, characterized in that: The membership function is constructed according to the following formula: Among them, μ A (g i ) represents the probability function that a pixel with a gray value of g i belongs to a defect, where g i represents the gray value, represents the estimated value of the mean of non-defective pixels in the image, n1 and n2 respectively represent the preset number of points selected that are less than and greater than , p1 represents the probability that the frequency of non-defective pixels with a gray value of g i is n, p2 represents the probability that a pixel belongs to a defect when the frequency of non-defective pixels with a gray value of g i is n and the gray value is g i , f(g i ) represents the pixel frequency of a pixel with a gray value of g i , n represents the pixel frequency, n ∈ [0, f(g i )], represents the combination number of selecting n elements from elements, and p(g i ) represents the probability that non-defective pixels with a gray value of g i appear.

6. The method for detecting various defects on the strip steel surface based on fuzzy measurement according to claim 1, characterized in that: Specifically, S4 is as follows: S41. Take the connected region formed by the pixels in the surface grayscale image corresponding to adjacent non-zero membership values in the membership matrix as the fuzzy connected domain; S42. Extract all the fuzzy connected domains in the surface grayscale image, and perform binarization processing on all the fuzzy connected domains according to the membership matrix to obtain the strip steel surface defect area.

7. A method for detecting multiple defects on the strip surface based on fuzzy measurement according to claim 1, characterized in that: The binarization processing is maximum criterion binarization or cumulative value criterion binarization; The maximum criterion binarization is set according to the following formula: where \(i\) represents the index of the fuzzy connected component, \(i\in[0,N]\), \(C\) i represents the set of pixels within the \(i\)-th connected component, \((x,y)\) represents the pixel coordinates of the surface grayscale image, \(M(x,y)\) represents the membership matrix, and \(R(x,y)\) represents the grayscale value of the image after binarization processing; The cumulative value criterion binarization is set according to the following formula: Among them, C i represents the set of pixels in the i-th connected component, and |C i | represents the number of pixels in the set C i , j represents the pixel index in the set C i , j ∈ [0, |C i |], (x, y) represents the pixel coordinates of the surface grayscale image, M(x, y) represents the membership matrix, R(x, y) represents the grayscale value of the image after binarization, and TH represents the preset threshold.

Citation Information

Cited By

  • Wind driven generator rotor core surface defect identification method and system

    CN121544618A

  • A method and system for identifying surface defects in the rotor core of a wind turbine generator.

    CN121544618B