Sie sind auf Seite 1von 9

NDT&E International 37 (2004) 291–299

www.elsevier.com/locate/ndteint

Assessment of welding defects for gas pipeline radiographs


using computer vision
H.I. Shafeeka, E.S. Gadelmawlab,*, A.A. Abdel-Shafyb, I.M. Elewab
a
Mechanical Engineering Department, Higher Technological Institute, Tenth of Ramadan City, Egypt
b
Production Engineering and Mechanical Design Department, Faculty of Engineering, Mansoura University, Mansoura 35516, Egypt
Received 21 July 2003; revised 14 October 2003; accepted 15 October 2003

Abstract
In this paper, a novel automated vision system is introduced to detect and assess the welding defects of gas pipelines from the radiographic
films. The proposed vision system was used to capture images for the radiographic films and apply various image processing and computer
vision algorithms to detect the welding defects and to calculate necessary information such as length, width, area and perimeter of the defects.
A developed software, named AutoWDA, has been fully written in lab using Microsoft Visual Cþþ 6 to perform the analysis process. The
proposed system offers many advantages such as enhancing the captured images so that the defects appear much clear and eliminating the
loss of image details, which occurs due to film deterioration by the time, by transferring the radiographic films into digitized images, which
could be saved on magnetic mass storage media. The proposed system is considered quite cheap compared with commercial radiographic
image enhancement systems.
q 2003 Elsevier Ltd. All rights reserved.
Keywords: Computer vision; Welding defects; Feature extraction; Radiography

1. Introduction recently applied in many fields such as automatic inspection


[4,5], defect analysis [6,7], detection of welding defects [8],
Pipelines are considered the safest and the most part measurements [9,10], assessment of surface texture
economical way for transporting gas or liquids over long [11], and analysis of radiography [12 – 14]. In quality control
distances. Therefore, welding inspection on oil and gas applications, the measurement process of some features,
pipelines has always been one of the most important areas of such as the product’s length or weight is termed as
Non-Destructive Testing (NDT) [1]. The radiography film quantitative inspection [15]. This work introduces a novel
method has been the cornerstone of the NDT for the last 50 vision system for the detection and assessment of welding
years [2]. Many inspection tasks are considered time- defects of gas pipelines radiography. The tested radio-
consuming and/or boring for humans to perform. It has been graphic films were produced for gas pipelines welded by the
reported that human visual inspection estimated to account Shielded Metal Arc Welding (SMAW) method.
for 10% or more of the total labor costs for manufactured
products. In addition, human visual inspection is, at best,
2. Problem description
80% effective and furthermore, this effectiveness can only
be achieved if a rigidly structured set of inspection checks is
implemented [3]. Due to the recent developments in digital The great number of radiographic images, which have to
image processing and computer vision, automated visual be taken over very long distances of welded gas pipelines,
inspection is being extensively applied because human makes the detection of welding defects difficult and time-
inspectors are not always consistent evaluators of products consuming. The most difficult problem in the inspection
and it allows objects to be inspected in unsafe environments cycle is the accurate detection of flaws in a given radio-
for people [3]. On the other hand, machine vision has been graphic image. The human interpretation of radiographic
films is a hard and difficult task when a great number of
* Corresponding author. Tel.: þ 20-122-808-003; fax: þ20-402-977-854. defects are to be counted and evaluated. It is known that
E-mail address: esamy@mans.edu.eg (E.S. Gadelmawla). several experts do not have the same opinion for a given film,
0963-8695/$ - see front matter q 2003 Elsevier Ltd. All rights reserved.
doi:10.1016/j.ndteint.2003.10.003
292 H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299

and even the same expert might have a different report at the Company (PETROJET) in Egypt. The radiographic films
beginning or at the end of the workday fro the same film. This were produced by the company according to the API 1104
work introduces a novel automated vision system for the using the Iridium 192 (Ir-192) to meet quality class DB.
detection and assessment of gas pipelines welding defects
from the radiographic films.
4. The proposed vision system

