Automatic weld defect detection based on potential defect tracking in real-time radiographic image sequence

Automatic weld defect detection based on potential defect tracking in real-time radiographic image sequence

NDT&E International 46 (2012) 14–21 Contents lists available at SciVerse ScienceDirect NDT&E International journal homepage: www.elsevier.com/locate...

861KB Sizes 5 Downloads 126 Views

NDT&E International 46 (2012) 14–21

Contents lists available at SciVerse ScienceDirect

NDT&E International journal homepage: www.elsevier.com/locate/ndteint

Automatic weld defect detection based on potential defect tracking in real-time radiographic image sequence Jiaxin Shao a,b, Dong Du a,b,n, Baohua Chang a,b, Han Shi a,b a b

Department of Mechanical Engineering, Tsinghua University, Beijing 100084, PR China Key Laboratory for Advance Materials Processing Technology, Ministry of Education, PR China

a r t i c l e i n f o

a b s t r a c t

Article history: Received 18 April 2011 Received in revised form 18 October 2011 Accepted 24 October 2011 Available online 6 November 2011

An effective and adaptive method is proposed to automatically detect weld defects using defect tracking in real-time radiographic image sequence of a moving weld. Firstly, a defect segmentation algorithm with low threshold is used to segment all of the potential weld defects in each image of the sequence. Then the modified Hough transform is employed to track the center of gravity of potential defects in image sequence, and the potential defects that cannot be tracked are eliminated as false defects. Experiment results show that the proposed method can detect weld defects with high certainty and avoid false alarms caused by the noise. & 2011 Elsevier Ltd. All rights reserved.

Keywords: Non-destructive testing Radiographic image sequence Weld defect Automatic detection Hough transform

1. Introduction Radiographic testing is one of the commonly used Nondestructive testing (NDT) methods for detecting weld defects [1]. The technique of radiographic testing with film is expensive and time-consuming. Therefore real-time radiographic imaging technique has been developed and applied. For example, it is often applied in real-time detection of long weld structures, such as weld pipe manufacturing in factory. The traditional interpretation of radiographs by artificial method is subjective, inconsistent, and easy to cause fatigue. In order to improve the automation level and avoid drawbacks of manual interpretation, the methods of automatic weld defects inspection from radiographic images have been extensively studied. Researchers all over the world have studied and proposed many useful image processing methods for weld defects segmentation and recognition in radiographic image, such as background subtraction [2–4], gray-level profile analysis [5,6], mathematical morphology [7], watershed algorithm [8], fuzzy reasoning [9] and texture feature analysis [10]. However, these methods mainly focus on the digitized film image and utilize only the information in single image for weld defect detection. The main differences between defect detection with real-time radiography (on line

n Corresponding author at: Department of Mechanical Engineering, Tsinghua University, Room 113, Beijing 100084, China. Tel./fax: þ 86 10 62773862. E-mail address: [email protected] (D. Du).

0963-8695/$ - see front matter & 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.ndteint.2011.10.008

detection) and defect detection with film (off line detection) are as follows: (1) in on line defect detection studied in our work the defect is detected in real-time when the weld is moving, while in off line defect detection, the defect is detected off line; Therefore on line defect detection requires a computationally fast and effective method; (2) the signal-to-noise ratio of real-time radiography is much lower than that of digitized film, which is a very challenging problem in automatic defects inspection with realtime radiography. The main task in on line automatic defect detection is now focused on segmentation and location of detects in weld [11], while the main task in off line defect detection is now focused on classification of different types of weld defects [12]. In real-time radiographic image sequence of a moving weld, it is not easy to distinguish the low contrast defect and the false defect caused by noise even by human inspection if using only one image. Consequently, the methods to detect defects using only one image each time cannot solve the conflict between detecting weld defects and avoiding false alarms in real-time automatic defect detection. Currently, there are a few studies on defect automatic detection by utilizing the reappearance of defects in sequence of radiographic images to improve detection result. For instance, Mery and Filbert et al. [13] proposed an automated flaw detection method in aluminum castings based on the tracking of potential defects in a radioscopic image sequence, and Zhou and Du [14] presented an automated defect detection technique based on multiple radiographic images to detect the defect of blade of aviation engine. In both methods a sequence of radiographic

