- Open Access
- Total Downloads : 959
- Authors : V. Sridevi, A. Nirmala
- Paper ID : IJERTV2IS3133
- Volume & Issue : Volume 02, Issue 03 (March 2013)
- Published (First Online): 09-03-2013
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Inspection Of Welding Images Using Image Segmentation Techniques
V. Sridevi, Assistant Professor, A. Nirmala
Dept. Of Computer Applications, Research Scholar & Assistant Professor,
Dr. N.G.P Arts and Science College, Dept. Of Computer Applications,
Coimbatore 641 048., Dr. N.G.P Arts and Science College, Coimbatore 641 048.,
Abstract
In this paper, the main task is research about the application of image segmentation in welding inspection. Based on the MATLAB platform, it focuses on the application of image segmentation in ray detection of steeled-structure. During this section, it devotes to find an appropriate image processing technique to apply in welding inspection, which helps for practitioners of the welding industry to improve inspection efficiency of defects recognition. They can smooth their work efficiency and the quality of defects recognition by applying image segmentation techniques during their daily work. It is introduced that image segmentation techniques including threshold, clustering and edge detection. During experiments research, the main task is to answer how image segmentation applied in welding inspection and which one of these shows good performance to be helpful for defects recognition. This paper comes from the actual needs of the industrial work and it proves to be practical at some extent.
Keywords
Image Segmentation, Clustering, Threshold, Edge Detection
-
Introduction
Welding plays an important role in industries as it is used for joining metal parts permanently. A welder joins metal by intense heat produced by a multitude of different welding processes, which produce an extremely strong permanent bond. Because of its strength welding is used to construct and repair ships, aircrafts, automobiles, join steel and reinforcing rods in buildings, bridges and highways, nuclear power plants, pipeline system conveying gases, liquids, earthmoving equipment, refineries, automobile manufacturing and repair. Image processing plays a
very vital role in finding the features of digitized weld images (obtained either from radiographic methods or ultrasonic methods) defined in terms of the defects. The present research work proposes to contribute towards the application of image segmentation and enhancement techniques for identifying defects in the radiographic X-ray images. In this section, we try to propose our proposed solution to solve the difficulty of in ray inspection of welding. We do the practical experiments on the feasible and performance analysis
of proposed solution and find out the appropriate solution on ray welding detection.
The defects can be detected by various techniques. One of the well known Techniques for detection of defect is segmentation. Segmentation is a process in which regions or features sharing similar characteristics are identified and grouped together. Image segmentation is based on thresholding, clustering, edge detection, region detection or combinations of any of these techniques. By reviewing related research literature, It found that segmentation algorithms of thresholding, clustering and edge detection could be applied in welding detection. Therefore, thresholding, clustering and edge detection are chosen to do the further application research.
We collect 3 testing images from every category, especially in pore, crack, incomplete penetration and incomplete fusion, which is as followed:
Figure 1.1 Sampling images of group
I
Figure 1.1 Sampling images of group II
Figure 1.1 Sampling images of group III
-
Applications of image segmentation
Apply thresholding, clustering and edge detection to segment 3 groups of sampling variable images based on image processing toolboxTM in MATLAB. Throughout subjective evaluation, we choose the representative algorithm of these three methods of image segmentation.
2.1 Thresholding
2.2.1. Otsu Method
The Otsus method is used to obtain the threshold value needed for the embedding process. The method is based on the assumption that the image that is to be
thresholded contains two classes of pixels with values corresponding to the foreground and background. It then calculates the optimum threshold value to separate the 2 classes by maximizing the interclass variance.
The algorithm is composed of the following steps: Where
b
b
It is processed iteratively with all possible values of T and with the desired threshold tho, the value that maximizes the interclass variance 2.
Figure 2.1 Otsus method segmentation
2.1.2. Histogram Thresholding
If the histogram of an image includes some peaks, we can separate it into a number of modes. Each mode is expected to correspond to a region, and there exists a threshold at the valley between any two adjacent modes. The midpoint method finds an appropriate threshold value in an iterative fashion.
The algorithm is outlined below:
-
Apply a reasonable initial threshold value.
-
Compute the mean of the pixel values below and above this threshold, respectively.
-
Compute the mean of the two means and use this value as the new threshold value. Continue until the difference between two consecutive threshold values are smaller than a preset minimum.
The Figure 2.2 shows the segmented result using Histogram thresholding and the others will be shown in related appendix files. Histogram thresholding is based on selecting the middle gray value as the threshold value between the two peaks.
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
16 |
Expert 4
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
18 |
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
18 |
Figure 2.2 Histogram thresholding
segmentation
Seen in Figure 2.2, it is found out that there are two classic peaks in gray-scale histogram diagram. Then we could select the middle gray value between them. It is encouraged to test the appropriate middle gray value. Finally, by comparison of [20] values of 45 and 65, it is clear that segmented image with threshold value of 65 is better.
2.1.3 Evaluation
After we have applied Otsu method and histogram thresholding to segment all the sampling welding images, we invite the 5 persons who research on the image quality to evaluate each segmented images according to subjective evaluation framework. We collect the scoring tables given by them after evaluation and calculate related data, which partly shown in the Table 2.1 and the other ata will be detailed in related appendix files.
Table 2.1 Data calculation 1
Expert 1
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
20 |
Expert 2
Expert 3
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
18 |
||
Index |
Good(5) |
General(3) |
Bad(1) |
Finally, we get the evaluation result as followed. Table 2.2 Evaluation Result Of hresholding
Otsus Method |
Histogram Thresholding |
||
No. |
Score |
No. |
Score |
Expert 1 |
14.75 |
Expert 1 |
11.83 |
Expert 2 |
14.42 |
Expert 2 |
11.58 |
Expert 3 |
14.83 |
Expert 3 |
11.83 |
Expert 4 |
15.25 |
Expert 4 |
11.58 |
Average |
14.81 |
Average |
11.70 |
Seen in the Table 2.2, it can be found that the Otsus method is better than histogram thresholding in ray detection of welding because it has higher quality in index during our evaluation. It is true that histogram thesholding has the limitation when the gray-scale histogram meets more two peaks which waste time test appropriate threshold. However, Otsus method is fast and simply to set the appropriate threshold. So combatively speaking, Otsus method is more suitable to be applied in welding detection.
-
Clustering
-
K-Means Clustering
In K-Means algorithm data vectors are grouped into predefined number of clusters. At the beginning the centroids of the predefined clusters are initialized randomly. The dimensions of the centroids are same as the dimension of the data vectors. Each pixel is assigned to the cluster based on the closeness, which is determined by the Euclidian distance measure. After all the pixels are clustered, the mean of each cluster is recalculated. This process is repeated until no significant changes result for each cluster mean or for some fixed number of iterations.
The algorithm is composed of following steps:
-
Place K points into the space represented by the objects that are being clustered. These points represent initial group centroids.
-
Assign each object to the group that has the closest centroid.
-
When all objects have been assigned, recalculate the positions of the K centroids. Repeat Steps 2 and until the centroids no longer move. This reduces a separation of the objects into groups from which the metric to be minimized can be calculated.
In K-means algorithm, we firstly initiate cluster centers and then decide the number of iteration by a lot of tries to get the good quality of segmentation. The Figure 2.3 shows the segmented result using K- means clustering and the others will be shown in related appendix files. In the Figure 2.3, the number of iteration is three, which could get good result.
4
In MATLAB, algorithm of fuzzy C-means clustering is illustrated in the Figure 2.4. Each pixel point is clustered by initial cluster centers and then cluster centers are updated by loops. Seen in the following figure, variable of ttFCM is used to control the loop process.
START
Input initial image and initial cluster centers
Update cluster centers
Input initial image and initial cluster centers
Update cluster centers
ttFCM=0
ttFCM=0
pixels are clustered based on maximum membership degree
pixels are clustered based on maximum membership degree
Figure 2.3 K-means clustering
segmentation
-
-
Fuzzy C-Means Clustering
Fuzzy C-means clustering (FCM) is a method of
ttFCM Y
clustering which allows one piece of data to belong to two or more clusters. That is it allows the pixels belong to multiple classes with varying degrees of membership. It is based on minimization of the following obje ctive function
Figure 2<.145 Flowchart of Fuzzy N ans
C-me
C-me
Display output of clustering
Display output of clustering
N
|J(t)- J(t-1<
Y
:
Where, m is any real number greater than 1.uij is the degree of membership of xi in the cluster j.
xi is the ith of d-dimensional measured data.
Cj is the d-dimension center of the cluster.
The algorithm is composed of the following steps:
-
Initialize U=[ uij] matrix, U(0)
-
At k-step: calculate the centers vectors c(k)=[ Cj] with U(k)
-
UpdateU(k),Uk+1
END
The Figure 2.5 shows the segmented result using Fuzzy C-means clustering and the others will be shown in related appendix files.
Figure 2.5 Fuzzy C-means clustering segmentation
The traditional FCM clustering can shows good quality of image segmentation. But it is hard to present the segmentation results in terms of gray scale. Therefore, here is to propose an improved algorithm Gray-scale based FCM clustering to present pixels segmentation. On the basis of the traditional FCM clustering, the use of the neighborhood pixel gray similarity to construct a new membership function, image clustering segmentation. This method not only effectively suppresses noise interference, and the wrong classification of pixels is easily rectified.
Neighborhood pixel gray similarity is calculated by following formula.
It is to generate new clustering center based on neighborhood pixel gray similarity. The Figure 2.6 shows the segmented result using Gray-scale based Fuzzy C-means clustering, which is useful to recognize the welding defects and the others will be shown in related appendix files.
Figure 2.6 Gray-scale based Fuzzy C-means clustering segmentation
-
-
Interpretation of Image Information Data
After we have applied K-means and Gray- scale based Fuzzy C-means clustering to segment all the sampling welding images, we also invite the same 5 persons to evaluate each segmented images according to subjective evaluation framework. We collect the scoring tables given by them after evaluation and calculate related data, which partly shown in the Table
-
-
and the other data will be detailed in related appendix files.
Table 2.3 Data calculation 1
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
xpert 1
Amount Score 20
Expert 2
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
18 |
Expert 3
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
16 |
Expert 4
Index |
Good(5) |
General(3) |
Bad(1) |
Clarity |
|||
Contrast |
|||
Contour |
|||
Convenience |
|||
Amount Score |
18 |
Finally, we get the evaluation result as followed. Table 2.4 Evaluation Result Of Clustering
Gray Scale based Fuzzy C-Means |
K-Means |
||
No. |
Score |
No. |
Score |
Expert 1 |
14.00 |
Expert 1 |
10.58 |
Expert 2 |
15.17 |
Expert 2 |
9.15 |
Expert 3 |
14.00 |
Expert 3 |
10.83 |
Expert 4 |
15.25 |
Expert 4 |
9.38 |
Average |
14.61 |
Average |
9.98 |
Seen in the Table 2.4, it can be found that the Gray-scale based Fuzzy C-means is better than K- means. It is true that K-means clustering has the limitation in initially clustering for image of welding detection very well. So combatively speaking, Gray- scale based Fuzzy C-means clustering is very suitable to be applied in welding detection.
2.3 Edge detection
Edge detection is a very important area in the field of Computer Vision. Edges define the boundaries between regions in an image, which helps with segmentation and object recognition.
The four steps of edge detection
-
Smoothing: suppress as much noise as possible, without destroying the true edges.
-
Enhancement: apply a lter to enhance the quality of the edges in the image.
-
Detection: determine which edge pixels should bediscarded as noise and which should be retained
-
Localization: determine the exact location of an edge.
The Roberts edge detector
This approximation can be implemented by the following masks:
(Note: Mx and My are approximations at (i + 1/2, j + 1/2))
The Prewitt edge detector
Consider the arrangement of pixels about the pixel (i, j):
The partial derivatives can be computed by: Mx= (a2+ca3+a4)(a0+ca7+a6) (3-7)
My= (a6+ca5+a4)(a0+ca1+a2) (3-8)
The constant c implies the emphasis given to pixels closer to the center of the mask. Setting c = 1, we get the Prewitt operator:
(Note: Mx and My are approximations at (i, j)) The Sobel edge detector
Setting c = 2, we get the Sobel operator:
It was first created by John Canny for his Masters thesis at MIT in 1983. Canny has shown that the first derivative of the Gaussian closely approximates the operator that optimizes the product of signal to noise ratio and localization. The Canny edge detector is widely considered to be the standard edge detection algorithm in the industry.
The algorithm is composed of the following steps:
-
Compute fx and fy
G(x, y) is the Gaussian function
Gx(x, y) is the derivate of G(x, y) with respect to x:
Gy(x, y) is the derivate of G(x, y) with respect to y:
-
Compute the gradient magnitude
-
Apply non-maxima suppression. For each pixel (x, y) do:
If magn (i, j) < magn (i1, j1) or magn (i, j) < magn (i2, j2)
Else IN(i, j) = magn (i, j)
-
Apply hysteresis thresholding/edge linking.
Produce two thresholded images I1(i, j) and I2(i, j).[16] Link the edges in I2(i, j) into contours.
For the gradient magnitude methods, thresh is used to threshold the calculated gradient magnitude. The Canny method applies two thresholds to the gradient: a high threshold for low edge sensitivity and a low threshold for high edge sensitivity. Edge starts with the low sensitivity result and then grows it to include connected edge pixels from the high sensitivity result. This helps fill in gaps in the detected edges.
The Figure 2.7 shows the segmented result using edge detection and the others will be shown in related appendix files. By comparisons with segmented results, we can see image detected by canny operator has complete and meticulous edge, which is illustrated in Figure 2.7. Based on qualitative evaluation, canny operator is better at detecting the edges than other three.
(Note: Mx and My are approximations at (i, j)) The Canny edge detector
Figure 2.7 Segmentation by edge detection
-
Solution of image segmentation in welding detection Based tries of different segmentation methods,
we propose the following application solution:
-
Use one of Otsuand Gray-scale based Fuzzy C- means clustering method to segment image firstly, which shows fast segmentation speed and good segmentation result.
-
Use Canny operator to detect the edges based on the image of first step, which could help to compensate contours with good performance.
3.1 Evaluation on Otsu method and Fuzzy C-means clustering
Sum mar y
The MSE and MAE of Gray-scale based FCM is all smaller than Otsu.
Group II
Otsus Method
Gray Scale based Fuzzy C-Means
No.
MS
S
PS
M
N
MS
S
PS
M
A
857
42
8.
66.
A
402
46
12
36
B
164
44
5.
11
B
750
47
9.
65
C
544
46
10
54.
C
207
55
14
24
D
105
47
7.
77.
D
403
51
12
44
Sum mar y
The MSE and MAE of Gray-scale based FCM is all smaller than Otsu.
The SNR and PSNR of Gray-scale based FCM is all larger than Otsu.
Group II
Otsus Method
Gray Scale based Fuzzy C-Means
No.
MS
S
PS
M
N
MS
S
PS
M
A
857
42
8.
66.
A
402
46
12
36
B
164
44
5.
11
B
750
47
9.
65
C
544
46
10
54.
C
207
55
14
24
D
105
47
7.
77.
D
403
51
12
44
Sum mar y
The MSE and MAE of Gray-scale based FCM is all smaller than Otsu.
The SNR and PSNR of Gray-scale based FCM is all larger than Otsu.
The SNR and PSNR of Gray-scale based FCM is all larger than Otsu.
We observe the objective index including Mean Squared Error (MSE), Signal to Noise Ratio (SNR), Peak Signal to Noise Ratio (PSNR) and Mean absolute error (MAE) of the images using Otsu method and Fuzzy C-means clustering.
Interpretation rules:
-
MSE and MAE: the smaller, the better.
-
SNR and PSNR: the larger, the better.
We collect all the index data from the MATLAB, shown in the Table 3.1. Seen in the Table 3.1, according to above evaluation criteria, it is found that Fuzzy C-means clustering gives better performance than Otsus method. We apply Gray scale based Fuzzy C-means clustering to image segmentation in welding detection.
Group I
Otsus Method
Gray Scale based Fuzzy C-Means
No.
MS
S
PS
M
N
MS
S
PS
M
A
771
44
9.
64.
A
394
49
13
34
B
867
50
8.
89.
B
181
56
15
32
C
110
49
7.
93.
C
357
54
12
42
D
182
44
5.
10
D
829
48
9.
65
Group III
Otsus Method
Gray Scale based Fuzzy C-Means Clustering
No.
MS
S
PS
M
N
MS
S
PS
M
A
648
51
10
73
A
122
58
17
26
B
594
43
10
74
B
139
49
16
32
C
945
49
8.
92
C
447
52
11
58
D
638
48
10
76
D
979
56
18
24
Sum mar y
The MSE and MAE of Gray-scale based FCM is all smaller than Otsu.
The SNR and PSNR of Gray-scale based FCM is all larger than Otsu.
Group III
Otsus Method
Gray Scale based Fuzzy C-Means Clustering
No.
MS
S
PS
M
N
MS
S
PS
M
A
648
51
10
73
A
122
58
17
26
B
594
43
10
74
B
139
49
16
32
C
945
49
8.
92
C
447
52
11
58
D
638
48
10
76
D
979
56
18
24
Sum mar y
The MSE and MAE of Gray-scale based FCM is all smaller than Otsu.
The SNR and PSNR of Gray-scale based FCM is all larger than Otsu.
Table 3.1 Evaluation on Otsu method and Gray-scale based Fuzzy C-Means clustering
Figure 3.1 Application solution of image segmentation
-
-
CONCLUSION
-
We design experimental studies to research on the application of image segmentation in photoreceptor ray film of the ray inspection of welding. We take sampling as the method of data collection and then do data analysis by MATLAB. Data analysis contains subjective evaluation on application of image segmentation. Based tries of different segmentation methods, we propose the following application solution. Gray-scale based FCM clustering of image segmentation performs well, which can exposure pixels in terms of gray value level so as that it can show hierarchical position of related defects by gray value. Canny detection speeds also fast and performs well, that gives enough detail information around edges and defects with smooth lines.
REFERENCES
-
Arifin A.Z. & Asano A. 2006, Image segmentation by histogram thresholding using hierarchical cluster analysis, Pattern Recognition Letters, vol.27, no.13, pp.15151521.
-
Bardera A., Boada I., Feixas M. & Sbert, M. 2009, Image Segmentation Using Excess Entropy, Journal of Signal Processing Systems, vol.54, no.1, pp.205214.
-
B Sathya & R Manavalan. 2011, Image Segmentation by Clustering Methods: Performance Analysis, International Journal of Computer Applications, vol.29, no.11, pp.2732.
-
Bradley P.S. & Fayyad U.M. 1998, Refining initial points for K-means clustering, Machine Learning (ICML98), pp.9199.
-
Brad R. & Popovici Z.O. 2010, Infrared satellite image segmentation, IEEE International Conference, pp. 100104.
-
Alaknanda, Anand, R.S. & Kumar, P. 2006, Flaw detection in radiographic weld images using morphological approach, NDT and E International, vol.39, no.1, pp.2933.
-
Amir A.A., Zaccone M.A. 1996, Inspectability of fillet welds on diverter panels on an advanced missile fuel tank, NDT and E International, vol.29, no.3, pp.185185.
-
Arifin A.Z. & Asano A. 2006, Image segmentation by histogram thresholding using hierarchical cluster analysis, Pattern Recognition Letters, vol.27, no.13, pp.15151521.
-
C.Sasi varnan, A.Jagan,Jaspreet Kaur, Divya Jyoti & Dr.D.S.Rao. 2011, Image Quality Assessment Techniques in Spatial Domain, International Journal of Computer Science and Technology, vol.2, no.3, pp.177184.
-
Chen J.J., Ng T.M., Lakshmiarayanan A. & Garg
H.K. 2009, Adaptive Visible Watermarking Using Otsu's Thresholding, International Conference on Computational Intelligence and Software Engineering, pp. 14.
-
Dr. G. Padmavathi, Dr. P. Subashini, Mr. M. Muthu Kumar & Suresh Kumar Thakur. 2009, Performance analysis of Non Linear Filtering Algorithms for underwater images, International Journal of Computer Science and Information Security, vol.6, no.2, pp.232238.
-
Fu K.S. & Mui J.K. 1981, A survey on image segmentation, Pattern Recognition, vol.13, no.1, pp.316.