3. Producing the radiographic films The proposed vision system consists of two parts,
hardware and software. The hardware includes an IBM
Radiographic films of welded pipelines are produced by compatible personal computer with Windows operating
the Radiographic Testing (RT) method. This method is system, frame grabber with resolution up to 760 £
based on recording the varying degree of absorption of the 570 pixels and a Charged Couple Device (CCD) camera.
penetrating radiation by objection the conventional film The software is especially written to detect and assess
radiography. This varying degree of absorption produces a welding defects of the gas pipelines radiographic films. The
latent image of the object being examined on a film. The proposed software, Automatic Welding Defects Assessment
film is chemically processed to transform the latent image (AutoWDA), was developed totally in-house using Micro-
into a permanent shadow image of the internal and external soft Visual Cþ þ and is ready to run under Windows
conditions of the object. The processed film is called the operating systems. It was developed such that it can be used
radiograph. If the object tested by the RT contains a flaw, independently without referring to any other software. In
more radiation will pass through the flaw area of the weld addition, it supports many different image file formats such
than the surrounding areas creating a shadow image on the as BMP, TIFF, GIF, JPG, PCX and TGA.
film. The produced radiographs could be interpreted and the The system is adjusted to capture a maximum area of
integrity of object could be evaluated by either expert 9 cm in length and 7 cm in height of the radiographic films,
inspectors or automatic inspection systems. While produ- which enable a pixel size of about 123 mm. The size of the
cing the radiographic films, the image quality indicators captured images controlled by using different lenses and
(IQIs) are mounted on the radiographic films to gain some varying the distance between the camera and the films. The
quantitative information about the sensitivity of produced area of the captured images could be increases by using a
films. The IQIs are test wires of strictly controlled high-resolution frame grabber.
dimensions, which manufactured of the same material as
the specimen being radiographed. Measured wire IQI
sensitivity is usually quoted as the minimum visible wire 5. Working procedures
diameter expressed as a percentage of weld metal thickness.
The radiographic films used in this work were obtained Fig. 1 shows a photograph of the proposed system. As
from the Petroleum Projects and Technical Consultations shown in the figure, the procedures of working could be

Fig. 1. Photograph of the proposed vision system.


H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299 293

summarized as follows:

1. The radiographic film (1) is placed on a backlighting


table (2) then an image is acquired by the CCD camera
(3) and saved to a BMP file using the capturing software
provided with the frame grabber.
2. The BMP file is opened by the AutoWDA software then
converted to gray scale image.
3. Specific window is created around the defect or the
whole welding area then the various algorithms are
sequentially applied to the specified window to obtain the
defects information.

6. Capturing image considerations

Many parameters affect the quality of the radiographic


captured images such as lens focal length, lighting
conditions and the focus. To obtain high-quality captured
images, the radiographic films should be captured under
optimum conditions. The IQIs produced on the radiographic
films is considered to be a good target to assess the quality of
the acquired images. Therefore, the capturing conditions
should be adjusted so that any IQI feature on radiographic
films should be seen clearly in the captured images.

7. Image processing algorithms

The AutoWDA software applies many image processing


algorithms on the radiographic captured images to detect the
welding defects and to extract some useful information.
Fig. 2 shows a block diagram of the main algorithms used by
the AutoWDA software. These algorithms have been
applied sequentially as shown in the figure.

7.1. Image preprocessing

Image preprocessing seeks to modify and prepare the


pixel values of a digitized image to produce more suitable
form for subsequent operations. Many algorithms were used
such as converting color images to gray scale images,
extracting the gray level histogram and calculating a
suitable Threshold. In addition, image enhancement algor-
ithms such as histogram stretch and histogram equalization
are applied to get the optimum image before the segmenta-
tion process.

7.2. Image enhancement

Details of the defects in captured images could be Fig. 2. Block diagram of the main algorithms of the AutoWDA software.
enhanced by applying both histogram stretch and
histogram equalization to the original image. The main distributed brightness levels over the whole brightness
objective of the histogram stretch algorithm is to increase scale. As a result, the image appears significantly brighter
the contrast of a low contrast images. The goal of and the general shape of the welding seems enhanced
histogram equalization is to create an image with equally so that more details are visible to eye. In addition,
294 H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299

