ISSN: 2229-371X
Wafaa Al-Hameed1*,Prof. Yahya Mayali2 and Prof. Phil Picton3
|
Corresponding Author: Wafaa Al-Hameed, E-mail: wafaa2013saeed@yahoo.com, yahya.almayali@uokufa.edu.iq Phil.Picton@northampton.ac.uk |
Related article at Pubmed, Scholar Google |
Visit for more related articles at Journal of Global Research in Computer Sciences
The first stage in the classification or identification of defects in gray-level x-ray images of welds is the segmentation of the defects. The gray levels in weld images depend on the density and thickness of the material being tested. This causes the relative contrast of the defect area to vary with its position. As a consequence, it is difficult to carry out the process of segmentation. As a result, the subsequent stages of operations such as classification or recognition are affected. In this paper, different segmentation methods are introduced which are known as “data-driven”. In this approach, only the gray-level data is used to identify an area of interest, i.e. an area of the image that contains a defect, and hence extract it. The comparison of results show that using the morphology process with local thresholding yields better results than using edge detection method such as Sobel and Canny filters.
INTRODUCTION |
The quality management of manufactured products is one of the main aims in the production process. To make the process more objective rather than relying on the subjective opinion of people, automatic inspection and analysis techniques must be used. Although some faults in the production process may beaccepted, some applications have stringent safety tolerances.Previous work has been reported in the detection and classification of welding defects using x-ray imaging. In some cases, the aim is to improve the quality of radiography images using image processing techniques, so that the human operator can easily detect and recognize them [1-3]. The authors presented a sequence of digital image processing operations to enhance the poor quality of radiography images. Because of low contrast, the fuzzy edges and background fluctuations, an optimal threshold method isused for image segmentation to examine the quality of x-ray welding images to ascertain the existence of air bubble [4]. |
Pattern recognition techniques have also been used on the problem of identifying defects types. In [5] deal with the problem of where there is a low number of samples for building an efficient classification system by creating a large number of simulated images of weld defects. [6] proposed a method to improve the prediction performance by combining Support Vector Machine (SVM) based feature selection with a Receiver Operation Characteristic (ROC) feature selection process to improvefeature selection results. Many features are extracted and optimized based on the shape properties of defects,and in order to test these optimized features they used an Artificial Neural Network (ANN) to provide a way for comparing and discussing the performance system that used these features[7]. |
The ability of human to detect the defects may be effected by the lighting, or due to a low level expertise which can give different interpretations of the same defect. Error! Reference source not found.. shows some defects that exist in the weld images |
TABLE I. Typical weld defects found in x-ray images |
METHODOLOGY |
Radiographic images of welds are often dark, noisy and low contrast [8]. This makes image segmentation difficult because the variation in the gray levels in these images may be falsely attributed to a defect. The irrelevant region must be eliminated leaving only the regions of potential flaws which are subsequently classified. There has been significant research in this area, but it is mostly specific to the type of material being analyzed. The disadvantage of these methods is that there are different sequences of filters used for each type of welding image [1]. Data-driven methods, which can be used for image segmentation of radiography weld images, only use the raw image data to detect objects and hence they are independent of the type of image. |
Edge-based segmentation [9], mostly based gradient methods, extract the variation in the horizontal and vertical directions using the convolution of two kernels [10]. These two kernels give gradient values in the vertical and horizontal directions. The edge gradient is calculated as in equation (2). The maximum gradient value is considered to fall on the edge. A Sobel filter is applied to the x-ray weld images to extract the area where a defect may potentially exist. The horizontal and vertical masks of the Sobel operator are illustrated in Table 2a and 2b respectively. Fig.1 shows the effect of applying the Sobel operator on X-ray images of welds. |
Canny filters [13] also is applied to the x-ray weld images to extract edge correspond tosuspect area which is including three stages of, edge detection, hysteresis and edge thinning. Global and local thresholding methods are used to find discriminate between defects and background. In this case a threshold value that represents the valley between peaks is selected to classify pixels. |
To accurate describe the shape of defect, sequence of image morphology processing is flowed thresholding method to eliminate a small holes and gaps in the contour and give good description of defects. |
IMAGE SEGMENTATION TECHNIQUE (DEFECT DETECTION) |
At this stage the irrelevant region must be eliminated leaving only the potential flaw regions which are subsequently classified. There has been significant research in this area, but it is specific to the type of material being analyzed. The disadvantage in these methods is that there are different sequences of filters used for each type of welding image [1]. |
The purpose of this step is to present different data-driven methods, which is divided into two types, discontinuity detection methods (Edge-Based Methods) and similarity detection methods. The former based on finding abrupt changes in gray level while the later based on threshold and region growing. Edge-based segmentation is the classification of pixels that corresponds to the border of the object in an image [9]. Before discussing the type of the edge method used, edges must be defined as abrupt change in the intensities along certain directions in image most are gradient methods, which extract the variation in the horizontal and vertical direction using the convolution of two kernels [10]. These two kernels give gradient values in the vertical and horizontal directions, and the edge gradient is calculated as: |
The magnitude of the gradient values is given by. |
The maximum gradient value in the image falls on the edge. This is the method implemented in the spatial domain. |
Sobel Filter |
This filter is needed to extract the area where a defect may potentially exist. The horizontal and vertical masks of the Sobel operator are illustrated inError! Reference source not found.2. Error! Reference source not found.1 shows the effect of applying the Sobel operator on X-ray images of welds |
TABLE 2. (a) horizontal mask of Sobel filter operator (b) Vertical mask of Sobel filter operator |
Figure 1.Filtered x-ray weld images using Sobel filter (a) Internal concavity. (b) Transverse crack. (c) Longitudinal crack.(d) Slag inclusions. |
Canny Filter |
This filter is considered to be the optimal for detecting the edge in an image, as it takes the gray level input image and produces an output image that represents the locations of path intensity discontinuities [11]. Canny operators include multistage processing, edge detection, hysteresis and edge thinning. In the first stage a Gaussian filter is used for smoothing, then the gradient is used for detecting edges in two orthogonal (vertical and horizontal axes). The edge magnitude is calculated by taking the square root of the sum of the squares of these two derivatives values. Edge direction is also computed using the arctangent of the ratio of these derivatives. The aim of hysteresis stage is to ensure that the noisy edges are not broken up into multi fragment. Two thresholds are used here – a high threshold is set too high and low threshold is set too low to grant good results. While in the edge thinning stage, non-maximum suppression is performed on the gradient magnitude to discover all the pixels that have their locations in the direction of steepest gradient. Each pixel is set to 1 (ON) if it has a magnitude larger than its neighbors located in the direction closest to that gradient, and from neighbors located in opposite direction. |
Since the Canny edge detector uses multi-stage, it is better than an individual operator in particular directions. The result of using Canny operator is clear and shown in Fig.2. The continuity of the edge pixels belong to the weld because of the hysteresis and edge thinning stages of the canny filter. |
Similarity detection method |
For comparison, another method based on edge segmentation technique is adopted. Thresholding is one of the simplest methods used in image segmentation. In this case a threshold value that represents the valley between peaks is selected. Then, each pixel in the image is tested. After that, the pixel is set to maximum value if it is higher than threshold. Otherwise, the pixel is set to minimum value as shown in Figure.3. |
Figure3. Bimodal histogram of image show the valley between two peaks |
In order to compute the threshold value, we look for peak and valley. Let I1 and I2 be the two highest peaks with I1 <I2,the threshold I is the steepest valley between I1 and I2. I is the valley if f(I) < f(I') I , I' [I1,I2], then use I as the threshold. Fig.4. illustrates the result of global thresholding. |
Figure4. (a) original x-ray image of internal concavity(b) filtered image using global thresholding |
The choice of global thresholding is accepted if the effect of illumination and noise are ignored, with distinct peaks in the gray level distribution correspond to objects and background, but this hardly occurs, especially with welding images as there is an overlap between the objects (defects) and the background that yields edge fuzziness, as is shown in Fig.4. For this reason, the choice of applying global thresholding is not useful. |
In case of unequal illumination, a local threshold is calculated instead of using a single threshold value for the whole image. Local thresholding dealing with each region independently is used. It works by dividing the image into multi-regions, each region is thresholded by a threshold value dependent on regional properties e.g. a threshold value based on the weighted sum of the region’s gray level values. The results are shown in Fig. 5. |
Figure5. (a) original x-ray image of ) Internal concavity(b) filtered image using local thresholding |
From the result, we note that the local statistic average property of the region is not useful alone to the whole image. In the area surrounding the defect the process is success and the defects is isolated properly, sincetheaveragevalue is between the defect and background values, while in the margins of the weld the gray level of neighboring pixels are close each to other so that the average value is the value of the middle pixel. |
To reduce the side effect of bad luminance the results can be improved when a constant value is used , subtractit from local region average value .this is yield that the pixels in the margins of the weld with close values identified as background. The results are shown in the middle column of Fig.6. The best constant value chosen is 4. With local region size (25×25). |
For an accurate description of the shape of the defect and eliminating small holes and gaps in the contour [12], the image morphology process of closing, dilation, and closing respectively are applied to the results from previous step. The result of applying morphology processing is illustrated in the third column in Fig. 5. Our experiments are applied on the four of radiographs weld images [13] [14], image is divided into number of small size image to reduce the computation time, |
Figure6. (first column) original image (second column) image segmentation using combined global and local Thresholding (third column) morphology operation applied to segmented images. |
CONCLUSIONS |
Since X-ray images of welds have relatively low contrast, defects tend to show as dark regions, and thus the defects are not easily distinguishable. In this paper defects are supposed to have higher gray levels than the image background. From our results there are drawbacks of using gradient based edge detection methods. The performance of thresholding operations to detect areas of interest alone is not sufficient unless morphology processing operation is used. The latter tend to provide a good description of the defect characteristic |
References |
|