Metal Surface Inspection for Defect Detection and Classification using Gabor Filter | Open Access Journals

ISSN ONLINE(2319-8753)PRINT(2347-6710)

Metal Surface Inspection for Defect Detection and Classification using Gabor Filter

Chaitali Tikhe1 and J.S.Chitode2
  1. P.G. Student, Department of Electronics Engineering, Bharati Vidyapeeth Engineering College, Pune, India
  2. Professor, Department of Electronics Engineering, Bharati Vidyapeeth Engineering College, Pune, India
Related article at Pubmed, Scholar Google

Visit for more related articles at International Journal of Innovative Research in Science, Engineering and Technology


Quality control is an important issue in the metallic industry. Also maintaining the rate of production with respect to time is also a major issue in metal manufacturing. Quality of metallic objects depends on its texture, shape etc. Various defects on raw metal planes like pin holes, scratches etc are difficult to detect at early stage of production with naked eyes. Time required for analysis and the accuracy will vary from person to person. For this purpose, an automatic defect detection and classification technique using enhanced Gabor filter has been proposed so that it can ensure the better quality of metal in manufacturing process as well as production rate. This automated classification method helps us to acquire knowledge about the pattern of defect within a very short period of time and so that the defected metal may not be mixed with the fresh metal.


Quality control, Automatic defect detection, Gabor filter, production rate.


The rapid development in digital computer led to expansion of applications for computer vision. From those applications one of the most useful applications is to detect and classify different types of defects. Today, most of the stages during manufacturing are automated. But in metal production lines the visual inspection for various defects is done manually. The manual inspection process is not very accurate, labour intensive and tedious as it is dependent on concentration and experience of human. So the alternative is to implement the automatic defect detection and classification technique.
In production industries machine fails due to various reasons. These causes are shown in fig. 1[2]
Fig.1 shows that machine fails because of three reasons they are obsolesces, Surface degradation and accident. Among these three reasons surface degradation is due to corrosion and mechanical wear. Mechanical wear is caused by abrasion, fatigue and adhesion. From above statistical data it is proved that surface degradation is the factor that causes most of machine failure. Therefore, it is important to realize and classify the defects in surfaces automatically at early stages of production. We generally found following defects in metal from existing defect detection work. These types of defects are shown in table I.
The objective of our research is to propose an efficient defect detection and classification technique which will be able to find out image defects at a high rate within a very short time. The overall outline of this paper is mentioned as follows. Section II describes related work i.e. literature review Section III explains Gabor Filter. Section IV illustrates proposed algorithm using Gabor filter. Experimental results and comparison is given in section V. Finally, the conclusion is discussed in Section VI.


In the past years, some of the defect detection techniques have been proposed and they are classified in four different approaches. These approaches are statistical, model based, structural and filter based. In statistical approach histogram properties, autocorrelation, local binary patterns, GLCM can be used. With the help of GLCM various statistics of texture like entropy, dissimilarity, energy, correlation, Homogeneity, contrast etc can be determined. In [4] authors combine Gabor filter and GLCM approach for fabric defect detection. But drawback of this technique is that to optimize the displacement vector there is no particular accepted solution is available. In [2], T.Aarthi et al. developed a technique for defect detection in metal using 2 dimensional discrete wavelet transform. For analysis of surface they obtained numerical data from images. This data were used for performing statistical analysis which includes the calculation of mean, variance, standard deviation, kurtosis and skewness from the acquired image. HAAR and Daubechies wavelets were used. In this approach authors went up to 3 level decomposition of image which consists of a 1/64 size smoothed sub image. In [5], K.N. Sivabalan et al. used Gabor wavelet filter and Gaussian filter for surface analysis. In this technique Gabor filter were used to eliminate texture elements. Gabor filter output is applied to Gaussian filter to smooth the high energy points. Then fast searching algorithm and segmentation were deployed to find out the defects. But the drawback of this technique is that the method cannot identify defects in high intensity levels. In [7], Doo-Chul Choi et al. presented an algorithm for detecting seam cracks in steel plates. They used Gabor Filter and adaptive double threshold method to detect cracks. An algorithm starts with segmentation of acquired image after that Gabor function is applied for creation of Gabor filter bank. Then adaptive double thresholding and process was used to obtain a binarized image and using feature extraction they detect the defects. But this algorithm should be improved to increase true positive rate. In [10], G.M. Atiqur Rahaman et al. proposed an automatic defect detection technique for ceramic tiles. For this purpose they use some image processing operations which include image acquisition, image enhancement, noise reduction and edge detection. After applying these defect detection techniques they used various algorithms to classify defects. But this method fails to detect scratch and glaze faults. This technique does not improve computational time for proposed detection and classification technique.


Gabor filters are defined by harmonic functions i.e. sinusoidal functions modulated by a Gaussian distribution. Gabor filters have some similarity to Fourier filters, but are limited to certain frequency bands. With the help of Gabor transform we can transform the signal into time frequency domain after that signal is processed and with the inverse Gabor transform of processed signal we get the desired or result signal[4]. The Gabor transform is also termed as the Short Time Fourier Transform (STFT).
Gabor filters can also decompose the image into components corresponding to different scales and orientations. In the spatial domain, the Gabor function is a complex exponential, modulated by a Gaussian function. Its impulse response in the two-dimensional (2D) plane has the following general form:


The flow chart of our proposed algorithm for defect detection and classification is given below in fig. 2. It starts with collection of images of metal plates acquired from industry. Gabor filter bank is created of the reference and test images. After that feature difference is extracted by comparing test image and statistical values i.e. mean and standard deviation of reference image. Then unique image is obtained by data fusion. Thresholding is done to evaluate whether defect is present or not. If the defect is present then bounding box calculation is done to classify the defect.
In this section, we propose a defect detection and classification technique for metal plates so that we can achieve higher defect detection rate with reduce computational time. Sequences of operation for proposed algorithm are as follows.
A .Gabor filter bank creation for multichannel filtering
The proposed algorithm is experimented on the various images of metal having defects either scratch or spot or both. Gabor filter consists of various parameters such as wavelength, bandwidth, orientation, phase offset and aspect ratio. For filtering purpose we have to decide scales and orientation of Gabor filter. According to scale of an image the wavelength and bandwidth affect the filter response. Also response of filter is affected by orientation of metal parts. Thus, we consider scale, S=3 and orientation, L=6 and obtained 18 asymmetric Gabor filters. Then we filtered every acquired image with these 18 Gabor filters. Filtered image is calculated using following equation.
C. Data fusion
In this step we combine the pixels from difference images which are obtained in above method. This involves following steps: 1) addition of pixels of images having same scales and different orientation which create three images. 2) Take mean of resultant pixels of adjacent orientation which gives two images. Then average of these two images is computed to get a unique image H(x, y). After that image H’(x, y) having same orientation is obtained by repeating above two steps. Both the images H(x, y) and H’(x, y) are combined to get single unique image.
Fig.7 represents image obtained after thresholding. Decision of whether the defect is present is taken by analysing this threshold image.
E .Defect Classification
In the first step, number of white pixels below a limit value say C are discarded from threshold image. After that component connectivity is checked. Then bounding box of all connected objects is calculated by considering rows and columns. Percentage density of bounding box is evaluated and the decision is made by considering whether density is greater than or less than the threshold limit say T. Classification is given as follows.
If Density ≥ T, Defect is spot Else Defect is scratch.
In above image there are three spots and two scratches are detected.


Various images of metals with defects such as scratch, spots etc have been collected from production line. The algorithm is applied on these images to check the efficiency of algorithm. The following representation in fig.9 reveals that accuracy of spot detection is greater than scratch detection in metals. The proposed method successfully detects the defects of different size, resolution and orientation and so proved to be robust.


In this paper, unsupervised defect detection method to detect spots and scratch metal defects has been proposed. The above comparison shows that accuracy of spot defect detection is greater than scratch defects. The Algorithm has the capacity to be used in various types of images. The speed of detection is increased as well as accuracy is maintained by using proposed approach. This method can be used for examining other types of materials such as plastic, wood, fabrics etc.


[1] Ajay Kumar,Grantham Pang “Defect detection in texture materials using Gabor filters” IEEE transactions on industry applications, vol. 38, no. 2, march/april 2002.

[2] T. aarthi, M. karthi, M. abinesh “Detection and analysis of surface defects in metals using wavelet transform”, International Journal of Scientific and Research Publications, Volume 3, Issue 6, June 2013.

[3] Mostafa Sadeghi, Faezeh Memarzadehzavareh, “Flaws detection in steel plates Using Gabor Wavelet”, Life Science Journal, pp.352-355, 2013.

[4] Jagdish Lal Raheja, Sunil Kumar, Ankit Chaudhary “Fabric defect detection based on GLCM and Gabor filter: A comparison” Elsevier 2013.

[5] K.N.Sivabalan, DR.D.Gnanadurai “Efficient defect detection algorithm for gray level digital images using Gabor wavelet filter and Gaussian Filter” International Journal of Engineering Science and Technology, Vol. 3 No. 4, pp.3195-3202, Apr 2011.

[6] Rashmi S Deshmukh Dr P R Deshmukh “Comparison Analysis for Efficient Defect Detection Algorithm for Gray Level Digital Images Using Median Filters Gabor Filter and ICA “,International Journal of Advanced Research in Computer Science and Software Engineering , Volume 2, Issue 1, January 2012.

[7] Doo- chul Choi, Yong Ju Jeon, Jong Pil Yun, “ An Algorithm for detecting seam cracks in steel plates” ,Word Academy of Science, Engineering and Technology, Vol.6, pp. 1478-1481 , December 2012.

[8] Yanfang Han, Pengfei Shi “An Adaptive level-selecting wavelet transform for texture defect detection”, Elsevier Image and Vision computing, pp.1239-1248, 2007.

[9] Yiling Chen, Tse-Wei Chen, shao-yichen “Fast texture feature extraction method based on segmentation for image retrieval” by 13th IEEE International Symposium on consumer electronics, 2009.

[10] G. M. Atiqur Rahaman, Md. Mobarak Hossain,“Automatic defect detection and classification technique from image: a special case using ceramic tiles”, International Journal of Computer Science and Information Security, Vol. 1, No. 1, May 2013.