the median filter is used to remove unwanted noise from Fig. 3a shows a captured image for a radiographic film and
the captured images. Fig. 3b shows the effect of applying the histogram
specification to the weld area of the image. Many suitable
7.3. Histogram specification density histograms were created and tested to suit most of
the captured images. The density histograms play an
Although the histogram equalization algorithm is quite important point in the segmentation process. Therefore, it
useful, it does not lend itself to interactive image could be applied to the captured image by three ways: (1) by
enhancement applications. This is because its capabilities using the default density histogram, (2) by selecting a menu
are limited to the generation of only one result, an command to cycle through the predefined density histo-
approximation to a uniform histogram. The histogram grams and choose the best one, (3) by creating a separate
specification provides the ability to specify particular density histogram manually.
histograms capable of highlighting certain gray-level ranges
in an image. This procedure yields a processed version of
original image, where the new gray levels are characterized 8. Segmentation and defects extraction
by specified density histogram (desired histogram). The
principal difficulty in applying the histogram specification The segmentation process deals with the separation of
method to image enhancement lies in being able to construct the defects from the surrounding areas using a suitable
a meaningful histogram. To make the creation of the density Threshold, hence converting the image in the specified
histograms flexible, a user-friendly dialog has been window to binary image. After the segmentation process has
designed to create and modify the density histograms. been completed, the 8 neighborhoods boundary chain code

Fig. 3. (a) A captured image for a radiographic film (b) Applying the Histogram Specification to the captured image.
H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299 295

Fig. 4. Boundary chain codes. (a) Directions of the eight neighbourhood pixels relative to the previous pixel (b) Chain codes of a sample boundary.

Fig. 5. Procedures of defect detection for an image contains two clear defects.
296 H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299

(BCC) algorithm is applied to identify the contours of the moments calculated by this equation will vary depend-
defects. As a result, the coordinates of the boundary edges of ing on the position of the object because calculations are
all defects are extracted and stored in an array with specified done on the basis of the absolute position of the object. The
code for each boundary. In addition, the chain code marks moments could be calculated independently from the
each boundary pixel by a code number represents its position of the object using the central moments ðmpq Þ;
direction relative to the previous boundary pixel as shown in which could be calculated by the following equation:
Fig. 4a. A sample boundary and the corresponding code for ð1 ð1
each pixel is shown in Fig. 4b. The boundary edge codes are mpq ¼ ðx 2 x Þp ðy 2 y Þq f ðx; yÞdx dy ð3Þ
21 21
used to calculate area, perimeter, width and height of the
defects by creating short lines between each two successive Where x and y are the coordinates of the center of gravity
boundary pixels. All calculations are based on the area of of the object. For digitized images, Eqs. (1) and (2) could be
each pixel, which is assumed to be unity (1 £ 1). When the used as follows:
system is calibrated, the actual width and height of the pixel
is calculated, hence all calculations could be obtained in XX
mpq ¼ ðxp yq Þ ð4Þ
absolute units (mm or inch). x y

8.1. Calculating perimeter of the defects


XX
mpq ¼ ðx 2 x Þp ðy 2 y Þq ð5Þ
For any closed boundary, the perimeter ðPÞ of any defect x y
could be calculated as follows:
The value of x and y could be calculated by the following
X
N
equations:
P¼ ni ð1Þ
i¼1 m m
x ¼ 10 and y ¼ 01 ð6Þ
m00 m00
Where N ¼ Number of boundarypffiffipixels, ni ¼ 1 for pixels
having codes 0, 2, 4, 6, and ni ¼ 2 for pixels having codes Where:
1, 3, 5, 7.
m00 ¼ Summation of all x and y coordinates of pixels
8.2. Calculating the area of defects within the object (area of the object).
m10 ¼ Summation of all x-coordinates of pixels within
The area of defects was calculated using the theory of the object.
moments [16], which defines the moments ðmpq Þ of an image m01 ¼ Summation of all y-coordinates of pixels within
f ðx; yÞ by the following equation: the object.
ð1 ð1
mpq ¼ xp yq f ðx; yÞdx dy ð2Þ 8.3. Calculating width and height of the defects
21 21

Where: x; y represent pixel coordinates and p; q represent The width ðwÞ and the height ðhÞ of defects could be
the moment orders. For a given object within an image, calculated from the chain code array using the following

Fig. 6. Information of the two defects shown in Fig. 4h.


H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299 297

equations: 9. Calibration of the vision system

