4 Detection
4 Detection
Abstract: Defects in glass which show poor quality are the major problem for manufacturer in glass making industry. It is
very difficult and prone to error process to manually inspect very large size glass. The manual examination process is slow,
time consuming and prone to human error. The glass detection technique using image processing provide much relief from
error to manufacturer and also provide strength to hold in market providing best quality and low cost glass to customers. In
this paper all types of faults are taken. The previous work has been done for only major faults or defects. Detection of
defects is based on segmentation using edge detection using gradient approach based on sobel operator. Gray color space
and the adaptive histogram technique are used for better contrast and it helps in detection of defects and compares it with
the help of structural similarity index (SSIM) parameter with contour detection technique.
Keywords: Structural similarity Index (SSIM), Adaptive histogram equalization, gray color space, glass, image
segmentation.
I. INTRODUCTION
Defect free glass provides strength to the manufacturer of glass making industry. In past manual inspection is prominent
and play a vital role in glass inspection. But nowadays the detection take place through automatic detection technique
provide better reliability, fast and very less prone to error than traditional one. Nowadays An automated visual inspection
system is used for detecting and measuring the defects in satin glass and real time system is used [1].
For quality control the technique is used called Color space which specifies and visualizes color. Different color
spaces are better for different applications [2]. Five most commonly used color spaces are tested. Researchers randomly
select one of the color spaces for color image processing applications. But there should be a way to select a suitable color
space according to the purpose because the choice will directly affect final results of image processing [3]. The conversion
of color images between RGB, HSV, YCbCr, NTSC, Gray is done. Their conversion efficiency is computed and their
performance in quantifying the defect visibility is compared based on which the best color space can be chosen [4]. The
RGB color space is recommended if one needs to view and process various defects like scratches, spots, edge defects etc in
images. If any color space conversions are required the best choice is RGB to Gray color space conversion which makes the
defect visible to largest extent and segmentation using contour region growing method applied for detection of defective
areas in glass sheets[5]
Copyright to IJIRCCE www.ijircce.com 1321
ISSN(Online): 2320-9801
ISSN (Print): 2320-9798
The rest of the paper is organized as follows: Section 2 is about problem formulation means what types of problems are in
previous work. After that section 3 for design methodology, in which steps regarding algorithm takes place. In section 4
implementation of algorithm carried out for detection of defects and the Section 5 discuss the results and last section 6
concludes the paper.
Image enhancement
using adaptive
Invert segmented image
histogram equilization
Image segmentation
using edge detection Fault outline in original
image
IV. IMPLEMENTATION
In this paper combine a series of images processing steps to solve our purpose of detection based on well defined operators
present nowadays. First read the image then select the RGB color space. After that convert the image into gray scale and
then segmentation using edge detection takes place.
Segmentation is the basic process of image analyses. The goal of segmentation is to simplify and change the
representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically
used to locate objects and boundaries (lines, curves, etc.) in images [6]. Edge detection technique is used for segmenting
images based on abrupt change in intensity. Sobel operator is used to detect the edges of fault with gradient based
approach[7]. The Sobel operator performs a 2-D spatial gradient measurement on an image. Typically it is used to find the
approximate absolute gradient magnitude at each point in an input grayscale image. The Sobel edge detector uses a pair of
3x3 convolution masks, one estimating the gradient in the x-direction (columns) and the other estimating the gradient in the
y-direction (rows).
G Gx 2 Gy 2
-1 0 +1 +1 +2 +1
-1 0 +1 0 0 0
-2 0 +2 -1 -2 -1
(a) (b)
(1)
G Gx Gy
(2)
Where Gx is the3x3 convolution mask which estimates the gradient in x-direction and Gy is the3x3 convolution mask which
estimates the gradient in y-direction.
Sobel operator is better than prewitt and Roberts operators because of better noise suppression (smoothing) characteristics
makes it preferable. Sobel operator is applied on selected image for detection the edges of fault and then invert the image
for better visibility of defects. Now compare this technique with contour detection using structural similarity index (SSIM)
parameter [8]. The structural similarity (SSIM) index is a method for measuring the similarity between two images.
V. RESULTS AND COMPARISON
The intended method has been functional to digital images of the glass sheets taken for detecting various defects like
scratches, inclusions, surface defects etc using MATLAB and compare it with contour method of detection of defects in
glass with the help of Structural similarity (SSIM) index. SSIM provided the similarity between two images. It is full
reference matrix in which one image taken as original image as reference and other image is produced by both contour and
edge detection method. The complete results have been shown below:-
Detection of faults using contour region technique:-
Apply the contour regrow method on image figure 3: (a) which is the original image taken for evaluation and in figure 3:
(b) show the final contour image and after that figure 3: (c) show the final detective region.The contour method detects fault
using region regrow techniqe which takes many iterations and using simple technque for enhancement. In this paper
another technique is used which is based on edge detection for segmentation and for enhancement adaptive histogram
equilization is used which provide better detection of faults. The outputs of proposed algorithm is shown below:-
Figure 4: (a) is original image which is used for analyzed the faults. RGB to gray scale model conversion is applied to
figure 4: (a) and show the result of original gray scaled image in figure 4: (b). Enhancement is done by adaptive histogram
equalization and enhanced image is shown in figure 4: (c). Edge and the Sobel operator is used to calculate the threshold
value, then tune the threshold value and use edge again to obtain a binary mask that contains the fault. Figure 5: (d) shows
binary gradient mask. The binary mask that contains the fault is compared to the original image. There are gaps in the lines
surrounding the object in the gradient mask. These linear gaps are disappeared by dilate the sobel image using the vertical
& horizontal value in strel function shown in figure 5: (e). Binary image is obtained by filling holes in binary mask that
contains the fault is shown in figure 5: (f). After this segmented image is obtained by smoothing the binary image with
filling holes shown in figure 6: (g). Invert the segmented image for better detection of fault shown in figure 6: (h). The final
output of edge detection technique is figure 6: (i) which provide better detection of fault with the subjective point of view
because in segmentation most of the comparisons are subjective but in this paper both the detection methods are compare
objectively with structural similarity index (SSIM) parameter. Contour detection and edge detection technique applied on
many images and compare with SSIM index, some of these images are shown below:
This measure shows that the detected defect shape is more close to original defect in the image by edge detection approach
as compared to contour detection method.
VI. CONCLUSION
In this paper various types of defects are detected using edge detection method present in glass sheets. First a best suited
color space is selected for processing based on conversion time and maximum visibility of faults and then gray color space
and adaptive histogram equalization for image enhancement for better detection are used. Now final image generated by
contour detection method and edge detection method are compared with the help of structural similarity index. SSIM index
provide information about defect detected shape is more close to original image or not. The segmentation algorithm using
the edge detection method show better results than contour method to detect the various defects.
REFERENCES
[1] M.A.Coulthard, “Image Processing for Automatic Surface Defect Detection,” Surface Inspection Ltd, UK, pp.192-196.
[2] F. Adamo, F. Attivissimo, A. Di Nisio, M. Savino, “An Automated visual inspection system for the glass industry”, Proc. of 16th IMEKO TC4
Symposium, Florence, Italy, 2008,
[3] Yuanyuan Pu, Xiaomin Wei, Yi Su, Zhengpeng Zhao, Wenhua Qian, Dan Xu, “Implementation and Research of Multi-Method Color Transfer
Algorithms in Different Color Spaces”, International Conference on Machine Vision and Human-machine Interface, IEEE Computer Society,
pp.713-717, 2010.
[4] Nishu Gupta, Sunil Agrawal, “Glass Defect Detection Techniques using Digital Image Processing –A Review”, IJCA Special Issue on IP Multimedia
Communications, pp. 65-67, 2011.
[5] Nishu Gupta, Sunil Agrawal, “ Automated Inspection of Defects in Glass by proper Color space selection and Segmentation Technique of Digital
Image processing”, Int.J.Computer Technology & Applications,vol 3 (3), 1058-1063,2012
[6] Rafael C. Gonzalez, Richard E. Woods, “digital image processing” Third Edition,PHI publications.
[7] Mr. Manoj K.Vairalkar , Prof. S.U.Nimbhorkar, “Edge Detection of Images Using Sobel Operator” International Journal of Emerging Technology
and Advanced Engineering, vol 2, Issue 1, 2012.
[8] Z.Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli,”Image quality assessment: From error visibility to structural similarity,” IEEE Trans. On
Image Processing, Vol. 13, no. 4, pp. 600-612, 2004.