1 Introduction

During the metal welding process [1], different types of welding flaws may occur such as porosity, cracks, distortion, and incomplete penetration, non-metallic inclusions, lack of fusion, lamellar tearing, and undercutting.

Only the surface flaws may be detected by visual inspection and when present below the surface, non-destructive methods need to be employed. Such methods as radiography and ultrasonic testing (RT and UT) are commonly used for the detection and characterization of deep-seated flaws in welded objects [2, 3]. RT uses X-ray or Gamma-ray penetration to provide fast and cost-effective image acquisition of three-dimensional objects usually on radiographs formed on radiation detectors such as film, phosphor plate, or flat panel detectors [2].

Unfortunately, intrinsic within the RT method is the degradation of the quality of the images due to the contamination of the signal by scattered radiation which is indistinguishable by the detection system hardware. Unavoidable detection of scattered radiation constitutes the main source of noise on the RT image culminating in the blurriness of the radiography images thus reducing the effectiveness of the method in defect identification and characterization. Efforts towards enhancing visualization in defect regions have therefore focused on image processing methods of digital radiographs [4,5,6]. The processing algorithms aim to improve the contrast between the defect and the surrounding areas whilst preserving as much of the original signal as possible and without creating further artifacts (i.e. false calls) or further blurring [7].

The total variation, TV, (or total variation regularization) is one such digital image processing method. In this approach, the aim is to reduce the total variation of the recorded values across the image by removing redundant detail whilst preserving details associated with defects such as borderlines and edges. The technique can be applied using different regularization algorithms such as non-convex regularization, iterative method, and second-order functional and hybrid total variation.

The regularization function and parameter have a critical role in processing, when regularization parameters are set to zero, it is the same minimizing the sum of squares. The total variation regularization term plays a strong role with larger regularization parameters. Also, the choice of the regularization function is critical to achieving just the right amount of contrast enhancement [8].

The regularization function controls the effectiveness of the image processing and setting the regularization parameters to zero, equates to the minimization of the sum of the squares. The total variation regularization term, on the other, hand influences larger regularization parameters. Also, the choice of the regularization function is critical in achieving optimum contrast enhancement [8].

TV-based methods may be applied with different convex and non-convex regularization terms and using a quadratic penalty term to control it. To extract different features from the images, the two methods can be applied using non-convex p-norm total variation or non-convex logarithm-based total variation, see Rudin, Osher, and Fatemi (ROF)-TV [9]. Chambolle [10] on the other hand, has proposed a projection-based algorithm for minimizing the TV model. It should be noted that the TV model can be solved exactly (not approximately) by Chambolle algorithm and its convergent is ensured. Furthermore, this algorithm is straightforward to implement it and also is fast due to a dual formulation. Finally, the Chambolle algorithm and its variant not only can be used for image denoising but also are applicable for zooming, and the computation of the mean curvature motion of interfaces [10,11,12].

Regarding the Chambolle algorithm, it can provide a formal proof of its inner data dependencies and locality properties and utilities a proof of convergence [13, 14]. The criterion for stopping the iteration just consists in checking that the maximum variation between two iterations is less than ε. Notice that this algorithm can very easily be parallelized for Eq. (3). We can replace λ with the new value in Eq. (4) after each iteration for very quick convergence.

In this study, the Chambolle model is utilized for defect identification and characterization in different welded objects borrowed from the “Sonaspection Kit” of standard welded objects. The method has been applied as a contrast enhancement algorithm for RT images.

2 Methods

2.1 Minimization of TV Model Using Chambolle’s Projection Approach

The classical TV model introduced by Rudin–Osher–Fatemi is formulated as [9]:

$$ \mathop {\hbox{min} }\limits_{{u \in BV\left( {{\varOmega }} \right)}} \mathop \smallint \limits_{{{\varOmega }}}^{{}} \left| {\nabla u\left( x \right)} \right|dx + \frac{\lambda }{2}||u - f||_{2}^{2} $$
(1)

where \( u \in {\mathbb{R}}^{N \times N} \) denotes the denoised image, \( f \in {\mathbb{R}}^{N \times N} \) is the noisy acquired image and \( \lambda \) is a positive regularization parameter. For a bounded domain \( {{\varOmega }} \in {\mathbb{R}}^{N} \), \( BV\left( {{\varOmega }} \right) \) denotes the space of bounded variation function and, \( \left( {\nabla u} \right)_{i,j} \) denotes the discrete gradient operator defined by the forwarding differences operator:

