A method for detecting surface defects of steel strips based on morphological quotient operation
Through the method based on morphological quotient operation, multi-scale and multi-structure filtering and image processing technology are adopted to solve the problem of speed and accuracy in surface defect detection of plate and strip steel, and robustness detection of noise and light unevenness is achieved, adapting to high-speed rolling environment.
Patent Information
- Application Number
- CN202310972911.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-08-03
AI Technical Summary
The existing surface defect detection technology of strip steel is difficult to meet the requirements of detection speed and accuracy during high-speed rolling, and is sensitive to noise and light unevenness, resulting in poor detection results.
The method based on morphological quotient operations is adopted, and the accuracy and robustness of defect detection are improved through multi-scale and multi-structure morphological filtering, quotient operations and significant image processing combined with image inversion, normalization and threshold segmentation.
It improves the accuracy and speed of surface defect detection of plate and strip steel, can effectively deal with the problems of noise and uneven light, and meet online production needs.
Smart Images

Figure CN117218060B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of plate and strip steel surface defect detection, and in particular to a plate and strip steel surface defect detection method based on morphological quotient operation. Background Art
[0002] With the widespread application of strip steel in industries such as automotive manufacturing, aviation and navigation, precision instruments, and electrical appliances, the market has placed higher demands on the surface quality of plate and strip steel, leading steel companies to demand fast and accurate online plate and strip defect detection technology. However, plate and strip surface defect detection technology mainly relies on stroboscopes and manual visual spot checks, which are low in efficiency, labor-intensive, and highly harmful to the human body. Currently, computer vision technology has been widely used in the industrial field. Computer vision-based detection technology mainly consists of image acquisition devices (CCDs), image processing, and defect identification and classification. Surface defect extraction based on image processing is a crucial step. Due to the diversity of strip steel surface defects, existing detection technologies are unable to meet the requirements of processing speed and detection accuracy.
[0003] Extensive research has been conducted both domestically and internationally on methods for detecting surface defects in steel strips, with significant progress being made in mathematical morphology. This primarily utilizes processing methods such as dilation, erosion, opening, and closing operations to identify surface defects in steel strips. However, factors such as the high speed of online steel strip production, the harsh rolling environment, and image acquisition equipment result in uneven illumination and noise in the captured images of steel strip surface defects. Furthermore, steel strip defects are numerous in type, diverse in form, highly random, and lack distinct characteristics. This makes it difficult for mathematical morphology-based strip defect extraction techniques to meet the requirements for detection speed and accuracy. Overall, accurate and rapid methods and technologies for image processing-based surface defect detection in steel strip production lines have yet to be developed. Commonly used detection methods in the prior art, including manual inspection, eddy current testing, infrared detection, magnetic flux leakage testing, laser scanning, and machine vision, are currently the primary methods for detecting surface defects in steel strips.
[0004] Manual inspection: A common method for detecting surface defects on steel sheets and strips in the 1950s and 1960s, manual inspection relies on the human eye to observe and identify surface defects. While it can detect more obvious surface defects at rolling speeds below 100 m / min, it can easily miss minor surface defects or defects with low contrast. With high-speed rolling speeds now reaching 2500 m / min, this method no longer meets production needs.
[0005] Eddy current testing: This method has been widely used in steel plate surface defect detection systems. By installing eddy current testing equipment at the front end of the production inspection system, it repeatedly moves horizontally across the upper and lower surfaces of the steel strip to detect defects such as cracks in the strip. Eddy current testing requires high standards for the surface condition of the steel strip. Due to the influence of iron oxide scale, the detection speed is slow, making it difficult to meet the requirements for detecting surface defects in high-speed rolled steel strip.
[0006] Infrared inspection relies on the theory of transient heat conduction in workpieces. Induction coils induce current in steel strips. When a defective area appears on the product surface, the resistance increases, leading to increased energy consumption in the induced current and a rise in temperature at the defective area, which is then detected by an infrared scanner. However, infrared inspection methods are limited in scope and require stringent rolling conditions, making them unsuitable for large-scale production.
[0007] Magnetic flux leakage testing: If the product surface is free of defects, magnetic flux leakage is unlikely to occur; however, if defects are present, magnetic flux leakage will occur. This method primarily detects defects such as cracks, inclusions, and holes. However, this method is affected by the rolling environment, and its detection accuracy and speed are insufficient to meet the requirements of high-speed, high-quality online production.
[0008] Laser scanning inspection uses a laser as a light source, reflecting the laser beam through mirrors. This optical system scans the product surface, converting the reflected light into an electrical signal to detect surface defects in steel strips. Compared to eddy current testing and infrared testing, this method offers higher sensitivity and greater versatility. However, the inspection system is complex and cannot accurately detect even small defects.
[0009] Machine vision inspection: This method, comprised of an image processing system, a server, and a client control terminal, has been successfully applied to inspect the surface quality of steel strips. Compared to other nondestructive testing methods mentioned above, machine vision inspection offers significant advantages in reliability, practicality, and efficiency. In machine vision inspection systems, the performance of image processing for steel strip surface defects directly impacts the final inspection results and remains a key and challenging area of research and development both domestically and internationally.
[0010] Deficiencies of existing machine vision technology solutions:
[0011] (1) The surface defect detection method for plate and strip steel based on edge segmentation is a relatively common technology, mainly including Robert operator, Sobel operator, Laplace operator and Canny operator. Among them, Robert operator and Sobel operator will weaken the image quality; Laplace operator produces more false edges and has a slow detection speed; Canny operator has good detection efficiency, but the detection effect of small defects is average.
[0012] (2) Plate and strip surface defect detection methods based on threshold segmentation, such as the Otsu algorithm and the super entropy method, extract defect areas from the original image by selecting a threshold. These methods are also widely studied. However, these methods are sensitive to noise and uneven illumination in the original image, which directly affects the detection effect.
[0013] (3) Surface defect detection methods for steel strips based on mathematical morphology use structural elements with a certain shape to extract defect regions of corresponding shapes in the image, achieving image segmentation. These methods primarily use morphological dilation, erosion, opening, and closing operations to remove noise from the original image and obtain defect regions. However, these methods have poor detection effects on small defects and defects with low contrast, and are sensitive to boundary noise.
[0014] Therefore, it is urgent to establish an effective method for detecting surface defects of plate and strip steel to meet the online production needs of plate and strip steel surface defect detection. Summary of the Invention
[0015] The present invention aims to provide a method for detecting surface defects in steel strips based on morphological quotient calculations. This method overcomes the shortcomings of existing machine vision solutions for detecting surface defects in steel strips, such as low detection rates and sensitivity to noise. By providing a method based on morphological quotient calculations, the method improves the accuracy, speed, and robustness to noise of surface defects in steel strips, meeting the requirements of online steel strip production.
[0016] The present invention is achieved through the following technical solutions:
[0017] The present invention relates to a method for detecting surface defects of steel strips based on mathematical morphology, which specifically comprises the following steps:
[0018] Step 1: Image acquisition, input original image I;
[0019] Step 2: Perform multi-scale morphological image filtering on the original image I to obtain the mask image I m ;
[0020] Step 3: Mask image I m Perform multi-scale morphological image filtering to obtain the background image I b ;
[0021] Step 4: Transform the mask image I m and background image I b Perform quotient operation to obtain quotient image I s ;
[0022] Step 5: Obtain the quotient image I by image inversion and normalization s Saliency map I sp ;
[0023] Step 6: Transform the mask image I m and labeled image I sp Perform morphological reconstruction to obtain the reconstructed image I c ;
[0024] Step 7: Extract the reconstructed image I according to step 3 c Background Image I cb , and reconstruct it with the image I c Perform quotient operation to obtain quotient image I cs ;
[0025] Step 8: Obtain the quotient image I according to step 5 cs Saliency map I cp ;
[0026] Step 9: Saliency Map I cp and saliency map I sp Perform mean weighted fusion to obtain saliency map I p And perform threshold segmentation.
[0027] Step 10: Output defect detection map.
[0028] In the above technical solution, in step 2, in order to preserve the details of defects in the steel strip image, the structural element directions (3×3 structural elements in four directions) are selected as linear structural elements with angles of 0°, 45°, 90°, and 135°, respectively. The structural elements are as follows:
[0029]
[0030] Opening operation γ B It can eliminate the positive pulse noise in the image, and the closed operation φ B The negative pulse noise in the image can be eliminated. In order to improve the filtering performance, the most ideal method is to connect the opening operation and the closing operation in series, and use the series opening-then-closing denoising method as shown in formula (1). The image is preprocessed according to the flow chart, as shown in Figure 7 shown.
[0031] I m ={φ B [γ B (I)]|b i ∈B(i=1,2,3,4)} (1)
[0032] In formula (1), γ B represents the opening operation, φ B Represents the closing operation, I m represents the mask image, I represents the original image, b i Represents a structural element.
[0033] In the above technical solution, in step 3, due to the variety of types and shapes of steel strip defects and uneven background illumination of the image, it is impossible to accurately estimate the illumination coefficient of the steel strip using only closed operations. The estimation of the illumination coefficient of the steel strip surface defect image can be regarded as the background I of the steel strip defect image. b This can overcome the lighting problem and is not affected by background texture. Therefore, this step selects a large-size structure element (11×11 structure elements in four directions), as shown below:
[0034]
[0035] Extract the background of the image according to formula (2) and (3). The formula is as follows:
[0036] I g ={φ B [γ B (I)]|g i ∈B(i=1,2,3,4)} (2)
[0037] I b ={γ B [φ B (I g )]|g i ∈B(i=1,2,3,4)} (3)
[0038] In the above formula, γ B represents the opening operation, φ B Represents the closing operation, I b represents the background image, I represents the original image, g i Represents a structural element.
[0039] In the above technical solution, in step 4, the quotient operation is as follows:
[0040]
[0041] In formula (4), I b Represents the background image, I m represents the mask image, I s Represents the quotient image.
[0042] In the above technical solution, in step 5, the quotient image is transformed into a saliency map by inverting the image as shown in formula (5), and then normalizing the transformed image as shown in formulas (6) and (7), thereby obtaining a saliency map I mp .
[0043] I k (i,j)=|1-I s (i,j)| (5)
[0044]
[0045]
[0046] In formula (5), I k In formula (6) and formula (7), I q and I mp Represents the normalized image, min(I k ) means to find image I k The minimum value, max(I k ) means to find image I k The maximum value, max(I q ) means to find image I q The maximum value of .
[0047] In the above technical solution, in step 6, a reconstructed image is obtained by using a morphological reconstruction function imreconstruct(M, X), where M and X represent the marker image and the mask image, respectively.
[0048] In the above technical solution, in step 9, according to the characteristics of the saliency map, a histogram threshold segmentation algorithm based on the maximum value of each row and column of the saliency map is used. The threshold selection algorithm steps are: 1) Find the maximum value of each row and column of the saliency map; 2) Find the histogram of the maximum value of each row and column respectively; 3) Find the height H of the first high peak rectangle in the histogram; 4) As the number of pixels increases, when the height of the rectangle decreases significantly, that is, when the height of the rectangle is lower than β times the height of the highest rectangle, then the pixel mean corresponding to this rectangle is determined as the preliminary threshold selection; 5) The minimum threshold of the two thresholds is used as the threshold for the final segmented image. Where 0<β<1, according to Figure 2 Select β=0.35.
[0049] The present invention has the following advantages:
[0050] The present invention is to use a multi-scale and multi-structure morphological quotient image algorithm to obtain a binary image of surface defects of plate and strip steel, and then complete defect identification. First, an improved multi-scale and multi-structure morphological filtering algorithm is established to eliminate noise in the image. Secondly, a multi-scale and multi-structure morphological quotient operation algorithm is established to effectively correct uneven illumination, and the saliency map of the quotient image is calculated through image inversion and normalization processing. However, it is difficult to accurately obtain defects with low contrast using the quotient image. To this end, morphological reconstruction is used to extract such defects, and the reconstructed image is subjected to quotient operation processing, and the saliency map of the quotient image is also calculated through image inversion and normalization processing. Finally, in response to the phenomenon that the defect features in the saliency map are not obvious, a threshold segmentation algorithm based on the maximum value histogram of each row and column of the saliency map is established to achieve threshold segmentation of the saliency map and obtain a binary image of the surface defects of plate and strip steel. The present invention improves the accuracy and speed of plate and strip steel surface defect detection based on mathematical morphology, and can meet the production needs of online detection of plate and strip steel. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a flow chart of a method for detecting surface defects of plate and strip steel based on morphological quotient calculation;
[0052] Figure 2 It is the detection rate test chart corresponding to different β values;
[0053] Figure 3 It is the original image photo;
[0054] Figure 4 is the filtered image I m photo;
[0055] Figure 5 is a saliency map I cp photo;
[0056] Figure 6 is a saliency map I sp photo;
[0057] Figure 7 This is a diagram of the multi-scale morphological image filtering processing steps. DETAILED DESCRIPTION
[0058] The present invention will be described in detail below with reference to specific embodiments. It should be noted that the following embodiments are only for further explanation of the present invention, but the protection scope of the present invention is not limited to the following embodiments.
[0059] Example
[0060] This embodiment relates to a method for detecting surface defects of plate and strip steel based on morphological quotient operation.
[0061] In order to demonstrate the effectiveness of the strip steel surface defect detection method proposed in this invention, Matalb2016b was used to process the experimental images, and the image pixel size was 260×190. Based on the illumination problem generated during the image acquisition process, the detected images were divided into three categories, namely, uniform illumination, uneven edge illumination, and local uneven illumination of strip steel surface defect images. The experimental tests and analysis were carried out. The implementation steps of the technical solution of this invention are as follows: Figure 1 shown.
[0062] Step S101: Image acquisition, input original image I, see Figure 3 As shown;
[0063] Step S102: Perform multi-scale morphological image filtering on the original image I to obtain a mask image I m ,See Figure 4 As shown;
[0064] Step S103: Mask image I m Perform multi-scale morphological image filtering to obtain the background image I b ;
[0065] Step S104: Mask image I m and background image I b Perform quotient operation to obtain quotient image I s ;
[0066] Step S105: Obtain the quotient image I by image inversion and normalization processing s Saliency map I sp (labeled image);
[0067] Step S106: Mask image I m and labeled image I sp Perform morphological reconstruction to obtain the reconstructed image I c ;
[0068] Step S107: Extract and reconstruct image I according to step 3 c Background Image I cb , and reconstruct it with the image I c Perform quotient operation to obtain quotient image I cs ;
[0069] Step S108: Obtain the quotient image I according to step 5 cs Saliency map I cp ;
[0070] Step S109: saliency map I cp and saliency map I sp Perform mean weighted fusion to obtain saliency map I p And perform threshold segmentation, see Figure 5 and Figure 6 As shown; according to the characteristics of the saliency map, a histogram threshold segmentation algorithm based on the maximum value of each row and column of the saliency map is used. The steps of the threshold selection algorithm are: 1) Find the maximum value of each row and column of the saliency map; 2) Find the histogram of the maximum value of each row and column respectively; 3) Find the height H of the first high peak rectangle in the histogram; 4) As the number of pixels increases, when the height of the rectangle decreases significantly, that is, when the height of the rectangle is lower than β times the height of the highest rectangle, then the pixel mean corresponding to this rectangle is determined as the preliminary threshold selection; 5) The minimum threshold of the two thresholds is used as the threshold for the final segmented image. Where 0<β<1, according to Figure 2 Select β=0.35.
[0071] The present invention is to use a multi-scale and multi-structure morphological quotient image algorithm to obtain a binary image of surface defects of plate and strip steel, and then complete defect identification. First, an improved multi-scale and multi-structure morphological filtering algorithm is established to eliminate noise in the image. Secondly, a multi-scale and multi-structure morphological quotient operation algorithm is established to effectively correct uneven illumination, and the saliency map of the quotient image is calculated through image inversion and normalization processing. However, it is difficult to accurately obtain defects with low contrast using the quotient image. To this end, morphological reconstruction is used to extract such defects, and the reconstructed image is subjected to quotient operation processing, and the saliency map of the quotient image is also calculated through image inversion and normalization processing. Finally, in response to the phenomenon that the defect features in the saliency map are not obvious, a threshold segmentation algorithm based on the maximum value histogram of each row and column of the saliency map is established to achieve threshold segmentation of the saliency map and obtain a binary image of the surface defects of plate and strip steel. The present invention improves the accuracy and speed of plate and strip steel surface defect detection based on mathematical morphology, and can meet the production needs of online detection of plate and strip steel.
[0072] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various variations or modifications within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A method for detecting surface defects of steel strips based on mathematical morphology, characterized in that: The following steps are involved: Step S1: obtaining an image of the surface of the object to be detected; Step S2: extracting a background image of the image to be detected as a first background image; Step S3: performing a first quotient operation on the image to be detected and the first background image to obtain a first quotient image; Step S4: morphologically reconstructing the image to be detected and the first quotient image to obtain a first reconstructed image; Step S5: extracting a background image of the first reconstructed image as a second background image; Specifically, to transform the quotient image into a saliency map, the image is inverted as shown in formula (5), and then the transformed image is normalized as shown in formulas (6) and (7), thereby obtaining the saliency map I mp , the formula is as follows: I k (i,j)=|1-I s (i,j)| (5) In formula (5), I k Indicates an inverted image; In formula (6) and formula (7), I q and I mp Represents the normalized image, min(I k ) means to find image I k The minimum value, max(I k ) means to find image I k The maximum value, max(I q ) means to find image I q The maximum value of Step S6: performing a second quotient operation on the first reconstructed image and the second background image to obtain a second quotient image; Step S7: Based on the first quotient image and the second quotient image, obtaining a defect detection image of the surface of the object to be inspected; specifically, performing mean-weighted fusion on the first quotient image and the second quotient image, and performing threshold segmentation to obtain a defect detection image of the surface of the object to be inspected; Specifically: According to the characteristics of the saliency map, a histogram threshold segmentation algorithm based on the maximum value of each row and column of the saliency map is used. The threshold selection algorithm steps are as follows: 1) calculate the maximum value of each row and column of the saliency map; 2) calculate the histogram of the maximum value of each row and column respectively; 3) calculate the height H of the first high peak rectangle in the histogram; 4) as the number of pixels increases, when the height of the rectangle decreases significantly, that is, when the height of the rectangle is less than β times the height of the highest rectangle, then the pixel mean corresponding to this rectangle is determined as the preliminary threshold selection; 5) the minimum of the two thresholds is used as the threshold for the final segmented image, where 0<β<1.
2. The method for detecting surface defects of steel strips based on mathematical morphology according to claim 1, characterized in that: In step 1, the image to be detected is subjected to a first multi-scale morphological filtering process to obtain a mask image.
3. The method for detecting surface defects of steel strips based on mathematical morphology according to claim 1, wherein: In step 2, the specific step of extracting the background image of the image to be detected is: performing a second multi-scale morphological filtering process on the mask image to obtain a first background image.
4. The method for detecting surface defects of steel strips based on mathematical morphology according to claim 1, wherein: In step 3, the specific step of performing a first quotient operation on the image to be detected and the first background image is: performing a first quotient operation on the mask image and the first background image to obtain a first quotient image.
5. The method for detecting surface defects of steel strips based on mathematical morphology according to claim 1, wherein: In step 4, the specific step of morphologically reconstructing the image to be detected and the first quotient image is: morphologically reconstructing the mask image and the first saliency map to obtain a first reconstructed image.
6. The method for detecting surface defects of steel strips based on mathematical morphology according to claim 1, wherein: In step 5, the specific step of extracting the background image of the first reconstructed image is: performing multi-scale morphological filtering on the first reconstructed image to obtain a second background image.
7. The method for detecting surface defects of steel strips based on mathematical morphology according to claim 2, wherein: The structural element of the filtering process is a linear structural element.
8. The method for detecting surface defects of steel strips based on mathematical morphology according to claim 2, wherein: The filtering process specifically includes: connecting an opening operation and a closing operation in series, and adopting a series opening-first-closing-then denoising method.
Citation Information
Patent Citations
Weld defect segmentation method based on background subtraction and connected region algorithm
CN110648349A
Surface defect detection method
JP2004045356A