## 3 Rapid Quality Screening and Defect Feature Extraction Algorithm on the Strip Steel Surface
### Strip Steel Surface Rapid Quality Screening and Defect Feature Extraction Experiment  
As shown in Figure 5, the strip steel defect acquisition region image in Figure 3 was transformed into a corresponding gray-scale matrix. With the help of the gray-scale projection algorithm proposed in this paper, various kinds of defect regions can be rapidly screened. The gray-scale matrix's \(\rm Global_{Avg}=111.3083\), threshold value (1 \(\pm\)\(\mu\)) \(\rm Global_{Avg}\) is from 77.9 to 144.7. In the yellow region, C\({}_{\rm Max}\)-C\({}_{\rm Min}=41\), C\({}_{\rm Avg}=2\), the column of the image is background. In the green region, C\({}_{\rm Max}\)-C\({}_{\rm Min}=101\), C\({}_{\rm Avg}=28.8\), the column of the image is the transform region between the strip steel edge and background. On the basis of the green region and length of the transform region across columns, extended two times the blue region is the false defect region. In the red region, \(\rm C_{Max}\)-\(\rm C_{Min}\) = 119, 126, 111, \(\rm C_{Avg}\) = 103, 116, 105. Therefore, these three columns of the image are defective images. Figure 6 shows the detection result for the steel strip. Since the picture of row analysis results is too large, we enlarged the detection area A and area B to display results more vividly. In this figure, the effect of overlapping the original image and ROI area is shown on the left. The right side shows the effect of the original image analysis. In area A, the red area is the ROI area, which is exactly on the defective position of the original image. Area B is the row analysis results of the image, where \(\rm R_{Max}\)-\(\rm R_{Min}\) = 80, 80, 80, 83, 83 \(\ldots\), \(\rm R_{Avg}\) = 115, 115, 115, 114, 114, 114 \(\ldots\), threshold value (1 \(\pm\) u) Global\({}_{\rm Avg}\) from 77.9 to 144.7. Therefore, these 12 rows of the image are defective rows. Similarly shown in Figure 7, our algorithm detected a longitudinal flaw image. It can be seen that our algorithm detected the defect area perfectly. To further verify the validity of our defect detection algorithm, the algorithm was tested in an experiment comparing a flawless surface and oxide defect surface. Figure 8 shows the contrast of the improved gray-scale projection algorithm's performance on the defect-free and defect surface. Due to the large region of the defect-free image on the left in Figure 8, only part of the calculation results are shown in this paper, while the defect region on the right image is marked in red. It can be seen that our improved gray projection algorithm can quickly screen defect and defect-free surfaces, and extract defect features. The object of study in this paper was a mixed image dataset, consisting of the _NEU Surface Dataset_[40] and our strip steel defect images. The _NEU surface dataset_ contains six major types of strip defects: cracks, inclusions, scabs, pitted surfaces, rolled in scales, and surface scratches. Each category contains 300 pieces of images, for a total of 1800 pieces of images, each of which is 200 \(\times\) 200 pixels. The images in the dataset are BMP format and each image is a 40.1 KB gray-scale image. On the other hand, our experimental dataset has only one category of strip steel defect called seams. This category contains 50 pieces of images and each image is a 30 KB gray-scale image. As shown in Figure 9, from class 0 to class 5 is the _NEU surface dataset_, and class 6 is our experimental dataset. Figure 5: Column detection results of the steel strip. We randomly selected 80% of the mixed dataset to test our feature extraction algorithm, and the remaining 20% of the data was used as the test data in Section 5. The defect feature extraction algorithm was implemented by using Python 3.6 and OpenCV 4.4.0. The detection time of each image was 3.5 ms (287.5 FPS). As shown in Table 1, our feature extraction algorithm is more effective for large area defects, such as longitudinal cracks, transverse cracks, surface seams, etc.