X
N X
N
Two calibration techniques have been provided with
w¼ wi and h ¼ hi ð7Þ
i¼1 i¼1
the AutoWDA software, fixed and variable calibrations.
The two techniques provide the ability to calculate the
Where wi ¼ 1 for pixels having codes 0, 1, 7 and wi ¼ 0 for extracted features in either image units (pixels) or absolute
pixels having the other codes, hi ¼ 1 for pixels having codes units (mm). The fixed calibration is based on two
1, 2, 3 and hi ¼ 0 for pixels having the other codes. parameters, the focal length of the lens used to capture

Fig. 7. Procedures of defect detection for an image contains unclear defect.


298 H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299

the image and the distance between the CCD camera and the Fig. 6a and b show the defect information obtained for
backlighting table. This technique is suitable when radio- the left and the right defects, respectively. The defect
graphic films are tested under the same conditions, such as information could be obtained by clicking the Show Data
using the same lens, lighting and the same distance between button (Fig. 5h) then double clicking on the defect. The
the camera and the backlighting table. The fixed calibration Zoom button in Fig. 5h could be used to magnify the defects
technique was mentioned in a previous work related to up to 500% from the original size.
DMVision software [9]. Fig. 7a shows another captured image for unclear defect
The variable calibration technique is based on setting an and a specific window around it. Fig. 7 shows the same
object with known dimensions; typically slip gauges, on the procedures applied in Fig. 5 to detect the defect. In Fig. 8a,
dead area of the radiographic film while capturing the the calculated Threshold for the defect is 64, which did not
image. In this type, the calibration process is performed separate the defect from the weld area; therefore, the
separately for each image by drawing a line at the two end Threshold was increased to 71 manually by moving the
points of the slip gauge and entering the corresponding slider at the bottom to separate the defect from the weld
length. This process should be performed in both X and Y area. Changing the value of the Threshold may slightly
directions to calculate the calibration factor in both X and Y change the shape of the detected defect. This is due to the
directions. This technique is suitable when radiographic change in the gray levels at the boundary of the defects.
films are tested under variable conditions such as changing Fig. 8b shows the defect after magnified by 300% and Fig. 8c
the lens or the distance between the camera and the shows the defect information.
backlighting table frequently.

11. Discussion
10. Experimental study
The specified window could be taken either as small
A typical radiographic film from AGFA ‘Radiographer’s window around the defects or as a total window around the
Weld Interpretation Reference’, which is used for training, welding area. For unclear defects (Fig. 7), the gray levels of
is captured as shown in Fig. 5a. The procedures of detecting the defects are close to the gray levels of the surrounding
the defects of this image are shown in the same figure. area, so the specified window should be as small as possible
Fig. 5b shows a specified window around the whole welding around the defect. For clear defects (Fig. 5), the specified
area. After applying the histogram stretch algorithm window could be taken around the whole welding area.
(Fig. 5c), the welding area enhanced and the two defects Although the two defects were detected, the right defect
appear much dark. More enhancements were obtained by seems to be less than the original one because the boundary
applying the histogram equalization algorithm as shown in pixels of that defect have light gray scale. In this case it is
Fig. 5d. In Fig. 5e the median filter was applied and as a recommended to take small specific window around each
result the image appears much smoother, compared with the defect individually. Although a suitable density histogram
image in Fig. 5d. In Fig. 5f, the histogram specification has been created and tested with many radiographic images,
algorithm was applied and the defects become much visible. some images need little change in the density (desired)
Fig. 5g shows the binary image of the welding area after histogram to give good results. This could be overcome by
applying the calculated Threshold. The BCC algorithm was designing an interactive dialog box to modify the density
applied to the binary image and the two defects histogram so that the changes reflected directly on the
were extracted as shown in Fig. 5h. image. In addition, more than one density histogram could

Fig. 8. Results of the defect shown in Fig. 6.


H.I. Shafeek et al. / NDT&E International 37 (2004) 291–299 299

