1. Introduction
The goal of image enhancement is to highlight useful information and remove useless information, that is to say, we hope that the edges are sharpened and the noises are suppressed [1-3]. Since the noise and edge are mainly concentrated in the high frequency component of image, it is difficult to denoise the noise and sharpen the edge simultaneously.
As is known to all, the partial differential equation has been widely used in image processing [4,5]. Introduced the anisotropic diffusion concept into the thermal diffusion equation, the PM model [6] is extensively used in image enhancement. Since its diffusion rate is only controlled by image gradient magnitude, the image edges are blurred. Luo et al. [7] proposed the coupled anisotropic diffusion model, but the model particularly relies on the artificial experience and the image weak edges are lost. Nadernejad [8] presented an improved image enhancement method using relaxed geometric mean filter. Though its edge preserving ability is strong, the block effect on image is introduced. For the first time, Osher and Rudin [9] put forward the shock filter model to enhance the image edge features. The anisotropic diffusion with shock filter model (ADSFM) was presented by Alvarez and Mazorra [10], combined the shock filter model and PM model. However, the block effect is prone to occur in the processed image. Fu et al. [11] put forward the coupled bidirectional flow model (CBDFM), but it causes the ringing effect at the image edge. The adaptive bidirectional diffusion filter model (ABDFM) was proposed by Xiong et al. [12]. Though the ABDFM model avoids the ringing effect, the image weak edges are lost.
In order to solve the edge ringing or block effect caused by the partial differential diffusion, in this paper, the image is partitioned into three areas: the edge region, flat region, and isolated noise region. On the base, the image can be further described as the non-edge and edge areas with different features, then we propose a new image enhancement method, which is based on bidirectional diffusion with local feature. The comparison experiments indicate that our method possesses better ability for denoising and preserving edges in defect image, which make the image contrast more obvious.
The remainder of this paper is organized as follows. In Section 2, the partial differential diffusion concept is reviewed. Our method is proposed in Section 3 and its performance is validated in Section 4. Section 5 gives a summary
2. Partial Differential Diffusion Model
2.1 PM Model
The linear scale space concept-based nonlinear anisotropic diffusion model was presented by Perona and Malik [6] (PM model), which was defined as follows.
where[TeX:] $$d i v, \nabla \text { and } u^{0}$$represent the divergence operator, gradient operator and original image, respectively. is the monotonic decreasing function, shown in the formula (2) or (3). The smaller a pixel’s gradient magnitude is, the larger the pixel's diffusion coefficient is, and vice versa.
where TH is the global image gradient threshold,[TeX:] $$\nabla u$$is the image gradient vector. Although the PM model is used to preserve the image edges and suppress the image noises, it still has two main problems. One problem is that when the noise belongs to the region with intense gray value change, it cannot be suppressed effectively, the other problem is that the single threshold TH causes the image nonuniformity.
2.2 Anisotropic Diffusion with Shock Filter Model
Since the flat region, isolated noise region and edge region in image have different pixel intensity and spatial features, Osher and Rudin [9] proposed the shock filter model, which is expressed by the formula (4), to highlight the image detail. In the shock filter model, the backward diffusion was first introduced to enhance the image edges, which reduced the image edge blurring caused by the forward diffusion.
where[TeX:] $$sign$$defines the symbolic function, and[TeX:] $$u_{N N}$$represents the second order derivative along image gradient direction.
In order to further lessen the edge blurring, the ADSFM was presented by Alvarez and Mazorra [10], shown in the expression (5).
where[TeX:] $$G_{\sigma}$$is defined as the Gaussian function with standard deviation, is regarded as the smoothing factor, and[TeX:] $$u_{T T}$$represents the second order derivative along image edge direction. In the right side of the expression (5), the first item is used to sharpen the image edges and the second item is adopted to smooth the image noises. However, the artificial saw-tooth phenomenon is generated in the processed image since the inconsistent diffusion rates of edge pixels possessing the same attributes.
2.3 Bidirectional Diffusion Model
Introducing the image structure information into the ADSFM, Fu et al. [11] proposed the CBDFM. The CBDFM was defined by the formulas (6) and (7), and the corresponding diffusion coefficients were expressed in Table 1.
where[TeX:] $$\mathcal{C}_{N}$$is the diffusion coefficient along image gradient direction,[TeX:] $$C_{T}$$is the diffusion coefficient along image edge direction, th represents the hyperbolic tangent function,[TeX:] $$T_{1} \text { and } T_{2}$$are the image gradient thresholds, k is the image level-set curvature,[TeX:] $$l_{1} \text { and } l_{2}$$are the accommodation coefficients.
Although the CBDFM smooths the image noises and sharpens the image edges better, it not only increases the computational complexity but also introduces the image ringing effect. Introducing the Laplacian rotation invariance, Xiong et al [12] simplified the CBDFM and then proposed the ABDFM, indicated by the formulas from (8) to (10).
where and represent the forward diffusion rate and backward diffusion rate, respectively. represents the Laplacian operator. If the image pixel gradient magnitude is smaller than the global threshold TH, the homogeneous diffusion is carried out on the image datum while the image pixel gradient magnitude is greater than the TH, the nonhomogeneous diffusion is implemented on the image datum. Although the ABDFM model reduces the image ringing effect, the single threshold TH causes the weak edge loss.
3. Local Feature-based Bidirectional Diffusion Model
The aim of image enhancement is to highlight the image details. In this paper, we present a new image enhancement method which is based on bidirectional diffusion. The proposed algorithm flow is described as follows. First, according to the image pixel’s neighborhood intensity and spatial characteristics, it is determined that the pixel is a non-edge point or an edge point. Second, in the different pixel’s characteristic regions of the defect image, the different diffusion criteria are chosen, that is, the non-edge region is denoised by the forward diffusion along the pixel’s gradient direction and edge direction while the edge region is sharpened along the pixel's gradient direction by the backward diffusion and is smoothed along the pixel’s edge direction by the forward diffusion. Third, the pixel grayscale is adjusted by the proposed bidirectional diffusion function to achieve the defect image enhancement. Therefore, the bidirectional diffusion-based image enhancement algorithm is implemented as follows.
A 3×3 neighborhood window.
Here[TeX:] $$u(i, j)$$indicates the pixel grayscale corresponding to the image plane coordinate[TeX:] $$(i, j)$$and the pixel’s neighborhood window is defined as 3×3 size, shown in Fig. 1. For[TeX:] $$u(i, j)$$, its gradient magnitude is computed by Eq. (13) and its gradient direction is expressed by the formulas (14). Provided that a pixel is regarded as an edge point, two conditions should be satisfied simultaneously. First, the pixel must be a salient point. Second, in the pixel’s neighborhood window, other pixels have the same gradient direction as the pixel.
In this paper, in order to represent the local feature of the defect image, p is defined as a pixel’s gradient magnitude to its neighborhood median ratio, shown in the formula (15).
where T represents the pixel's neighborhood median, and[TeX:] $$\varepsilon$$is any small constant.
In a pixel’s flat region, p is relatively small since the pixel’s gradient magnitude closes to zero, but p is relatively large in the pixel’s edge region or isolated noise region. If p is greater than the global image saliency threshold , the pixel can be judged as a salient point. Then, in the neighborhood of the salient point, if other pixels have the same gradient direction as the salient point, the salient point is determined as an edge point. On the contrary, the pixel is judged as a non-edge point. Therefore, combined with the pixel’s edge statistical information, a new bidirectional diffusion-based image enhancement model is presented, which is indicated by Eq. (16).
where G are the pixel's gradient magnitude calculated by the formula (13), symbol is the pixel’s edge denoter, and are the weighting diffusion coefficients.
If symbol is equal to 1, the pixel’s neighborhood window is determined to be in the image edge region, then the backward diffusion is used to sharpen along the pixel’s gradient direction and the forward diffusion is used to smooth along the pixel's edge direction while symbol is 0, the pixel’s neighborhood window is regarded as the image flat area or noise area, the forward diffusion is adopted for smoothing the region along the pixel's gradient direction and edge direction.
4. Experimental Analysis
In this paper, the MATLAB 2014b is selected as the simulation tool and the comparison experiments are implemented in the delamination, inclusion, channel, shrinkage, blowhole and crack defect images on aviation components to validate our method performance.
In this paper, the PM model, ADSFM, CBDFM, ABDFM and our method are respectively used to enhance the defect images and their experimental results are shown in Figs. 2–7. In our algorithm, the parameter definitions of TR, and are derived from the statistics of the following optimal experiment results. Here TR is set to 0.05, and are 0.015 and 0.03, respectively. In the meantime, for the PM model, ADSFM, CBDFM and ABDFM, their parameter values are from these cited papers to obtain their optimal enhancement images.
As seen from Fig. 2(b) to Fig. 7(b), the image edges are blurred and the image ringing effects are generated, especially from Figure 3 (b) to Figure 6 (b). As shown from Fig. 2(c) to Fig. 7(c), the image block effects are obvious. As seen from Fig. 2(d) to Fig. 7(d), the salt and pepper noises appear. As shown from Fig. 2(e) to Fig. 7(e), the artificial saw-tooth phenomena occur as well, especially from Fig. 4(e) to Fig. 7(e). However, as seen from Fig. 2(f) to Fig. 7(f), in the aspects of the image blocking, saw-tooth and edge ringing suppression, our proposed method has better performance trade-offs.
Enhancement comparisons of the delamination defect image: (a) original image, (b) PM model, (c) ADSFM, (d) CBDFM, (e) ABDFM, and (f) our algorithm.
Enhancement comparisons of the inclusion defect image: (a) original image, (b) PM model, (c) ADSFM, (d) CBDFM, (e) ABDFM, and (f) our algorithm.
Enhancement comparisons of the channel defect image: (a) original image, (b) PM model, (c) ADSFM, (d) CBDFM, (e) ABDFM, and (f) our algorithm.
Enhancement comparisons of the shrinkage defect image: (a) original image, (b) PM model, (c) ADSFM, (d) CBDFM, (e) ABDFM, and (f) our algorithm.
Enhancement comparisons of the blowhole defect image: (a) original image, (b) PM model, (c) ADSFM, (d) CBDFM, (e) ABDFM, and (f) our algorithm.
7. Enhancement comparisons of the crack defect image: (a) original image, (b) PM model, (c) ADSFM, (d) CBDFM, (e) ABDFM, and (f) our algorithm.
In order to further evaluate the performances of the above-mentioned five algorithms, the peak signal-to-noise ratio (PSNR) and Global Structural Similarity Index (GSSI) are selected as the parameter indexes [13,14], defined by the formulas (18) and (19), respectively. The smaller the GSSI, the worse the image structure preservation, and the larger the PSNR, the better the noise removal.
According to the different defect images, the PSNR and GSSI of the corresponding enhanced images are shown in Tables 2 and 3.
As seen in the PSNR of Table 2 and the GSSI of Table 3, the two parameter indexes, acquired by adopting our proposed algorithm, are greater than by using other four models. It is indicated that the abilities of the noise suppression and the edge preservation are better than other four models.
PSNR (dB) of the corresponding enhanced images from Fig. 2 to Fig. 7
GSSI of the corresponding enhanced images from Fig. 2 to Fig. 7
5. Conclusions
Image enhancement is to highlight useful image information and remove useless image information, which are conducive to the analysis and treatment task of human or machine. Aiming at the image enhancement problem of edge ringing or block effect caused by the partial differential diffusion, a bidirectional diffusion-based image enhancement method is presented. Through using this model, the image edge region can be sharpened and the image flat region or isolated noise region can be smoothed. The focus of defect the image enhancement in this paper is to determine a pixel’s neighborhood intensity and spatial characteristics, then to adopt different diffusion criteria for the pixel’s edge or non-edge regions, that is to say, the backward diffusion along the pixel’s gradient direction and the forward diffusion along the pixel’s edge direction are used for the pixel’s edge area to sharpen while the forward diffusion in the pixel’s gradient direction and edge direction is adopted for the pixel’s non-edge area to smooth. Compared with other models, the experiment comparisons show that our method not only enhances the image edge better but also improves the image contrast better.
Acknowledgement
This work was partially supported by the Postdoctoral Science Foundation of China (No. 2017M 622108) and the Open Fund for Water Information Cooperative Sensing and Intelligent Processing of Jiangxi Province Key Laboratory, China (No. 2016WICSIP007).