$$ \left( {\nabla {\text{u}}} \right)_{i,j} = \left( {\left( {\nabla {\text{u}}} \right)_{i,j}^{1} ,\left( {\nabla {\text{u}}} \right)_{i,j}^{2} } \right), $$

With

$$ \left( {\nabla {\text{u}}} \right)_{i,j}^{1} = \left\{ {\begin{array}{*{20}c} {u_{i + 1,j} - u_{i,j} ,} & {if\,i < N} \\ {0,} & {if\,i = N} \\ \end{array} } \right.\,{\text{and}}\,\left( {\nabla {\text{u}}} \right)_{i,j}^{1} = \left\{ {\begin{array}{*{20}c} {u_{i,j + 1} - u_{i,j} , } & {if\,j < N} \\ {0,} & {if\,j = N} \\ \end{array} } \right.. $$

There To minimize the TV model (1), Chambolle has proposed a projection-based algorithm [10] with \( X = {\mathbb{R}}^{{N^{2} }} \) and \( Y = X \times X \). For a given \( \left( {p_{1} ,p_{2} } \right) \in Y, \) the discrete divergence operator \( div:Y \to X \) is defined in the following form:

$$ \left( {div p} \right)\left( {i,j} \right) = \left\{ {\begin{array}{*{20}c} {p_{1} \left( {i,j} \right)} \\ { - p_{1} (\left( {i - 1,j} \right)} \\ {p_{1} \left( {i,j} \right) - p_{1} (\left( {i - 1,j} \right)} \\ \end{array} } \right.\begin{array}{*{20}c} {if\,i = 1} \\ {if\,i = N} \\ {otherwise} \\ \end{array} + \left\{ {\begin{array}{*{20}c} {p_{2} \left( {i,j} \right)} \\ { - p_{2} (\left( {i,j - 1} \right)} \\ {p_{2} \left( {i,j} \right) - p_{2} (\left( {i,j - 1} \right)} \\ \end{array} } \right.\begin{array}{*{20}c} {if\,j = 1} \\ {if\,j = N} \\ {otherwise} \\ \end{array} \,{\text{and}}\,\left( {\nabla {\text{u}}} \right)_{i,j}^{1} = \left\{ {\begin{array}{*{20}c} {u_{i,j + 1} - u_{i,j} , } & {if\,j < N} \\ {0, } & {if\,j = N} \\ \end{array} } \right.. $$

With \( K \) defined as:\( K = \left\{ {div p :p \in Y, \left| {p\left( {i,j} \right)} \right| \le 1 for every i,j} \right\} \).

The minimizer of Eq. (1) can be calculated as follows [10]:

$$ u = f - \pi_{{\frac{1}{\lambda }K}} \left( f \right), $$
(2)

where \( \pi_{K} \) is the nonlinear projection operator onto set \( K \). Therefore, to obtain minimizer of (1), the nonlinear projection \( \pi_{K} \) should be calculated. In this paper, analogous with [10], we apply an iterative scheme to obtain \( \pi_{K} \). We have the following result. The convergence of mentioned iterations is ensured, see the following result.

Proposition 1

Assuming \( \delta_{t} \le \frac{1}{4}, \) the semi-explicit iterations \( \frac{1}{\lambda }div p^{n} \) converges to \( \pi_{K} \) as \( n \to \infty , \) where the sequence \( \left\{ {p^{n} } \right\}_{n = 0}^{\infty } \) is generated by following iterations

$$ p_{i,j}^{n + 1} = \frac{{p_{i,j}^{n} + \delta_{t} \left( {\nabla \left( {div p^{n} - \lambda f} \right)} \right)_{i,j} }}{{1 + \delta_{t} \left| {\left( {\nabla \left( {div p^{n} - \lambda f} \right)} \right)_{i,j} } \right|}},\,{\text{for}}\,n = 0,1,2, \ldots . $$
(3)

Proof

See [Theorem 3.1, 10] and [Theorem 1, 12].

It is known that the regularization parameter \( \lambda \) in (1) plays a canonical role since controls the trade-off between data fidelity term \( ||u - f ||\) and the regularization term \( \mathop \smallint \limits_{{{\varOmega }}}^{{}} \left| {\nabla u\left( x \right)} \right|dx \). Several strategies for finding regularization parameter have been proposed, see e.g. [15], but most of them are not adaptive or are non-stationary strategies that are not suitable for imaging enhancement problems. In this paper, as proposed in [11], we use a convergent adaptive scheme to estimate optimal \( \lambda^{k} \) in each iteration in the following form

$$ \lambda^{k + 1} = \frac{{||u - f||^{2} }}{N\sigma }\lambda^{k} \,{\text{for}}\,k = 0,1,2, \ldots $$
(4)

where \( \sigma \) denotes the noise standard deviation and \( u \) is calculated by (2).

The Chambolle projection algorithm is summarized in Algorithm 1.

figure a

2.2 The Digitized Radiographs

Radiography images of the set of welded objects were obtained from the standard ‘Sonainspection Kit” using computed radiography (CR). The data acquisition was made using an X-ray based system using various radiographic exposure settings with imaging plates and a CR system. The X-rays were generated with the ERESCO 65 MF2 [Pantak-Seifert], at potentials of between 100 kV and 140 kV and the exposure (current–time) was set between 20 mA.min up to 48 mA.min; the source to film distance (SFD) was set to 100 cm. The acquired radiographs were acquired in line with well known international standards and in digital format to enable implementation of image processing algorithms [16, 17].

3 Results and Discussion

In this study, we improved the dimension measure of the cracks and other defects by RT and image processing. In the first stage, the feasibility of measuring the cracks and other defects is investigated by radiography, and in the next stage; the dimensions of inaccessible defects are evaluated by radiography images enhanced by Chambolle’s projection approach. Figure 1 shows photographs of the three specimens of the ‘Sonaspection kit’ with measurable cracks (root concavity, incomplete root penetration and over-penetration) were selected, see for their photographs.

Fig. 1
figure 1

The photographs of two specimens of the Sonainspection Kit, a root Concavity b incomplete root penetration c over-penetration

3.1 The Chambolle’s Projection Approach Results

Figure 2 shows the radiographic images of the object in Fig. 1a which had a typical root concavity defect. Although the root concavity detectable in the image, its edges are not well-defined making dimensional determination difficult. The Chambolle method was therefore applied to the acquired radiograph with the aim of suppressing the noise level and background removal to sharpen the edges of the defects.

Fig. 2
figure 2

The radiography image of the objects of (Fig. 1a) with root Concavity

Unfortunately, the noise in radiographic images is difficult to accurately characterize requiring the careful balancing of the processing parameters for noise reduction whilst retaining as much of the original signal as possible for effective contrast enhancement. The processing parameters of the Chambolle method are the time-step parameter δt, tolerance , the noise standard deviation σ, and λ. Here δt and were set to 0.248 and 10−3. λ has a dynamic range and its initial value was set to 0.08. It has been shown [10] that changes in σ affect the smoothness of the output and the output image becomes smoother for larger values of σ.

The output images from the application of the Chambolle method for σ’s set to 1, 5, 15, and 20 are shown in Fig. 3. It can be seen that as expected the resulting image becomes progressively more blurred for larger σ leaving behind mostly the noise component which could then be subtracted from the original image to yield an image with enhanced contrast. The outcomes of subtracting the foggy images of Fig. 3 from the original radiographs of Fig. 2a, result in the sharper images shown in Fig. 4. The same contrast enhancement approach was repeated for other radiographs of objects with known weld defects and the output images were reviewed. Figure 5 shows the radiographs and the corresponding reconstructed images for the samples shown in Fig. 1b to d. It can be seen that defects that were not are visible on the original defects are visible on the processed image.

Fig. 3
figure 3

The output images of the Chambolle method for Fig. 2a and σ a 1, b 5 and c 15 and d 20, respectively

Fig. 4
figure 4

the Subtracted images of Fig. 3 from the original image (Fig. 2a) for σ a 1, b 5 and c 15 and d 20, respectively

Fig. 5
figure 5

a and c the radiography images b and d the enhanced images by the Chambolle method

Line profiles across the images were used to quantify the level of contrast enhancement achieved on the reconstructed image relative to the same on the original radiographic images, Fig. 6. The line profiles span from DIQI regions and along the lines AB and A1B1. Comparison of pixel values along the scanned lines showed that the peak difference across the profile increased almost by a factor of about 3.5 on the processed images than it did on the original radiograph. It was also noted that the visual quality of the enhanced image is considerably better than the original image.

Fig. 6
figure 6

The plotted profiles in the DIQI region of Fig. 5c and d (lines: AB and A1B1) for the original radiograph (dashed-black line) and the enhanced image by Chambolle method (solid-red line)

It was also possible to determine the achievable improvement in the quantification of the defect dimensional characteristics of the processed images by referring back to the known values of the standard defects from the ‘Sonaspection kit’ for each object. To measure the defects from radiographic images and the enhanced images, we used the actual value of the Duplex Image Quality Indicator (DIQI) and compared the pixel of defect regions and DIQI region to the size of IQI. The measurements were repeated five times by an experienced operator. The real and measured size of the defect regions and their standard division are shown in Table 1. The results from the Chambolle based method were found to be remarkably close to the actual values of the defect dimensions.

Table 1 The results of the measurement of the defect lengths

The image processing algorithm described above was found to be quite efficient with runtimes for an image of 564 × 304 pixels, on a PC with an Intel Core-i7 microprocessor in Ubuntu of about 2.1 s, suggesting the applicability of the technique to living systems of NDT analysis.

3.2 A Comparative Study with Other TV-Based Methods

For a complete survey of the proposed method, a comparative study with some other similar processing methods has been carried out. We compare the results of the three methods based on total variation with different minimizer. These methods were Rudin ROF-TV, Non-convex p-norm Total Variation (NCP-TV), and Non-convex logarithm-based Total Variation (NCLog-TV). These methods have been used for flaw detection in the radiography of welded object from GDX-ray database [8, 18]. Three algorithms are executed for the radiography image of the mentioned objects in Fig. 1 and the processed images by three algorithms were shown in Fig. 7. Almost four double lines of the duplex-IQI (DIQI) lines can be seen in all processed images in Fig. 7. It seems that the ROF-TV method has a sharper edges than NCP-TV and NCLog-TV methods. The measured defect sizes are recorded in Table 2. Comparing the results show that Chambolle methods are more similar to ROF-TV in term of measured defect sizes. The computational times and number of input parameters were compared in Table 3. According to Table 2, in comparison with NCP-TV and NCLog-TV, the Chambolle and ROF-TV methods are more user-friendly (due to the small number of input parameters) and easy to implement. Besides, The Chambolle method is more efficient in terms of computational time. Also, the comparison of Fig. 4d to Fig. 6a shows that less artifact can be seen in the processed image by the Chambolle method.

Fig. 7
figure 7

the processed images by a ROF-TV, b NCP-TV and c NCLog-TV methods

Table 2 The measured size of different defects by ROF-TV, NCP-TV, NCLog-TV methods, in comparison with the measured size by caliper and Chambolle method
Table 3 Comparison of different parameters in the mentioned method

3.3 The Radiography Experts’ Interpretation

As a final approach for analyzing the obtained results, the processed radiography images have been interpreted by some radiography experts. The original radiograph and reconstructed images with the Chambolle method and three TV-based methods of NCP-TV method, NCLog-TV method, and ROF-TV method were reviewed and evaluated by five Level-2 experienced radiographers. The results of their opinions showed that they confirm that the reconstructed images can be as an auxiliary tool for the clearer edge and structure of the defects. In Table 4, the percentage given scores are shown for the different regions of radiographs. Scoring is given according to 5 to 1 for excellent, very good, good, fair, and poor. The results of Table 4 showed that all defect regions have a better contrast in the reconstructed images in comparison with the original radiographs. Other interested regions are IQI, DIQI and that have better visualization in the reconstructed images with the percentage of scores up to 90%. Also, the IQI lines were not visualized in all images and the original radiography images, only the mark of IQI can be seen. Furthermore, the results of the table show that increasing the detection rates for the lead letter almost same for four mentioned algorithms. The calculated standard deviation was written in parentheses.”

Table 4 Comparison of the Chambolle method with three TV-based methods of NCP-TV method, NCLog-TV method, and ROF-TV method

4 Conclusion

In this study, the dimension measurement of the cracks and other defects in radiography images have been improved by a TV based image processing methods, i.e.”Chambolle’s Projection Approach”. The described Chambolle algorithm and ROF-TV, NCP-TV and NCLog-TV methods were successfully applied to the standard X-ray radiographs of Sonaspection inspection training kit specimens to obtain enhanced visualization and quantification of defect dimensions. The results showed that using processed images obtained by subtracting the Chambolle method methods generated background image, from the original radiographs, significantly improved both the detectability and dimensions of defects in known specimens. Also, the results show that measured size of defects in Chambolle method are more similar to ROF-TV method. Chambolle method has the least computational time due to parallel execution and has a very quick convergence.