be created and saved for each specific type of defects. The [3] Smith B. Making war on defects. Six-sigma Des, IEEE Spectr 1993;
preprocessing and the image enhancement algorithms 30(9):43– 7.
[4] Ker J, Kengskool K. An efficient method for inspecting machined
affect, significantly, the results of the detected defects. parts by a fixtureless machine vision system. Proceedings of SME
Most defects could be detected by applying the mentioned Vision, Detroit, vol. 2; 1990. pp. 45 –51.
algorithms sequentially. Although changing the value of the [5] Daaland A. Real-time radiography for in-service inspection of flexible
Threshold may slightly change the shape of the detected pipeline system. Trends in NDE science and technology. Proceedings
defect, the general shape of the defect does not change. of the Fourteenth World Conference on Non-Destructive Testing,
New Delhi, vol. 3; 1996. pp. 1361–1364.
[6] Jacobsen C, Zscherpel U. Crack detection in digitized radiographs
with neuronal methods. Proceedings of the Seventh European
12. Conclusions conference on Non-Destructive Testing, Copenhagen, vol. 3(8);
1998. pp. 26–29.
Radiography is the most common method for NDT and is [7] Nuding W, Gottwald HR, Sauerwein C. Radioscopic flaw detection
during welding. Proceedings of the Seventh European Conference on
used widely for testing pipelines welding. This study Non-Destructive Testing, vol. 3(8); 1998.
introduces a developed vision-based system for the [8] Rihar G, Varilstvo ZA, Rant J, Stefan J. The first application of
automatic assessment of radiography welding defects. imaging plates to an examination of welded joints. Proceedings of the
Many algorithms were used to enhance the image and to Seventh European Conference on Non-Destructive Testing, vol. 3(8);
detect the defected areas. Useful information about the 1998.
[9] Gadelmawla ES, Elewa IM. On-line measurement of product
defects could be obtained such as area, perimeter, length and dimensions using computer vision. Proceedings of nineth IMEKO
width of the defects. This information could be used in the Symposium Metrology for Quality Control in Production
future to classify the welding defects according to Surface Metrology for Quality Assurance, Cairo, Egypt, vol. 4;
international standards, such as the American Petroleum 2001. pp. 1–10.
Institute (API) standard, and to take acceptance decisions [10] Hirayama K, Yokota S, Hashimoto K, Nakamura M, Nakamura K.
Measurement of a flaw height by radiographic testing. Proceedings of
about the defects. The proposed system is quite cheap the Fourteenth World Conference on Non-Destructive Testing, New
compared with the commercial automatic inspection Delhi, vol. 3; 1996. pp. 1313–1316.
systems and it eliminates the need for image interoperation [11] Gadelmawla E, Elewa I, Soliman H. Assessment of surface texture
by a skilled inspectors. Many enhancements could be using a uniquely featured computer vision technique. Society of
applied to the captured images so that the welding defects Manufacturing Engineering, Fourth International Machining &
Grinding, Troy Michigan; 2001. pp. MRO1–233.
displayed much visible for human eyes. In addition, the [12] Zscherpel U, Bellon C. Wall thickness estimation from digitized
proposed system eliminates any loss of image details due to radiographs. Proceedings of the Seventh European Conference on
the film deterioration by storing the radiographic films on Non-Destructive Testing, Copenhagen, vol. 3(8); 1998.
magnetic media for mass storage. [13] Chapman RK, Munns IJ, Georgiou GA. The performance of
radiography for large planar defects in thick-section welds. Proceed-
ings of the Seventh European Conference on Non-Destructive
Testing, Copenhagen, vol. 3(8); 1998.
References [14] Singh RP, Madhav E. Quality control by radiography. Trends in NDE
Science and Technology. Proceedings of the fourteenth World
[1] Williams H, Barbian OA. Operational experience with inline conference on Non-Destructive Testing, New Delhi, vol. 3; 1996.
ultrasonic crack inspection of German crude oil pipelines. Proceed- pp. 1951–54.
ings of the Seventh European Conference on Non-Destructive [15] Harbich KW, Hentschel MP, Ekenhorst D, Schors JV, Lange AX-R.
Testing,Copenhagen, vol. 3(8); 1998. Ray refraction for NDT of micro cracks and impacts. Proceedings of
[2] Knell M. Improving actual film quality using image quality the Seventh European conference on Non-Destructive Testing,
parameters from new national and international standards. Proceed- Copenhagen, vol. 3(8); 1998.
ings of the Fourteenth World conference on Non-Destructive Testing, [16] Pitas I. Digital image processing algorithms and applications. New
New Delhi, 3(1351– 1356); 1996. pp. 8–13. York: Wiely; 2000.

Das könnte Ihnen auch gefallen