J. Shao et al. / NDT&E International 46 (2012) 14–21

images are captured from different known positions of the work piece, and then the potential defect is matched and tracked from image to image by some constraints such as epipolar constraint. Nevertheless, the two methods have the requirements that the imaging system needs to be calibrated and the position of the object must be known, and therefore they are not applicable to real-time radiographic image sequence of weld whose moving speed is unknown. Du et al. [15] proposed a method of registration of image sequence based on detection of weld direction and phase correlation algorithm before defect detection, which gives a foundation of utilizing information among images of a sequence. However, the registration of image sequence is usually time consuming. Automatic detection of weld defect in real-time radiographic image usually consists of two steps: (1) weld extraction and (2) defect segmentation. We present a novel idea as the third step for weld defect automatic detection. The idea is to distinguish real defects from false defects caused by noise by tracking the relative centers of mass of potential defects in sequence of images. The rationale is that the real defect will appear with regular track in sequence of images, while the false defects resulting from noise will appear randomly. The method of weld extraction has been proposed in our another paper [16], approach of segmentation of potential defect will be proposed briefly in Section 2, and the idea and algorithm of potential defect tracking will be presented in detail in Section 3. In Section 4, the real-time X-ray imaging system for experiments and corresponding experiments will be described to prove the effectiveness of proposed method, and finally conclusions are given.

2. Segmentation of potential defect 2.1. Noise reduction The object of noise reduction is to filter the interference and make the target features more prominent. The noise in radiographic weld images is usually Gauss noise and salt and pepper noise. In this work, a 3  3 median filter template and a 5  5 average filter template are used to filter the image. 2.2. Background subtraction and gray-level profile analysis Background subtraction is one of the usual methods in weld defects segmentation in radiographic images [2–4]. The main steps of background subtraction algorithm used in this work are as follows. (1) Estimate the background image by using the 11  11 average filter template to the image. (2) Subtract the background image from the original one to obtain residual image. (3) Obtain the binary image by applying an appropriate threshold to the residual image. The gray-level profile analysis is also applied to segment the weld defect in this work. The gray-level profile across the weld is analyzed column by column in this method, and the defect region is segmented column by column. Denote the gray-level profile of current column to be processed by fj(i), the main steps of graylevel profile analysis are as follows. 0

(1) Calculate the first-order derivative f j ðiÞ and second-order 00 derivative f j ðiÞ of fj(i). (2) Search all the points i0 in weld region which satisfy the 0 0 conditions f j ði0 1Þ 4 0 and f j ði0 þ 1Þ o 0, and then search the first two points i1 and i2 separately from i0 to each side of i0

15 00

00

0

