Detection of Surface Defects on Steel Strips Based on Singular Value Decomposition of Digital Image

Image segmentation technology has beenwidely used to detect the surface defects inmetal industries effectively. In somefields of the manufacturing industry, the determination of defects is more concerned than the accurate location and shape of defects. However, most of current image segmentation algorithms are complex or have difficulty determining the defect. This paper presents a novel method for determining and roughly locating the surface defects of steel strips based on SingularValueDecomposition.Themethod has no need of image segmentation.The gray level matrix of a digital image is projected on its singular vectors obtained by Singular Value Decomposition. A defect is reflected as a sudden change on the projections. Therefore, the defects can be determined and roughly located according to the sudden changes. The experimental results suggest that this method is valid and convenient for determining the surface defects directly.


Introduction
As the raw material of machinery, aerospace, electronics, and other industries, there is a higher requirement for the surface quality of steel strips.But various surface defects occur unavoidably in the production of the steel strip constrained by its production process and physical and chemical properties.Defects ruin not only the appearance of steel strips, but also their important performances, such as the corrosion resistance, wear resistance, and fatigue strength.With defects, some steel strips are regarded as substandard or waste products in the further processing.More seriously, the defects may cause significant economic losses and even safety accidents without effective defect detection.Thus, the effective detection of surface defects is an important part of quality control of steel strips.Especially in China, with the overcapacity in the steel industry, the defect detection is of greater importance for steel strips.
Many methods are adopted to detect the surface defects of steel strips based on computer vision.The methods cover almost all categories described above.But each method has its own advantages and constraints.In general, the statistical methods determine the existence rather than the location of defects without image segmentation.The frequency spectral methods require complex transformation from spatial domain to frequency domain.The model-based methods lack a standard modeling method so that the model is difficult to be established.
The determination of surface defects rather than their accurate location and shape is more concerned in the further processing of steel strips.Although image segmentation is widely used in the methods available to detect defects on steel surfaces [22], there is a practical need for a simpler and more convenient method.
In order to directly determine and roughly locate the defects on steel strips, this paper presents a novel method based on Singular Value Decomposition (SVD).The method has no need of image segmentation.The gray level matrix is projected on its singular vectors.The defect can be determined and located by the large wave peaks of the projections simultaneously.And the validity of this method is confirmed by experiments.

Theories and Method
The Principal Component Analysis (PCA) intends to reveal the internal structure of variables by analyzing the so-called principal components.Since such independent principal components should hold as much information of the initial variables as possible, PCA is usually used to find the correlation between multiple variables.As a multivariate statistical method, PCA has been widely used in social and economic statistics, molecular dynamics simulation, mathematical analysis, and so on.Concerning pattern recognition, PCA is commonly used for filtering, dimensionality reduction of data, and feature extraction.However, it has not been reported that PCA is used to detect and locate the interest objects in an image directly, which deserves more attention and requires more research.
The method presented in this paper is based on SVD which is a classic method of PCA.Therefore, it is necessary to make a brief introduction to SVD before the description of the method.

Singular Value
where which is called the singular value factorization of .The columns of the matrix  must form an orthonormal basis for the columns of , while the columns of the matrix  must form an orthonormal basis for the columns of   .

Defect Detection Method Based on SVD.
Different from the background in pixels, the defect can be regarded as an abnormal area with the change of some elements in the gray level matrix.For the gray level matrix, the singular values and vectors change with its elements in some rows or columns, so that the vectors resulted from projecting the matrix on its singular vectors change too.In an image of the steel strip with defects, the elements of the projection vectors corresponding to the abnormal area change more considerably than those corresponding to the normal area.The indexes of elements with sudden changes correspond to the row or column numbers.With the sudden changes, the defect can be determined and roughly located.

Detection in Ideal
Case.In this section, the determination and location are discussed in the ideal case.It is assumed that there is no noise or disturbance in the gray image of the steel strip.In other words, the gray level values of all the pixels are equal for an image without defects.Then the gray level matrix of the image can be described as Here  is the gray scale of each pixel in the image.
According to (2), there is where both  and  are unitary matrices and Σ is a diagonal matrix.Then (4) can be expressed as In the same way, the following equation can be obtained: Thus the left singular vectors are just the eigenvectors of   and right singular vectors are just the eigenvectors of   .
The left singular vectors can be solved by eigenvalue decomposition.Then  is substituted into Let the eigenvalues of   be   ( = 1, 2, 3, . . ., ).Obviously, the rank of   is 1, and  2 is the only nonzero eigenvalue of   .According to eigenvalue decomposition, the eigenvalue   should meet the equation (  −  )  = 0, where   is defined as in Theorem 1. Then there is As the solution of the above equation group, the vector  1 must have the form ; here  is a real number.So there is Here    1 is called the projection on the first left singular vector of .In the same case, all elements of vector  1 are the same real number too.The vector  1 is called the projection on the first right singular vector of .By using the same method, the projection vectors, both    2 and  2 , are zero vectors.
In the ideal case, the surface defect of the steel strip is regarded as the perturbation of the gray level matrix.According to the matrix perturbation theory, the singular values of a matrix are of good stability [24], so are the singular vectors.In an image of the strip with defects, the projection corresponding to the defect is different from that corresponding to the normal areas.And the rest of the projection will change, but the change is very small.
For example, when an 8-bit pure white image (drawn with Microsoft Paint) is converted into a gray level image shown in Figure 1(a), all the elements of the corresponding gray level matrix will be 255.The singular vectors of the gray level matrix can be evaluated by MATLAB.According to the method in this paper, the gray level matrix is projected on its first left and right singular vector.For convenience, the projections are called left and right projection, respectively.They are shown in Figures 1(b) and 1(c) as left and right projection curves.In Figure 1, both the projection curves are horizontal lines.
As shown in Figure 1(a), regarded as abnormal, a small pure black dot is randomly tainted in the pure white image.Then the corresponding elements of its gray level matrix are nullified.The projection curves are shown in Figure 2.There are significant changes in both the projection curves compared with those in Figure 1.Obviously, there is a corresponding relationship between the abscissa values of the peak on the projection curves and the matrix rows and columns of those abnormal elements.From Figures 2(b) and 2(c), the horizontal ordinate values are found to be the row and column numbers of the black area in the gray level matrix, respectively.Accordingly, the location of the black area in the image can be easily determined as shown in Figure 2(d).Apparently, the method for detecting the abnormal area assumed zero noises, which is somewhat an idealized scenario.The method should be verified in a real situation.

