## 3 Rapid Quality Screening and Defect Feature Extraction Algorithm on the Strip Steel Surface
### Strip Steel Edge and Background Region Automatic Detection  
As shown in Figure 2, since there is no high reflectivity metal outside the strip steel edge region, the background is usually dark. In the background image, there is only a narrow strip steel conveying guide rail, with a relatively simple color and much lower gray-scale value than the strip steel surface. For image edge background screening questions, the average gray projection value concept was proposed. The average gray projection value is the average gray-scale value on the horizontal or vertical projection. If the image has an average gray-scale value on the horizontal or vertical projection that is too low and below a certain threshold, it is believed that this row or column is located in the background. The threshold value of the average gray projection value can be pre-adjusted according to the scene illumination gradation and defect-free strip steel's gray-scale value. The threshold value is set according to the lighting conditions of each experiment and defect-free strip steel images; it is an empirical value from a large number of comparative tests. After a simple calculation of the average gray projection value and gray-scale value comparison, the strip steel edge region and background can be substantially divided. Figure 3 shows a steel strip defect acquisition region. An Improved Strip Steel Surface Rapid Quality Screening and Defect Feature Extraction Algorithm Based on Gray-Scale Projection  
In actual production, not all images captured by CCD cameras contain a defect. In general, the defect region ratio is 5% or less (Steel Acceptance Criteria: GB.1965/1978). Therefore, rapid screening of defect-free surfaces can not only greatly decrease the amount of calculation required, but also improved detection efficiency. Influenced by scene illumination gradation and hardware devices, images captured by CCD camera will generate blurred edges or the strip steel edge may not be detected. This can contribute to an edge false defect, where the defect does not exist in practice. As shown in Figure 4, in the steel strip defect acquisition region, processed by the Canny edge detection operator, there is a significant break elongated fold line between the strip steel edge and background intersection region. If using the background subtraction method to detect the fold line, it will be misidentified as a strip steel surface defect. A large number of edge false defects pose a challenge to rapid quality screening of strip steel surfaces and defect feature extraction. Through a lot of experiments, it has been found that false defects on the edge of strip steel have a common characteristic: the false defect edge is no longer a straight line, but a bent or broken fold line. The fold line is very narrow and close to the transform region between the strip steel edge and background. In view of the above characteristics of edge false defects, an improved strip steel surface rapid quality screening and defect feature extraction algorithm based on gray-scale projection is proposed in this paper on the basis of the background subtraction method. Considering that there are many transverse and  
Figure 3: Image of a strip steel defect acquisition region. Figure 2: Image of the strip steel edge region and background region. longitudinal stripes of strip steel defects, and the system speed requirements for detection on-line, this paper only calculated the gray-scale value on horizontal and vertical projection. Firstly, the algorithm projected images horizontally and vertically.