# Review on Computer Aided Weld Defect Detection from Radiography Images
## 4 Defect Segmentation  
The weld image contains not only the weld but also the background information. The background is defined to be the regions in an image that are not important to the analyst. In welding defect detection, the regions with defects in the weld bead is the target of recognition. Thus these regions are the focus of analyst, while the background regions without defects should be removed. The background subtraction method tries to recognize the defects by subtracting the background from the original image. The defects can be inspected by subtracting the background from the original image due to their superimposing on the other image structures. This inspection method is popular in the early research of weld seam detection. [PERSON] designed a multiscale method for removing the background structure in the digital radiographs while reserving the defect details [17]. The gray level in defect part usually changed with high spatial frequencies, meanwhile that in normal part varied gradually, namely with low spatial frequencies [18]. Many methods are built on this basis. [PERSON] pointed that the line profile of a good weld has a bell shape, while the existence of defects will destroy the bell. Based on this, they first scaled line image so that each profile has approximately the same size, then chosen the suitable threshold value by observing the histograms of the scaled images to remove the background, finally detected whether there are anomalies in the profiles and generated a two-dimensional (2D) flaw-map [19]. Furthermore, [PERSON] and [PERSON] simulated a 2D background model of normal welding bead which can be subtracted from the original image. This method can be applied to defect all types of flaws [9]. These methods taken the line profile as the object of detection and processed each weld image line by line. [PERSON] constructed the background subtraction method for abstracting the defect image. In the process of subtracting the background, a special points connection method is proposed to persist the background distribution of defective parts [20]. [PERSON] and [PERSON] used a bottom-hat filter to separate the majority of defects from the background. This filter is made up of two stages: first a background image without flaws was produced by a morphological closure operator, secondly, the defective regions were identified by subtracting the background image from the original image [21]. [PERSON] took the weld detection problem as a problem of hypothesis testing. They applied the statistical techniques for weld defect detection in radiography images. The results showed that the defects are segmented from the original radiography images based on nonparametric statistics successfully [22]. The other image processing methods involving thresholding operation [23], watershed transform [24], morphological operations [25], and edge detection [26] are used for segmenting the defects by searching the significant variation of the pixels which may be the defects. [PERSON] and [PERSON] used the binary thresholding method to segment the defective regions after the noise reduction and background subtraction. In order to eliminate over-segmentation, filters taken from morphological mathematics were next used. The watershed transform was finally used to separate internal defective regions. The watershed transform coming from the field of mathematical morphology is a well established tool for the segmentation of images. Generally, the watershed transform is computed on the gradient of the original image, the boundaries are located at high gradient points. It can produce a complete division of the image in separated regions. The result image of each step was shown in Figure 3. The result generated an area of 0.9358 underneath the receiver operation characteristic (ROC) curve [21]. [PERSON] applied the morphological image processing to detect suspected defect regions.