Detection in Real
Case.In order to verify the validity of this method, an experiment is conducted.Based on SVD, the projections on singular vectors of a gray level matrix are postulated to detect the surface defects on steel strips.Here it is assumed that the area of all surface defects is only a small part of the overall image.Before detecting the defects, the image of a strip acquired from the machine vision system should be converted to a gray level image.Thus the gray level matrix  is obtained.
An example is used to verify the above postulate.Figure 3(a) shows a gray level image of a steel strip with a hole.This image is obtained through the machine vision system from a real rolling line.According to the above procedures, the first left and right singular vectors are selected.The right and left projection curves are shown in Figures 3(b) and 3(c), respectively.Obviously, the results with the real image differ greatly from those in the ideal situation.Although the peaks corresponding to the hole are identified through the projection curves, the curves are changing throughout the range.And the fluctuation range is relatively large due to the noises in the image.Therefore, the determination and location of the defect are not as simple as in the ideal situation.
To overcome the above constraints, more singular vectors are examined.It is found that the projections on second left and right singular vectors are similar to those in the ideal situation.With the second left and right singular vectors employed, the results are shown in Figures 4(b   In Figure 4, the projection values are near to zero except for the area corresponding to the hole.The sharp change in amplitudes between the normal and abnormal areas allows for the detection and rough location of the defect.With the projection corresponding to normal area roughly in a horizontal line, the detection and location of the defect are simplified as shown in Figure 4(d).

Procedures of the SVD-Based Method.
As discussed above, the SVD-based method can be used to detect the surface defect of steel strip.The main procedures are summarized as follows: (1) Transform the image of steel strip into a gray level image, thus obtaining the gray level matrix .
(2) Calculate the left and right singular vectors of  with SVD, which are denoted as  and , respectively.
(3) Project  and its transport matrix   on the second right and left singular vectors named  2 and  2 , respectively, in order to obtain the left and right projection vectors referred to as   and   , respectively:   =   and   =     .
(4) Designate the absolute values of the vectors   and   as abs   and abs   , respectively.
(5) Find maximums of abs   and abs   , respectively, and denote them as max  and max .(8) According to the indexes, mark the defects in a blank image in order to roughly locate the defects.

Experimental Results and Discussion
In order to further verify the validity of this method, a series of experimental measurements are carried out.

Experimental Results of Defect Detection.
In these experiments, the images of steel strips with the known surface defects are obtained by the machine vision system from the real production line.Some typical scenarios are illustrated as follows.
Figure 5 shows the result of a steel strip with a roll imprint.Figure 6 shows the result of a steel strip with a large black mark.Figure 7 shows the result of a steel strip with several irregular holes, as a more complex case.Figure 8 shows the result of a steel strip with scratches.In Figures 7 and 8, the results are satisfactory even though these cases are more complex than the assumption in Section 2.

Discussion
. While the results have shown that this method is valid, the underlying theoretical basis remains to be investigated.In this regard, two fundamental questions should be addressed.One question is how the defects correlate with the sudden changes on projection curves.This may be explained with the matrix perturbation theory.With a defect in the image, there is greater change in some elements of its gray level matrix than those in the defect-free image.But with its singular vectors relatively stable, the sudden changes will occur when the gray level matrix is projected on its singular vectors.The change of the gray level matrix is considered as the primary cause of the sudden changes on projection curves rather than singular vectors.Yet, further investigation is needed to prove this assentation.
Another question is why the projection on the second vector performs better than that on the first one.According to PCA, the former principal components represent the major information of the image while the remaining principal components hold the minor information.For the defect detection under the previous assumption, the background is just the major information of the image with the defects while the defect is the minor information.To be exact, the second principal component represents more information about the defects.
It should be noted that with too large defects or too many scattered defects in the images, this method becomes less satisfactory because defects have become the primary information of the image.In addition, with very uneven illumination, the image brings about the unsatisfactory results.For example, the light focused on one point can trigger a false alarm because the light spot may be considered as a defect.
It is worth mentioning that this method is simple and practical.However, its simplicity results in the rough location of the defect.Roughness is mainly reflected in two aspects.One is that the detected shape and area are inaccurate.Another one is that the number of defects detected is greater than the actual number.Therefore, the more accurate the

Figure 1 :
Figure 1: Results of pure white image.

Figure 2 :
Figure 2: Results of pure white image with a black dot.

Figure 3 :
Figure 3: Result of steel strip with a hole projected on first singular vectors.

Figure 4 :
Figure 4: Result of steel strip with a hole.

Figure 6 :
Figure 6: Result of a steel strip with a large black mark.

Figure 8 :
Figure 8: Result of a steel strip with scratches.