which satisfy f j ði1 1Þ 4 0 and f j ði2 þ1Þ 40. If both f j ði1 Þ and 0 f j ði2 Þ are greater than a pre-defined first-order difference threshold, then the interval [i1,i2] is considered as the defect region in the current column, and denoted by one in binary image. After all the columns are analyzed through the above steps, the binary image of defect segmentation is obtained by gray-level profile analysis. The background subtraction algorithm used in this work can detect defect effectively and obtain accurate defect shape, but may result in many false alarms around weld edges because of inaccurate estimation of background. As to the gray-level analysis, it is sensitive to noise instead of weld edges, and the shape of the segmented defect is not accurate. Consequently, integration of the two methods will improve the defect segmentation result and avoid a large proportion of false alarms around weld edges. In this work, low thresholds are used in both methods to ensure that all the real weld defects are segmented in each image of the sequence, and then the intersection set of binary images obtained by two methods is considered as the segmentation result of potential weld defects. 2.3. Potential defect labeling and parameters calculating After the binary image of potential weld defects is obtained by the approach proposed above, the 2  2 template close and open morphology filters are applied to the binary image successively, and then the potential defects can be labeled with different labels by connected-component labeling algorithm. Denote the image size to be processed by Height  Width, and the detected weld upper and lower edges by mUpEdge(j) and mDownEdge(j)(j ¼ 1,2,y,Width) separately. Then mWeldMid(j)¼(mUpEdge(j)þ mDownEdge(j))/2(j¼1,2,y,Width) is the center of the weld. Suppose that the residual image obtained by background subtraction described in Section 2.2 is mSub(i,j), and denote the pixel number of a segmented defect as the defect area by mArea. Use Eqs. (1)–(3) to calculate the relative coordinates (Xq,Yq) of the center of gravity of the potential defect   SumððjmWeldMidðjÞÞnmSubði,jÞÞ Y q ¼ round SumðmSubði,jÞÞ ðfor all Pixelði,jÞ labeled qÞ ð1Þ If the weld is moving towards right, then calculate Xq by   SumðinmSubði,jÞÞ ðfor all Pixel ði,jÞ labeled qÞ X q ¼ round SumðmSubði,jÞÞ If the weld is moving towards left, then calculate Xq by   SumðinmSubði,jÞÞ X q ¼ Width þ 1round SumðmSubði,jÞÞ ðfor all Pixel ði,jÞ labeled qÞ

ð2Þ

ð3Þ

By applying a small defect area threshold, the small false alarms caused by noise are eliminated.

3. Potential defects tracking in image sequence 3.1. Idea of potential defect tracking in image sequence A sequence of images is shown in Fig. 1a. The images are parts of the real-time X-ray images which are obtained in equal time intervals when the weld with a defect is moving in close to a constant speed. The potential defects segmentation results of the images are shown in Fig. 1b, where the white districts represent the segmented potential defects. It can be observed that the real defect appears regularly and the track forms a line, while the

16

J. Shao et al. / NDT&E International 46 (2012) 14–21

Real defect

Real defect

Fig. 1. Example of a sequence of real-time X-ray images and its potential defects segmentation results: (a) a sequence of real-time X-ray images and (b) potential defects segmentation results.

segmented false defects caused by noise appear randomly. Therefore, it is feasible to distinguish real defects from false defects resulting from noise by tracking the relative centers of mass of potential defects in sequence of images using line detection algorithm. After tracking, all the potential defects that can be tracked are recognized as real defects, and the left are eliminated as false defects. The basic flow chart of applying the idea of potential defect tracking in real-time automatic defect detection system is shown in Fig. 2. 3.2. Traditional Hough transform Traditional Hough transform is a transform between image space and parameter space, and is suitable to detect a particular shape within an image. It is widely used in the detection of straight lines. Generally, a straight line is represented by slope and intercept of y-axis as follows: b ¼ ykx

ð4Þ

where k is the slope of the straight line, and b is the intercept of the straight line with y-axis. In the (k,b) parameter space, a single point (k,b) corresponds to a unique straight line. In practical implementation of line detection by Hough transform, the expected ranges of line parameter k and b are set and quantized into several discrete values ki and bj. Each discrete cell (ki,bj) in parameter space has its relevant accumulator value St(i,j). For every point (x,y) in the image

plane, and each discrete value ki, calculate b by Eq. (4) and find its nearest discrete values bj. Then accumulate its relevant accumulator value St(i,j) by one each time. Finally, the parameters of straight lines are detected by searching the position of maximum values in accumulator array St(i,j). 3.3. Modified Hough transform for potential defect tracking Denote the number of radiographic images of a sequence for defect tracking each time by 2M þ1, and all the potential defects segmented in these images by Psq ¼(ts,Xsq,Ysq) (tsA[ M,M]). Parameter (ts,Xsq,Ysq) represents the defect segmented in image ts þMþ1(referred to as image t¼ts hereafter for convenience) of the sequence, and the relative coordinate of the center of gravity of the qth potential defect in the image is (Xsq,Ysq). Suppose that the x-coordinates of centers of gravity of the same weld defect that appears in 2Mþ1 images of the sequence are X(t) (t ¼  M,  Mþ1,y,M). As the weld direction in the images to be processed is close to the horizontal direction, and the weld is moving in close to a constant speed, the motion of the real defect in horizontal projection will be close to a uniform motion. A straight line equation can be used to fit the parameters (t,X(t)) (t ¼  M,  Mþ1,y,M) of the real defect with low deviations. Denote the slope of the fitted straight line by V(pixel/frame), which represents the average horizontal speed of the defect. Denote the intercept of the straight line by b(pixel), which represents the

J. Shao et al. / NDT&E International 46 (2012) 14–21

17

of the same defect in each image should be close to each other. In order to reduce the probability of error tracking of false defects, all the potential defects can be divided into different groups according to their relative y-coordinate of centers of gravity, and the proposed modified Hough Transform is applied in each group to track defects. Suppose that the maximal deviation of Y of the same real defect is Dy, and denote the maximal and minimal Y values of all potential defects by Y max and Y min , respectively. Track the potential defects by the following steps. (1) Initialization of Hough Transform parameters: Set the expected ranges of slope V and intercept b, denote their discrete steps by dV and db, and the discrete values by Vi(i ¼1,2,y,Nv) and bj(j ¼1,2,y,Nb), respectively. To ensure the dynamic sensitivity of the real-time radiographic images, the maximal moving speed of weld is restricted for weld defect inspection. The range of average speed V can be set by this restriction. Denote the image resolution by Re (pixel/mm), the allowed maximal moving speed of weld by Vrealm (m/min), the frame rate of image acquisition by frate (frame/s), and the maximal moving speed of weld in image by Vm (pixel/frame). Then 1000mm 60 s 1000Re  Pixel V realm  Re  1000 ¼ pixel=frame ¼ V realm 60f rate  frame f rate  60 ð7Þ

V m ðpixel=frameÞ ¼ V realm m=min ¼ V realm

Therefore Vm ¼

Fig. 2. Basic flow chart of applying the idea of potential defect tracking in realtime automatic defect detection system.

relative x-coordinate of center of gravity of the defect in image t ¼0 of the sequence. Suppose the maximal deviation of the fitted straight line from the original data is Em, then 9XðtÞðV nt þ bÞ9 rEm

ð5Þ

Eq. (5) shows that the real defect can be tracked by finding a straight line with 2Em thickness to fit parameters (t,X(t)) of the defect. Let y¼X, and x ¼V in Eq. (4), and the straight line equation for Hough transform in this paper is obtained as follows: b ¼ XV nt

ð6Þ

The modified Hough transform is proposed to track potential weld defects, and it has two main differences shown as follows from traditional Hough transform: (1) Parameter points (ts,Xsq) of potential defects are used in the modified Hough transform instead of points in the image plane. (2) If a choice of discrete value Vi results in solution bj by equation b¼Xsq Vnts, set St(i,jl)¼St(i,jl)þ1(8jl that satisfy bj  Em rbjl rbj þEm ) instead of setting St(i,j)¼St(i,j)þ1.

3.4. Steps of potential defect tracking As the relative positions of weld defects in weld district are invariant, the calculated relative y-coordinate of center of gravity

V realm  Re  1000 f rate  60

ð8Þ

As weld defects are part of the weld, their moving speed in horizontal direction is not greater than Vm. The expected range of average speed V can be set as [0,Vm]. In order to improve detection efficiency, the minimum moving speed of weld can also be set. (2) Determine the number of groups of potential defects: Set the number of defect groups for Hough transforms by Eq. (9). If the value Y of a potential defect is in range ½Y min þ ðk1ÞDy , Y min þ ðk þ1ÞDy Þ (k¼1,2,y,Ny), then the defect belongs to group k. Almost every potential defect will belong to two groups. Denote the corresponding accumulator array of Hough transform as St(i,j,k) for group k Ny ¼ Maxf1,FixððY max Y min Þ=Dy Þg

ð9Þ

where function Fix(K) aims to round value K to the nearest integer towards zero. (3) Calculation of accumulator arrays St(i,j,k): For every potential defect Psq(ts,Xsq,Ysq), calculate its two corresponding group indexes ky1 and ky2 by Eq. (10), and then accumulate the accumulator arrays St(i,j,ky1) and St(i,j,ky2) by the proposed modified Hough transform. If ky1 or ky2 is not in range [1,Ny], the defect will belong to only one group (

ky1 ¼ FixððYY min Þ=Dy Þ ky2 ¼ K y1 þ 1

ð10Þ

(4) Analysis of St(i,j,k) to track real defects: After all the potential defects are processed, the result of three dimensional

18

J. Shao et al. / NDT&E International 46 (2012) 14–21

accumulator arrays St(i,j,k) is obtained. Set a threshold value Tst ¼M, all the real defects can be tracked by following steps: (4.1) Find the maximum value and its position in St(i,j,k). Denote the maximum value as Stmax , and its position as (im,jm,km). (4.2) If Stmax 4T st , then find the St max potential defects that correspond to position (im,jm,km), and these potential defects are considered as the reappearance of a real defect in the sequence and are recorded. Update St(i,j,k) by removing the contributions of the tracked potential defects to St(i,j,k), and then return to step 4.1. (4.3) If Stmax r T st , then the tracking of a sequence of 2Mþ1 images is finished. 4. Results and discussion 4.1. Real-time X-ray imaging system The proposed method has been tested in a real-time X-ray imaging system. The system mainly consists of welded pipe movement and X-ray imaging part, image sequence transmission part and defects automatic detection and display part as illustrated in Fig. 3. In the welded pipe movement and X-ray imaging part, the transmission vehicle is used to move the welded pipe. There are four rollers fixed on the transmission vehicle and the welded pipe will be placed on the four rollers. The rollers are used to rotate the welded pipe. In real-time detection of spiral welded pipe, the pipe is moved by transmission vehicle and rotated by rollers simultaneously so that the weld moves in the direction of its length direction. In real-time detection of weld of straight welded pipe, there is no need to rotate the pipe when the pipe is moved by transmission vehicle. The X-ray flat panel detector is used to absorb X-ray photons that pass through the welded pipe, and convert them into electronic data. The electronic data is then sampled and transformed into sequence of images by image acquisition grabber and the sequence of images is transmitted to the computer for processing and display.

Fig. 4a shows a typical real-time X-ray image of a moving weld obtained by this system. By setting a fixed region of interest (ROI), as shown in Fig. 4a (the white rectangle), the image in ROI (referred to as ROI image hereafter) can be obtained, as shown in Fig. 4b. The size of ROI image is set to be 450  300, the weld direction in ROI image sequence is close to horizontal, and the proposed method is applied in the sequence of ROI images. 4.2. Discussion of parameter settings The image resolution of this system is calibrated to be Re¼4.28 (pixel/mm), and hence the pixel size is 0.23 mm/pixel. The frequency of acquisition is frate ¼30 (frame/s), and the maximum allowed moving speed of weld is Vrealm ¼6 (m/min). Then the maximal moving speed of weld in image is solved to be Vm ¼14.3 (pixel/frame) by Eq. (9). Consequently, the expected range of V can be set as [0,15]. b represents the relative x-coordinate of center of gravity of the defect in ROI image t ¼0 of the sequence. Therefore the expected range of b is [1,300]. 2Mþ1 represents the number of radiographic images for defect tracking each time, the larger the value of M, the much lower the possibility for centers of false defects to form a line, and therefore the easier to distinguishing real defects from false defects by tracking potential defects. However, the value of 2Mþ1 should be no more than the repeated appearance times of a defect in ROI in real-time detection. M ¼7 is set in this system. Dy represents the possible maximum differences of calculated value Y (relative coordinate Y of center of gravity) of segmented potential defects of a real defect. In theory, the relative position of center of gravity of a defect in the weld is fixed, and the values of Y of repeated appearance of the same defect should be the same. However, due to error of locating weld center and potential defects, there are deviations of value Y of the same defect. The maximum deviation of calculated value Y of the same defect is found to be 3. Therefore, set Dy ¼ 3.

Image Capture Card Computor

Pipe movement and X-ray imaging X-ray Flat Panel Detector

X-ray Source

Weld Pipe

Rollers

Image sequence transmission Weld defect automatic detection and display

Transmission Vehicle

Fig. 3. Illustration of the real-time X-ray imaging and automatic weld defect detection system based on Flat-Panel detector.

J. Shao et al. / NDT&E International 46 (2012) 14–21

19

Fig. 4. Real-time image of a moving weld and the image obtained in ROI: (a) real-time image of a moving weld and (b) image obtained in ROI.

dV,db are the discrete values of line parameters V, b for Hough Transform. There is no need to detect a very precise line, the setting of parameters dV¼1 and db¼ 1 is accurate enough to track defects. 2Em represents the thickness of the line to be detected, the larger the value of Em, the more inaccuracy the detected line. Therefore if Em is too large, it is easy to track real defects, but it is also easy to cause false tracking and cause false alarms; If Em is too small, it is not easy to track real defects and may cause missed detection. After some trial experiments, Em ¼3 is found to be a proper value. 4.3. Experimental results and discussion The moving direction of weld in ROI image is toward left in experiments, and therefore Eq. (3) is used to calculate the relative x-coordinates of centers of gravity of potential weld defects. 4.3.1. Example of potential defect tracking and its computational time Table 1 lists the parameters of potential weld defects in 15 continuous real-time X-ray images of a sequence of a moving weld which contains a small weld defect, and the potential weld defects are segmented in each ROI image by the potential defect segmentation approach proposed in Section 2. The former nine images in the sequence and their potential defect segmentation results have been shown in Fig. 1. The proposed defect tracking method is used to track the potential weld defects, and the result is illustrated in Fig. 5. Each black point (ts,Xsq) represents a potential defect, which is segmented in image t ¼ts with its relative x-coordinate of center of gravity to be Xsq. Black points with circle represent potential defects tracked as real weld defect by proposed method. The results show that the proposed defect tracking method can track the real weld defect successfully and avoid false alarms. After potential defects tracking, potential defects that cannot be tracked are eliminated as false alarms. Take image t¼  3 of the sequence for instance, part of the ROI image and its defect detection result before and after tracking are shown in Fig. 6a–c separately. A software was developed by Cþþ programming language using Visual Cþþ based on the proposed algorithms, and a computer (CPU: inters Core 2 Due P8400, 2.26 GHz  2; Memory: 3.5 G; Operating system: Windows XP) was used to test the computational time of proposed method. The proposed algorithms are divided into two

Table 1 Parameters of potential weld defects segmented in a sequence of 15 continuous real-time X-ray images of a moving weld which contains a real defect. t

7

7

7

7

7

6

6

6

5

5

5

Defect label X Y

1 257 2

2 244 0

3 188 2

4 62 1

5 35 9

1 229 2

2 209 8

3 76 1

1 205 7

2 89 2

3 5 6

t

4

3

3

3

3

2

2

1

1

1

0

Defect label X Y

1 97 0

1 217 7

2 212 0

3 160 9

4 111 1

1 171 1

2 120 1

1 157 6

2 137 0

3 131 1

1 146 1

t

1

1

1

2

2

2

3

3

3

4

4

Defect label X Y

1 272 2

2 222 3

3 155 1

1 167 0

2 77 2

3 10  16

1 178 0

2 127 3

3 29 2

1 296 2

2 187 0

t

4

4

5

5

5

5

6

7

7

7

Defect label X Y

3 45 3

4 19 7

1 266 6

2 204 0

3 196 0

4 86 1

1 209 0

1 221 0

2 201 9

3 143 1

parts. The first part includes all the algorithms before potential defect tracking such as weld extraction, noise reduction, and potential defects segmentation. Potential defect tracking algorithm is the second part. The average processing time of the first part is tested by processing the above 15 images for 10 times, and the average processing time of the second part is tested by tracking the segmented potential defects in above sequence of images for 1000 times. The result is that the average processing time of the first part algorithms is 15.8 ms (milliseconds) per image, and the average processing time of proposed potential defect tracking algorithm is 0.11 ms. Results show that the proposed defect tracking algorithm not only tracks potential defects quite fast, but also tracks real defects successfully and eliminates false defects effectively.

4.3.2. Experiment of processing a sequence of images obtained from factory A sequence of about 220 real-time X-ray images that record the moving weld with defects is obtained from factory. There are

20

J. Shao et al. / NDT&E International 46 (2012) 14–21

10 different defects in the sequence and each defect appears about 24 times in ROI. The proposed algorithms in our work are used to detect weld defect in this sequence. The result is that the average number of segmented potential weld defect by algorithms proposed in Section 2 is about 3.25 per image. After applying the defect tracking method all the false defects are eliminated and all the 10 real defects are detected. To show the advantage of the proposed method, we compare the detection result of this sequence of images by proposed method with the detection result by Sun’s method [10] because Sun’s method is also proposed for automatic defect detection in real-time radiographic images. The detection result is shown in Table 2. As each defect appears about 24 times in ROI, each defect can be detected at most 24 times in sequence of images. Table 2 shows that one defect is undetected by Sun’s method, and the frequency of successful detection of other defects by Sun’s method is much lower than the proposed method. There are also three false alarms by Sun’s method. Result shows that the proposed method for defect detection significantly outperforms Sun’s method. This is because higher threshold values have to be used to avoid the large number of false alarms when segmenting defects in each image by Sun’s method and this will reduce the capacity of detecting low contrast defects. In our work, much lower thresholds can be used to segment potential defects with tolerance of some false defects in each image, and the false defects can be eliminated by the proposed defect tracking algorithm. Fig. 7a shows a real-time X-ray image of weld with two defects in the sequence, its detection result by proposed method is shown in Fig. 7b, and its detection result by Sun’s method is shown in Fig. 7c which shows that one defect is undetected. Fig. 8a shows a real-time X-ray image of weld with a low contrast small defect, and the detection results by the proposed method and by Sun’s

method are shown in Fig. 8b and c. The real defect in Fig. 8a is quite unclear and its appearance is similar to false defect. Therefore it is not easy to be detected even by human inspection if only one image is observed. However, the defect can be detected easily if a video recording the sequence of images with the defect is observed by human inspection. Sun’s method can be considered as a person monitoring only one image each time to detect defects, and the proposed method is like a person monitoring a sequence of images each time to detect defects. Obviously, the later will be much better. 4.3.3. Real-time automatic defect detection of a sample pipe in factory The system based on the proposed method has also been tested in factory using a sample welded pipe. There are 32 weld defects in the weld pipe, and the smallest defect is about |0.8 mm. The welded pipe was detected in real-time when the moving speed was about 5 m/min. All the weld defects were successfully detected and there were no false alarms. Experiment result proved the effectiveness of proposed method to detect low contrast small defects and avoid false alarms in real-time defect detection.

5. Conclusions In this paper, an adaptive and effective method is proposed based on potential weld defects tracking in real-time radiographic image sequence of a moving weld. Firstly, all the potential weld defects are segmented in each image of the sequence by fusion of background subtraction and gray-level profile analysis algorithms, then the modified Hough transform is proposed to track potential weld defects segmented by the first step, and all the potential defects that cannot be tracked are eliminated as false alarms. Experiment results show that the proposed automatic defect detection method based on potential defect tracking is fast and effective to detect low contrast small defects without false alarms. The main advantages of proposed defect tracking method based on Hough transform is as follows: (1) It is relatively unaffected by false alarms caused by noise, and can detect weld defects with high certainty. (2) It can be used with other defect segmentation methods for real-time weld defect automatic detection, and solve the confliction between avoiding missed detection and reducing false alarms caused by noise that is commonly encountered in defect segmentation methods applied in single image. Table 2 Comparison of the detection results by Sun’s method [10] and by proposed method. Defect index

Fig. 5. Potential detects of a sequence and the tracking result by proposed method.

1

2

3

4

5

6

7

8

9

10

Detected times by Sun’s method 14 9 3 0 11 5 15 9 9 5 Detected times by our method 24 22 14 12 21 17 22 23 23 22

Fig. 6. Detect detection result of a image with a real defect before tracking and after tracking: (a) part of the ROI image, (b) detection result before tracking and (c) detection result after tracking.

J. Shao et al. / NDT&E International 46 (2012) 14–21

21

Fig. 7. Comparison of the two methods to detect an image of weld with two defects: (a) part of the ROI image, (b) detection result by proposed method and (c) detection result by Sun’s method.

False Defect

Defect

Fig. 8. Comparison of the two methods to detect an image of weld with a low contrast defect: (a) part of the ROI image, (b) detection result by proposed method, and (c) detection result by Sun’s method.

(3) It is fast, adaptive and stable, and the parameters of the method can be easily set for different applications. Acknowledgments This Research is funded by Doctor Subject Foundation of the Ministry of Education of China (no. 20090002110080).

References [1] Anouncia SM, Saravanan R. Non-destructive testing using radiographic images—a survey. Insight 2006;48:592–6. [2] Daum W, Rose P, Heidt H, Builtjes JH. Automatic recognition of weld defects in X-ray inspection. Br J Nondestr Test 1987;29:79–82. [3] Gayer A, Saya A, Shiloh A. Automatic recognition of welding defects in realtime radiography. NDT Int 1990;23:131–6. [4] Kaftandjian V, Dupuis O, Babot D, Zhu YM. Uncertainty modelling using Dempster–Shafer theory for improving detection of weld defects. Pattern Recogn Lett 2003;24:547–64. [5] Liao TW, Li YM. An automated radiographic NDT system for weld inspection: Part II—flaw detection. NDT&E Int 1998;31:183–92.

[6] Padua GX, Silva RR, Siqueira MHS, Rebello JMA, Caloba LP. Classification of welding defects in radiographs using transversal profiles to the weld seam. In: 16th world conference on nodestructive testing. [7] Lawson SW. Automatic defect detection in industrial radioscopic and ultrasonic images. London: University of Surrey; 1996. [8] Alaknanda Anand RS, Kumar P. Flaw detection in radiographic weldment images using morphological watershed segmentation technique. NDT&E Int 2009;42:2–8. [9] Lashkia V. Defect detection in X-ray images using fuzzy reasoning. Image Vis Comput 2001;19:261–9. [10] Sun Y, Peng B, Sun HY, Zhou P. Real-time automatic detection of weld defects in steel pipe. NDT&E Int 2005;38:522–8. [11] Liao TW. Improving the accuracy of computer-aided radiographic weld inspection by feature selection. NDT&E Int 2009;42:229–39. [12] Mery D, Berti MA. Automatic detection of welding defects using texture features. Insight 2003;45:676–81. [13] Mery D, Filbert D. Automated flaw detection in aluminum castings based on the tracking of potential defects in a radioscopic image sequence. IEEE Trans Robotic Autom 2002;18:890–901. [14] Zhou ZG, Du YY. Automated defects recognition technique based on multiple radiographic images. Chin J Mech Eng 2006;42:73–6. [15] Du D, Hou RS, Shao JX, Chang BH, Wang L. Registration of real-time X-ray image sequences for weld inspection. Nondestruct Test Eval 2010;25:153–9. [16] Shao JX, Du D, Shi H, Chang BH. Automatic weld recognition and extraction from real-time X-ray images using quadratic curve fitting and multi-order differences analysis of intensity profile. Insight 2011;53:562–9.