Next Article in Journal
On the Existence of Independent [j,k]-Dominating Sets in the Generalized Corona of Graphs
Previous Article in Journal
Ultrafast Synthesis of Mo2C-Based Catalyst by Joule Heating towards Electrocatalytic Hydrogen Evolution Reaction
Previous Article in Special Issue
Symmetries of Scan Patterns of Laser Scanners with Rotational Risley Prisms
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

State-Aware High-Order Diffusion Method for Edge Detection in the Wavelet Domain

Institute of Digital Media and Communications, School of Applied Science, Taiyuan University of Science and Technology, Taiyuan 030024, China
*
Author to whom correspondence should be addressed.
Symmetry 2023, 15(4), 803; https://doi.org/10.3390/sym15040803
Submission received: 24 January 2023 / Revised: 9 March 2023 / Accepted: 23 March 2023 / Published: 25 March 2023
(This article belongs to the Special Issue Advance in the Applied Optics with Symmetry/Asymmetry)

Abstract

:
This paper addresses how to use high-order diffusion to restore the wavelet coefficients in the wavelet domain. To avoid image distortion, wavelets with symmetry are used for image decomposition to obtain the wavelet coefficients of each sub-band. Due to the influence of noise, it is particularly important to obtain the wavelet coefficients, which can accurately reflect the image information. According to the characteristics of wavelet threshold shrinkage and the advantages of the high-order variational method in denoising, a wavelet coefficient restoration scheme is proposed. The theoretical basis of our proposed method is established through the analysis of wavelet threshold theory. To keep the original structure of wavelet coefficients unchanged, we introduce the concept of state quantity of wavelet coefficients and obtain the corresponding state quantity of wavelet coefficients using normalization. The denoising wavelet coefficient is obtained by performing a fourth-order anisotropic diffusion of the state quantities. This paper takes image edge feature extraction as the experimental content and image edges are detected by the module of the wavelet coefficients. The effectiveness of the proposed algorithm is objectively verified from three aspects: denoising effect, edge continuity, and accuracy. The experimental results show that the proposed algorithm can obtain continuous and precise image edges. The algorithm presented in this paper also applies to texture images. Compared with other algorithms, the edges image obtained by this scheme shows advantages in terms of noise removal and edge protection.

1. Introduction

As a real-time image processing technology, wavelet transform and multi-scale transform based on the wavelet transform have received extensive attention [1,2,3,4]. The wavelet transform occupies an essential theoretical and practical position while it is one of the main methods used in image processing. The advantages of wavelet theory are reflected in the time-frequency and multiresolution characteristics, which can present texture and structure information at various resolution levels. In recent years, many scholars have devoted themselves to wavelet transform research and applied it to multiple aspects of image processing technology, including image denoising, image restoration, image segmentation, and edge detection [5,6,7,8,9,10,11]. Generally, an image is decomposed by wavelet transform to obtain the corresponding low-frequency and high-frequency coefficients. These coefficients reflect the details of the image, such as edges and textures. Zhang et al. used the low-frequency and high-frequency coefficient images generated by multi-wavelet transform to learn more powerful prior information, ensuring that the deep learning network provided by them can obtain better image restoration effects [10]. Based on the combination of Haar wavelet and two-dimensional discrete wavelet transform, Wang et al. proposed a watermark embedding and extraction technique for color images [11]. Making full use of the wavelet coefficients to reflect the image details is an essential factor for these methods to obtain a better processing effect. Due to the presence of noise, the critical aspect of image processing technology based on wavelets is how to obtain the wavelet coefficients that accurately reflect the information of a given image.
Wavelet shrinkage can efficiently acquire the low-frequency and high-frequency coefficients for the image with noise [12,13,14]. However, the shrinkage of wavelet coefficients makes the reconstructed image produce a pseudo-Gibbs phenomenon near the edges. To improve the application effect of wavelet transforms in image restoration, edge detection, and other technologies, it is of great practical significance to study how to obtain more wavelet transform coefficients that can accurately reflect image information.
The nonlinear diffusion methods have been widely used in image processing through partial differential equations (PDEs). Such methods use a piecewise continuous function to approximate the actual signal in an image. PDE-based denoising models mainly include second-order and high-order models (mainly fourth-order models). Examples include the total variation model [15], the Perona–Malik model [16], and anisotropic diffusion models [17,18,19,20,21,22,23]. These second-order models easily produce so-called blocky effects in the smooth regions of denoised images. Image-denoising methods based on high-order PDEs have been widely studied to overcome this shortcoming, such as the YK model [24], the LLT model [25], and the model proposed by Hajiaboli [26]. Recently, some new models have been developed [27,28,29,30,31,32]. Although high-order diffusion easily causes edge blur and makes the smooth area of an image uneven because of over-smoothness, the fourth-order models have achieved good results in removing noise and protecting edges.
This paper attempts to find a way to obtain effective wavelet coefficients and give a good theoretical explanation. First, wavelet transform is performed on the examined image to obtain the coefficients of each sub-band, and the image information mainly focuses on the high-frequency part. Due to the influence of noise, the high-frequency wavelet coefficients need to be denoised. Secondly, based on state weights, we normalize the high-frequency coefficients to obtain the corresponding continuous state weights. To eliminate the effect of noise on the high-frequency coefficients, we perform fourth-order anisotropic filtering on the state weights. Finally, by applying accurate state weights to the corresponding high-frequency wavelet coefficients, we can obtain denoised high-frequency wavelet coefficients. Because the noise is effectively suppressed, the high-frequency wavelet coefficients we obtained can not only accurately reflect the texture details of the image but also maintain the edges of the image nicely, which provides good help for the subsequent image processing method combined with wavelet transform.
This article is arranged as follows. In Section 2, we briefly introduce two methods commonly used in image denoising: wavelet shrinkage and PDE-based diffusion filtering. Section 3 describes methods for recovering wavelet coefficients that obtain an accurate reflection of image information.
This method is based on the wavelet shrinkage theory and the fourth-order anisotropic diffusion filter. In Section 4, numerical experiments are carried out, and the experimental results are analyzed from subjective and objective viewpoints. Finally, we present the conclusion of this article in Section 5.

2. Mathematical Framework

2.1. Wavelet Shrinkage Method

The wavelet shrinkage method is widely used in image restoration technology. The primary purpose of this method is to accurately find the wavelet coefficients of an image relative to the noise. The principle of the wavelet shrinkage method is to perform a wavelet transform on the studied image to obtain wavelet coefficients. The wavelet coefficients with the smaller amplitude are generated by the energy of noise, while the larger amplitudes are deemed to be generated by the energy of the signal itself. Then, an appropriate threshold value is selected to remove the noise by specifying wavelet coefficients lower than the threshold value to achieve denoising [12,13,14]. The wavelet coefficients of different sub-bands are obtained by wavelet transform so that the signal can be represented by wavelet coefficients at different scales. In practical applications, the study of the discrete wavelet transform (DWT) is of great practical significance. f represents a one-dimensional signal, φ is a scaling function, and ψ is a wavelet function. Given the orthogonal wavelet, the DWT is expressed as
f = i Z f , φ i n φ i n + j = n i z f , ψ i j ψ i j
where ψ i j ( x ) : = 2 j / 2 ψ ( 2 j x i ) and f L 2 ( R ) . If the signal f contains Gaussian white noise, all wavelet coefficients f , ψ i j after the wavelet transform also contain noise, and we need to determine the effective wavelet coefficients that constitute the signal. Therefore, according to the denoising idea of the wavelet shrinkage method, the following three steps are performed to restore the original signal:
1. Analysis: A wavelet transform is applied to the noisy signal f , and the wavelet coefficients d i j = f , ψ i j and scaling coefficients c i n = f , φ i n are obtained based on (1).
2. Shrinkage: Nonlinear threshold processing is performed on the wavelet coefficients by using the shrinkage function S θ with a threshold parameter θ , i.e., d ˜ i j = S θ ( d i j ) = S θ ( f , ψ i j ) .
3. Synthesis: The scale coefficients are reconstructed, and the wavelet coefficients are processed by the threshold to obtain the recovered signal u .
u : = i Z f , φ i n φ i n + j = n i z S θ ( f , ψ i j ) ψ i j
From (1) and (2), there are two important choices in the wavelet shrinkage method: one is the wavelet function, and the other is the threshold function. The selection of wavelet function mainly considers its symmetry, regularity, and compact support. The wavelet with symmetry, whose corresponding filter has the characteristic of linear phase, can effectively avoid phase distortion in image processing. The higher the regularity, the smoother the wavelet basis function and the more stable the reconstruction of wavelet coefficients. Moreover, the wavelet basis function with compact support has a fast convergence speed and a strong localization ability, which is beneficial to determine the abrupt point of the image. For the threshold function, if the selected threshold is small, some noise will be preserved as image information. The image will still contain more noise after denoising, and the denoising effect will not be ideal. If the selected threshold is large, although more noise can be removed, some of the detailed features in the image will also be filtered out, causing the image to blur. Therefore, the threshold needs to be determined according to the magnitude of the noise. The most commonly used shrinkage functions are hard and soft thresholding functions.
A. Hard shrinkage
d ˜ i j = S θ ( d i j ) = { d i j | d i j | θ 0 | d i j | < θ
B. Soft shrinkage
d ˜ i j = S θ ( d i j ) = { s i g n ( d i j ) ( | d i j | θ ) | d i j | θ 0 | d i j | < θ
where θ = σ 2 ln N , σ is the standard deviation of the noise, and N is the scale or length of the signal.

2.2. PDE-Based Diffusion Method

Nonlinear diffusion has a significant influence on image processing. It utilizes a piecewise continuous function to approach the real image signal by the PDE. Unlike general linear diffusion, nonlinear diffusion not only smooths the image but also preserves its edges and details well. According to this property, many scholars have conducted extensive research on both the theoretical analysis and applications of PDEs in image processing. An anisotropic diffusion model (P-M model) introduced by Perona and Malik [16] can retain the edge features of an image by replacing the Gaussian smoothing filter with a directional heat diffusion equation. The P-M model is represented as follows.
u t = d i v [ g ( | u | ) u ]
where u denotes the noisy image, t denotes time. and d i v represent the gradient operator and divergence operator, respectively. g ( ) is a non-negative decreasing diffusion function. Perona and Malik provided two diffusion functions.
A .   g ( | u | ) = e ( | u | / k ) 2   B .   g ( | u | ) = 1 1 + ( | u | / k ) 2
where k is a parameter used to control the diffusion extension. k can be pre-set or can be changed as a result of each iteration. You et al. [13] obtained the solution of (5) by minimizing the following energy function.
E ( u ) = Ω f ( | u | ) d x d y
where f ( ) is a non-negative function and f ( 0 ) = 0 . The P-M model can effectively remove noise without blurring image edges by minimizing the energy functional in (6).
An adaptive TV variational model was introduced by Strong [33] to improve the edge detection effect, as follows
E ( u ) = min Ω g ( x ) | u | + λ 2 Ω ( u u 0 ) 2 d x
where g ( x ) is an edge-stopping function that can adaptively control the degree of diffusion. In [29], g ( x ) is defined as
g ( x ) = 1 1 + K | G σ u 0 | 2
where G σ represents the Gaussian filter and σ is the standard deviation of the noise. Since these schemes perform diffusion faster in smooth areas, they are prone to blocky effects. To overcome this shortcoming, image restoration techniques based on high-order PDEs (especially fourth-order PDEs) have been widely studied [24,25,26,27,28,29,30,31,32]. In 2000, a classical fourth-order diffusion scheme was proposed by You and Kaveh [24], and this scheme minimizes the following functional:
E ( u ) = Ω f ( | 2 u | ) d x d y
where 2 denotes the Laplacian operator and | 2 | = | u x x + u y y | . The function f ( ) 0 is an increasing function. Different from the second-order diffusion model, the fourth-order model uses | 2 u | instead of | u | to detect the smoothness of an image. Therefore, image smoothing is equivalent to finding the unique minimum value of the energy functional. The fourth-order PDE corresponding to Equation (9) can be obtained by gradient descent. The expression is depicted as
u t = 2 [ g ( | 2 u | ) 2 u ]
In 2003, Lysaker et al. proposed another classical fourth-order denoising model (LLT) [25]; the paper presented two representations of the Laplacian operator and used them as smoothing operators to process the studied images. These models can reduce image noise while relieving the staircase and blocky effects by using the Laplacian operator. However, these fourth-order PDEs easily produce speckle noise and edge blur in the restored images. Considering these issues, Hajiaboli [26] presented an anisotropic fourth-order diffusion model that performs different degrees of diffusion in the level set and gradient directions. ξ and η represent vectors in the level set direction and gradient direction, respectively. They can be expressed as
ξ = [ u y , u x ] | u |     η = [ u x , u y ] | u |
The anisotropic fourth-order diffusion formulated by Hajiaboli can be presented as
u t = 2 ( c ( | u | ) 2 u η η + c ( | u | ) u ξ ξ )
u η η is the second derivative of the image in the gradient direction. u ξ ξ is the second derivative in the direction orthogonal to the gradient. c ( · ) is a diffusivity function.
c ( | u | ) = k 2 / ( k 2 + | u | 2 )
u η η = u x 2 u x x + u y 2 u y y + 2 u x u y u x y | u | 2     u ξ ξ = u x 2 u y y + u y 2 u x x 2 u x u y u x y | u | 2
The model performs different degrees of diffusion in different directions: in the flat region, in the directions of the gradient and the level set, the diffusion coefficients are relatively close, and at the edge of the image, the diffusion coefficient in the gradient direction is always less than the diffusion coefficient in the level set direction. Therefore, anisotropic diffusion is performed on the image. The diffusion method improves the ability of a PDE-based model to remove noise and protect the edges of the image while also leading to a relative reduction in speckle noise. However, due to the uneven diffusion of the model in the gradient direction and level set direction, the denoised image will appear uneven, reducing the image quality.

3. State-Aware Wavelet Coefficients Acquisition Method Based on Anisotropic Fourth-Order Diffusion

3.1. The Equivalent Expression of the Proposed Method

In recent years, image restoration technology combining wavelets and nonlinear diffusion has attracted much attention [34,35,36,37,38,39,40]. These methods are based on second-order diffusion in the wavelet domain. To obtain the recovered image from accurate wavelet coefficients, in this section, we present a continuous state wavelet shrinkage method based on nonlinear fourth-order diffusion. This method has a good theoretical explanation. Specifically, the main idea of our scheme is based on the two-state denoising method. Denoised wavelet coefficients are obtained by performing anisotropic diffusion on the state weights, and the wavelet coefficients can be used to further improve image restoration and edge detection.
Based on the idea of state weight, we analyze the wavelet-based hard thresholding method theoretically and give an equivalent expression for hard thresholding in the form of state weight. First, we perform discrete wavelet transform (DWT) on noisy images to obtain the wavelet coefficients d j , k . Based on the size of the wavelet coefficients d j , k , we determine the state of each wavelet coefficient. That is, when | d j , k | λ is satisfied, the state of the wavelet coefficient is 1, while when | d j , k | < λ , the state of the wavelet coefficient is set to be 0. Thus, we obtain the state quantity v j , k λ corresponding to all the wavelet coefficients.
v j , k λ = { 1 | d j , k | λ 0 | d j , k | < λ
where λ is the threshold. Second, according to the state of the wavelet coefficients, the weights w j , k λ can be determined.
w j , k λ = { 1 v j , k λ = 1 0 v j , k λ = 0
Finally, weights are applied to the wavelet coefficients.
w j , k λ ( d j , k ) = { d j , k | d j , k | λ 0 | d j , k | < λ
The restored image is constructed by the denoised wavelet coefficients. We call the above denoising method a two-state weight denoising method, which happens to be a wavelet-based hard thresholding method. The two-state weight denoising method can remove noise well, but since there are only two states for the wavelet coefficients, which belong to the discrete state, it causes the ringing and pseudo-Gibbs phenomena. To this end, a continuous state weights denoising method is further proposed.
Since noise is mainly distributed in the high frequencies of an image, according to Section 2.1, the high-frequency subbands of the first layer after performing wavelet transform are HL subbands, LH subbands, and HH subbands, and the corresponding wavelet coefficients of these subbands are d 11 , d 12 , and d 13 , respectively. Then, we normalize the wavelet coefficients d 11 , d 12 , and d 13 , and the continuous state v j , k is obtained.
v j , k = d j , k min d j , k max d j , k min d j , k
In (17), on the one hand, v j , k is obtained by the normalization of wavelet coefficients and, thus, can maintain some structural properties of the image; on the other hand, the state variables cannot be accurately estimated due to the presence of noise. Then, under the premise of maintaining the structure of the state variables, nonlinear diffusion is implemented to remove the noise effectively. Thus, more accurate state variables are obtained.
We use the diffusion method proposed by Hajiaboli to diffuse the state quantity v j , k ; here, we take v 1 , 2 as an example.
v 1 , 2 = Δ d 1 , 2 min d 1 , 2 max d 1 , 2 min d 1 , 2
The x-direction and y-direction have equal steps Δ x = Δ y = 1 , where Δ t = τ , v i , j n is an approximation of v 1 , 2 ( i , j , n τ ) . The difference operators are given by
v x x v i , j = ( v i 1 , j v i + 1 , j ) / 2                 v y y v i , j = ( v i , j 1 v i , j + 1 ) / 2 v x x x x 2 v i , j = v i 1 , j + v i + 1 , j 2 v i , j                 v y y y y 2 v i , j = v i , j 1 + v i , j + 1 2 v i , j v x y x y 2 v i , j = ( v i 1 , j 1 + v i + 1 , j + 1 ) / 4 ( v i 1 , j + 1 + v i + 1 , j 1 ) / 4
Thus, the gradient magnitude can be expressed as
Λ i , j = ( x v i , j ) 2 + ( y v i , j ) 2
For Equation (13), η η 2 and ξ ξ 2 can be used to derive the corresponding discrete approximation expressions via the above difference operators. Utilizing Equation (11) for the diffusion of v 1 , 2 , the difference equation is given by
v i , j n + 1 = v i , j n τ [ x x 2 ( c ( Λ i , j n ) 2 η η 2 v i , j n + c ( Λ i , j n ) ξ ξ 2 v i , j n ) + y y 2 ( c ( Λ i , j n ) 2 η η 2 v i , j n + c ( Λ i , j n ) ξ ξ 2 v i , j n ) ]
In this way, the noise can be removed, and the edge can be protected while a more accurate state variable v ˜ j , k can be obtained. Next, the value of the continuous state weight coefficients w j , k can be calculated according to the value of v ˜ j , k .
w j , k = v ˜ j , k
By a similar method, the corresponding weights w j , k of each high-frequency sub-band are obtained for the wavelet decomposition layer. Then, by applying w j , k to the wavelet coefficients of the corresponding high-frequency sub-bands, the denoised wavelet coefficients are obtained, and their structure remains unchanged. The above methods can be expressed as
d ˜ j , k = w j , k ( d j , k )
where d ˜ j , k denotes the denoised wavelet coefficients.
Based on the above analysis, our proposed wavelet coefficient acquisition algorithm can be summarized as follows, where 2-scale wavelet decomposition is taken as an example.

3.2. The Implementation Steps

The steps of our proposed method are as follows:
Step 1. The noise image is decomposed by a 2-scale wavelet, and the L L 1 , 2 , L H 1 , 2 , H L 1 , 2 , and H H 1 , 2 sub-bands are obtained.
Step 2. The high-frequency coefficients of L H 1 , 2 , H L 1 , 2 , and H H 1 , 2 are normalized by Equation (17) to obtain the corresponding continuous state variables v j , k .
Step 3. The fourth-order diffusion method is conducted on the state quantity v j , k according to Equation (20).
Step 4. By using Equation (21), the weight coefficients w j , k are obtained as determined by v ˜ j , k .
Step 5. By using Equation (22), w j , k is applied to the high-frequency wavelet coefficients.
At this point, the wavelet coefficients that remove the noise and can reflect the image features are obtained.

4. Numerical Experiments

The wavelet coefficients can better reflect the edge and detail information of the image, so we study the edge information of the image to reflect the effectiveness of the wavelet coefficients obtained by our proposed method. In this paper, the mode of the wavelet coefficients is used to get the edge information of the image. The module of the wavelet coefficients is defined as
M u ( x , y ) = ( d j , H 2 + d j , V 2 + d j , D 2 ) 1 / 2
According to Section 2.1, we obtain the wavelet coefficients d j , k by discrete wavelet transform of the noise image u ( x , y ) , j represents scale. The edge information and noise are mainly concentrated in the high-frequency subbands, thus d j , H , d j , V , and d j , D represent the horizontal, vertical, and diagonal high-frequency wavelet coefficients, respectively.
In many high-order diffusion models, the edge is detected by using the diffusion function composed of the module of the image gradient (see Equations (5) and (12)) or the module of the gradient of the image convolved with a Gaussian function (see Equation (8)). The gradient is easily disturbed by noise, which affects the detection of image edge information. We further illustrate the effectiveness of our method by comparing it with three commonly used edge detection operators, including the module of the gradient, the module of the gradient of the image convolved with a Gaussian function, and the module of the unprocessed wavelet coefficients. Canny is the most commonly used edge detection operator. In recent years, many scholars put forward many edge detection algorithms based on the Canny operator [41,42]. We select [41] for experimental verification.
This paper does experiments on images with rich texture details. We use the Figure 1 standard image for our experiments and give detailed experimental results. Daubechies (dbN) wavelet has advantages in symmetry, regularity, and compact support. At the same time, the support length of the dbN wavelet is 2N − 1, and the support length of the wavelet in most applications is generally between 5 and 9. Therefore, so we choose N = 3, namely db3 wavelet, as the wavelet base for the experiments. To obtain the initial wavelet coefficients, we use db3 to perform two-layer wavelet decomposition for the edge detection method based on the module of the wavelet coefficients. According to the following figures and tables, we compare and analyze the effects of several edge detection algorithms from the visual aspects and evaluation indicators.

4.1. Visual Comparison

We divide the experiment into three groups. First, we perform experiments on the original acquisition images in Figure 1. Richly detailed images “airplane” and “flower” are used for the demonstration experiments, as shown in Figure 2a and Figure 3a. Figure 2b and Figure 3b show the edge detection results obtained by using the gradient detection method. The image edges or texture details detected by the gradient detection method are blurred, such as the edges of the patterns on the wings and the texture on the leaves of flowers are unclear. The experimental effect of the Gaussian smoothed gradient detection method is shown in Figure 2c and Figure 3c, where the clarity of the detected image is improved. However, the edge and texture information of the pattern is still unclear. For the [41] method, the edges of the pattern on the airplane’s wing in Figure 2d are blurred, while false edges are produced in Figure 3d, which affects the visual effect. Moreover, this method has a poor effect on texture detection. Compared with the above three methods, the detection method based on the module of the wavelet coefficients improves the display of the pattern edges and texture details. However, from the experimental results in Figure 2f and Figure 3f, we can see that our proposed method can obtain more apparent pattern edges and details, such as the lines of the pattern on the airplane wing and the texture of the petals.
Second, since most of the images we obtained contain noise, we added Gaussian white noise with standard deviations of 10 and 30 to the test images, respectively. We carry out the demonstration experiments with the images “Toys” and “house”. The “Toys” image with a standard deviation of 10 is shown in Figure 4a, and the “house” image with a standard deviation of 30 is shown in Figure 5a. For the edge detection images obtained by the [41] method, the edges of the baby elephant’s body are missing, and the texture of the bear’s clothes is not well detected in Figure 4b. In Figure 5b, there are spurious and intermittent edges in the detection results of the method described in the literature [41]; for example, the edge of the eaves is as described. Poor noise suppression and the edges of the detected image information are not clear, including the clothes of the bear in Figure 4c and the lines of the eaves in Figure 5c. The Gaussian smoothed gradient detection method suppresses the noise and improves the clarity of the edge of the image, such as the lines of the small elephant body in Figure 4d. However, the texture detection effect of the images is not good. Compared with the Gaussian smoothed gradient detection method, the detection method based on the module of the wavelet coefficients can detect more clear and more continuous image edges. Because the method does not preprocess the decomposed wavelet coefficients, the edge image still contains more noise, as shown in Figure 4e and Figure 5e. The experimental results of our proposed method are shown in Figure 4f and Figure 5f. In the detection results, we can not only see accurate and clear object edges but also see that the proposed method has an obvious noise suppression effect, and the obtained edge image has less noise and high definition. In Figure 4f, the lines and edges of the toy elephant’s body are visible.
Finally, we experiment with the texture-informative image “finger”, which contains noise when acquired, as shown in Figure 6a. As can be seen from Figure 6b,c, the gradient detection method and the Gaussian smoothed gradient detection method are greatly affected by the noise, and the detected edges are blurred. In Figure 6d, pseudo edges and intermittent edges are present in the image obtained by the [41] method. The edges obtained by the detection method based on the module of the wavelet coefficients are presented in lines, which better reflect the edge details of the original image. However, the effect of the noise suppression is not apparent, and the detection results contain noise, as shown in Figure 6e. In Figure 6f, the image detected by our proposed method has good edge continuity and accurate edge positioning, which genuinely reflects the details information of the original image. At the same time, our proposed method can effectively suppress the noise and obtain clear edge images.

4.2. Evaluation Indicators Comparison

Not only are the five edge detection operators comparable in visual effects, but the advantages of our proposed operator in edge detection can also be demonstrated objectively by the given data. In Table 1, Table 2 and Table 3 the performance of the five edge detection operators is objectively compared according to the quality of the detected images.
Due to the presence of noise, the amount of noise in the obtained edge detection images can indicate the level of denoising performance of the different detection algorithms. We utilize two evaluation indicators: the mean squared error (MSE), and peak signal-to-noise ratio (PSNR). The expressions for the relevant definitions are as follows.
M S E ( u , u ¯ ) = 1 M × N i M j N ( u i , j u ¯ i , j ) 2
P S N R = 10 log 10 ( 255 2 M S E )
where u and u ¯ are the restored image and the observed image, respectively. Here, we record the PSNR values for the second set of experimental results, as shown in Table 1.
From Table 1, the noise resistance of the five edge detection algorithms is shown. At the same noise level, the detection images acquired by the gradient detection method contain more noise and have poor noise resistance, with the lowest PSNR values obtained. This result can also be seen through the comparison of average PSNR values. The smoothing effect of the Gaussian smoothed gradient detection method improves the PSNR values. The detection method of [41] has the effect of noise suppression, but the PSNR values obtained are not as good as that of the Gaussian smoothed gradient detection method. Compared with the detection method based on the module of the wavelet coefficients, our proposed method has higher PSNR values, thus enabling the detection images to obtain more precise edges.
To further illustrate the reliability of the algorithm, the edge detection effect is evaluated using the evaluation criteria proposed in [41,42]. The evaluation criteria based on the connectivity components are given in the [41]. Where A represents the total number of detected edge points, that is, the number of pixel values of 1 in the edge image; B represents the number of edge points that meet the 8-connectivity condition. The ratio B/A can represent the edge integrity. The smaller the value, the fewer discontinuity points, the better the edge connectivity, and the higher the edge integrity. Taking the first set of experiments to obtain edge detection images as an example, we present the B/A values of their edge detection results below, as shown in Table 2. The values in Table 2 show that the ratio of our proposed algorithm B/A is smaller, with higher accuracy of edge detection and higher completeness of edge.
The quality factor is a metric proposed by Pratt to evaluate the quality of edge detection results objectively [42]. The quality factor is determined by the three factors of missed detection of true edges, misjudging noise as edges, and positioning error of edges. The general expression for the quality factor is as follows.
Q = 1 max ( I a , I b ) k = 1 I b 1 1 + a d 2 ( k )
where I a , I b , and d denote the number of reference edge points, the number of detected edge points, and the vertical distance between the detected edge point and the reference edge point, respectively. a is a constant factor, generally taken as 1/9. A quality factor is a positive number in the range [0, 1]. When the quality factor is larger, it means that the localization accuracy of the edge points is higher, and the accuracy of the edge detection results is better. We experiment with the edge detection results obtained for images with a noise variance of 30, and the quality factors for the various methods are shown in Table 3 below.
Table 3. Quality factor statistics table.
Table 3. Quality factor statistics table.
ImageGradient DetectionGaussian Smoothed Gradient[41] MethodThe Module of Wavelet CoefficientsOur Method
Airplane0.68450.72510.52640.79580.8343
Lena0.73640.78260.62150.83530.8736
Clock0.62580.69310.58030.72380.7614
Baboo0.59820.63480.51740.67930.6937
Peppers0.66470.69030.52930.72180.7649
Cell0.61050.65290.49370.69260.7795
Flower0.73220.78510.62180.81390.8726
Toys0.59370.64290.52420.68730.7284
Starfish0.65840.72330.61490.75820.7936
House0.68460.73610.52640.78430.8159
As can be seen from the experimental data in Table 3, the quality factor values of the edge detection results obtained by this method are higher than the quality factor values of the edge detection results obtained by the other methods. This also demonstrates the higher accuracy of the edge detection results obtained by the method in this paper.

5. Conclusions

In this paper, a wavelet coefficient recovery method combining the advantages of wavelet shrinkage and fourth-order anisotropic diffusion is proposed. The low-frequency and high-frequency wavelet coefficients are obtained by performing a discrete wavelet transform on the test images. Based on the analysis of the wavelet threshold denoising method, we propose the state-aware wavelet coefficient acquisition method, in which the focus is to obtain the state quantity corresponding to the wavelet coefficient by normalization and to conduct the fourth-order anisotropic diffusion of the state quantity. These establish the foundation for the implementation of the present method. This method avoids the direct diffusion of the wavelet coefficients and has a good theoretical interpretation. The information on image edge details can be well reflected by the module of the wavelet coefficients. The effectiveness of our proposed method is demonstrated by detecting the edge of the image. Objective experiments are based on PSNR values, B/A values (continuity judgment), and quality factor Q values (accuracy judgment). In terms of subjective vision and specific experimental data, the module of the wavelet coefficients obtained by the algorithm in this paper can accurately locate the image edges and maintain the continuity and clarity of the image edge. It provides good help for the image processing method combined with wavelet transform. The method in this paper is a real-time edge detection algorithm that plays a great role in face recognition, image segmentation, and engineering defect detection and has wide application prospects.

Author Contributions

Conceptualization, C.L.and A.W.; methodology, C.L.; software, validation, C.L.and A.W.;data curation, C.L.; writing—original draft preparation, C.L.; writing—review and editing, A.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (No. 62072325).

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Donoho, D.L.; Johnstone, I.M. Wavelet Shrinkage: Asymptopia? J. R. Stat. Soc. Ser. B 1995, 57, 301–369. [Google Scholar] [CrossRef]
  2. Khanna, N.; Kumar, V.; Kaushik, S.K. Wavelet packet approximation. Integral Transform. Spec. Funct. 2016, 27, 698–714. [Google Scholar] [CrossRef]
  3. Khanna, N.; Kaushik, S.K. Wavelet packet approximation theorem for Hr type norm. Integral Transform. Spec. Funct. 2019, 30, 231–239. [Google Scholar] [CrossRef]
  4. Guo, K.; Labate, D. Characterization and analysis of edges using the continuous Shearlet transform. SIAM J. Imaging Sci. 2009, 2, 959–986. [Google Scholar] [CrossRef]
  5. Hana, R.; Foued, S. A wavelet-assisted subband denoising for tomographic image reconstruction. J. Vis. Commun. Image Represent. 2018, 55, 115–130. [Google Scholar]
  6. Bayer, F.M.; Kozakevicius, A.J.; Cintra, R.J. An iterative wavelet threshold for signal denoising. Signal Process. 2019, 162, 10–20. [Google Scholar] [CrossRef]
  7. Cai, X.; Wallis, C.G.; Chan, J.Y.; McEwen, J.D. Wavelet-based segmentation on the sphere. Pattern Recognit. 2020, 100, 107081. [Google Scholar] [CrossRef] [Green Version]
  8. Liu, C.X.; Pang, M.Y. Automatic lung segmentation based on image decomposition and wavelet transforms. Biomed. Signal Process. Control 2020, 61, 102032. [Google Scholar] [CrossRef]
  9. Kumar, A.; Saha, S.; Bhattacharya, R. Wavelet transform based novel edge detection algorithms for wideband spectrum sensing in CRNs. AEU-Int. J. Electron. Commun. 2018, 84, 100–110. [Google Scholar] [CrossRef]
  10. Zhang, M.; Yang, C.; Yuan, Y.; Guan, Y.; Wang, S.; Liu, Q. multi-wavelet guided deep mean-shift prior for image restoration. Signal Process. Image Commun. 2021, 99, 116449. [Google Scholar] [CrossRef]
  11. Wang, J.Y.; Du, Z.G. A method of processing color image watermarking based on the Haar wavelet. J. Vis. Commun. Image Represent. 2019, 64, 102627. [Google Scholar] [CrossRef]
  12. Donoho, D.L. Denoising by soft thresholding. IEEE Trans. Inf. Theory 1995, 41, 613–627. [Google Scholar] [CrossRef] [Green Version]
  13. Zhang, L.; Bao, P.; Pan, Q. Threshold analysis in wavelet based denoising. IEEE Electron. Lett. 2001, 37, 1485–1486. [Google Scholar] [CrossRef]
  14. Saha, M.; Naskar, M.K.; Chatterji, B.N. Soft, hard and block thresholding techniques for denoising of mammogram image. IETE J. Res. 2015, 61, 186–191. [Google Scholar] [CrossRef]
  15. Rudin, L.; Osher, S.; Fatemi, E. Nonlinear total variation-based noise removal algorithms. Physica D 1992, 60, 259–268. [Google Scholar] [CrossRef]
  16. Perona, P.; Malik, J. Scale-space and edge detection using anisotropic diffusion. IEEE Trans. Pattern Anal. Mach. Intell. 1990, 12, 629–639. [Google Scholar] [CrossRef] [Green Version]
  17. Zou, Q. An image inpainting model based on the mixture of Perona-Malik equation and Cahn-Hilliard equation. J. Appl. Math. Comput. 2021, 66, 21–38. [Google Scholar] [CrossRef]
  18. Lou, Y.; Zeng, T.; Osher, S.; Xin, J. A weighted difference of anisotropic and isotropic total variation model for image processing. SIAM J. Imaging Sci. 2015, 8, 1798–1823. [Google Scholar] [CrossRef] [Green Version]
  19. Shama, M.-G.; Huang, T.-Z.; Liu, J.; Wang, S. A convex total generalized variation regularized model for multiplicative noise and blur removal. J. Appl. Math. Comput. 2016, 276, 109–121. [Google Scholar] [CrossRef]
  20. Hsieh, P.-W.; Shao, P.-C.; Yang, S.-Y. A regularization model with adaptive diffusivity for variational image denoising. Signal Process. 2018, 149, 214–228. [Google Scholar] [CrossRef]
  21. Pang, Z.-F.; Zhou, Y.-M.; Wu, T.; Li, D.-J. Image denoising via a new anisotropic total variation-based model. Signal Process. Image Commun. 2019, 74, 140–152. [Google Scholar] [CrossRef]
  22. Lv, Y.H. Total generalized variation denoising of speckled images using a primal-dual algorithm. J. Appl. Math. Comput. 2020, 62, 489–509. [Google Scholar] [CrossRef]
  23. Chen, Y.; He, T.S. Image denoising via an adaptive weighted anisotropic diffusion. Multidimens. Syst. Signal Process. 2021, 32, 651–669. [Google Scholar] [CrossRef]
  24. You, Y.L.; Kaveh, M. Fourth-order partial differential equation for noise removal. IEEE Trans. Image Process. 2000, 9, 1723–1730. [Google Scholar] [CrossRef] [Green Version]
  25. Lysaker, M.; Lundervold, A.; Tai, X.C. Noise removal using fourth-order partial differential equation with applications to medical magnetic resonance image in space and time. IEEE Trans. Image Process. 2003, 12, 1579–1590. [Google Scholar] [CrossRef]
  26. Hajiaboli, M.R. An anisotropic fourth-order nonlinear diffusion filter for image noise removal. Int. J. Comput. Vis. 2011, 92, 177–191. [Google Scholar] [CrossRef]
  27. Shi, B.L.; Pang, Z.F.; Yang, Y.F. A projection method based on the splitting Bregman iteration for the image denoising. J. Appl. Math. Comput. 2012, 39, 533–550. [Google Scholar] [CrossRef]
  28. Zhang, X.J.; Ye, W.Z. An adaptive fourth-order partial differential equation for image denoising. Comput. Math. Appl. 2017, 74, 2529–2545. [Google Scholar] [CrossRef]
  29. Siddig, A.; Guo, Z.; Zhou, Z.; Wu, B. An image denoising model based on a fourth-order nonlinear partial differential equation. Comput. Math. Appl. 2018, 76, 1056–1074. [Google Scholar] [CrossRef]
  30. Yang, J.H.; Zhao, X.L.; Mei, J.J. Total variation and high-order total variation adaptive model for restoring blurred images with Cauchy noise. Comput. Math. Appl. 2019, 77, 1255–1272. [Google Scholar] [CrossRef]
  31. Deng, L.; Zhu, H.; Yang, Z.; Li, Y. Hessian matrix-based fourth-order anisotropic diffusion filter for image denoising. Opt. Laser Technol. 2019, 110, 184–190. [Google Scholar] [CrossRef]
  32. Chen, Y.; Gao, Y. Adaptive fourth-order diffusion smoothing via bilateral kernel. Signal Image Video Process. 2021, 15, 1125–1133. [Google Scholar] [CrossRef]
  33. Strong, D.M. Adaptive Total Variation Minimizing Image Restoration; UCLA CAM Report97-38. Ph.D. Thesis, University of California, Los Angeles, CA, USA, 1997. [Google Scholar]
  34. Cai, J.F.; Dong, B.; Osher, S.; Shen, Z. Image restoration: Total variation, wavelet frames, and beyond. J. Am. Math. Soc. 2012, 25, 1033–1089. [Google Scholar] [CrossRef] [Green Version]
  35. Xu, J.T.; Jia, Y.Y.; Shi, Z.F. An improved anisotropic diffusion filter with semi-adaptive threshold for edge preservation. Signal Process. 2016, 119, 80–91. [Google Scholar] [CrossRef]
  36. Shen, Y.; Liu, Q.; Lou, S.Q.; Hou, Y.L. Wavelet-Based Total Variation and Nonlocal Similarity Model for Image Denoising. IEEE Signal Process. Lett. 2017, 24, 877–881. [Google Scholar] [CrossRef]
  37. Dong, B.; Jiang, Q.T.; Shen, Z.W. Image restoration: Wavelet frame shrinkage, nonlinear evolution PDEs, and Beyond. Multiscale Model. Simul. 2017, 15, 606–660. [Google Scholar] [CrossRef] [Green Version]
  38. Xiang, R.; Wang, L.; He, Q. Image denoising algorithm based on wavelet transform and partial differential equations. Commun. Technol. 2017, 50, 30–37. [Google Scholar]
  39. Tanyeri, U.; Demirci, R. Wavelet-Based Adaptive Anisotropic Diffusion Filter. Adv. Electr. Comput. Eng. 2018, 18, 99–106. [Google Scholar] [CrossRef]
  40. Wang, J.; Yang, C.L. An improved image denoising model based on partial differential equation in wavelet domain. Comput. Technol. Autom. 2018, 37, 95–98. [Google Scholar]
  41. Yu, X.K.; Wang, Z.W.; Wang, Y.H.; Zhang, C.L. Edge Detection of Agricultural Products based on Morphologically Improved Canny Algorithm. Math. Probl. Eng. 2021, 2021, 6664970. [Google Scholar] [CrossRef]
  42. You, N.; Han, L.B.; Zhu, D.M.; Song, W.W. Research on image denoising in edge detection based on wavelet transform. Appl. Sci. 2023, 13, 1837. [Google Scholar] [CrossRef]
Figure 1. Testing images. The first row: Airplane, Lena, Clock, Baboo, and Peppers; the second row: Cell, Flower, Toys, Starfish, and House.
Figure 1. Testing images. The first row: Airplane, Lena, Clock, Baboo, and Peppers; the second row: Cell, Flower, Toys, Starfish, and House.
Symmetry 15 00803 g001
Figure 2. Results of edge detection obtained with the “airplane” image by using five methods: (a) original image, (b) the gradient detection method, (c) Gaussian smoothed gradient detection method, (d) [41] method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Figure 2. Results of edge detection obtained with the “airplane” image by using five methods: (a) original image, (b) the gradient detection method, (c) Gaussian smoothed gradient detection method, (d) [41] method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Symmetry 15 00803 g002
Figure 3. Results of edge detection obtained with the “flower” image by using five methods: (a) original image, (b) gradient detection method, (c) Gaussian smoothed gradient detection method, (d) [41] method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Figure 3. Results of edge detection obtained with the “flower” image by using five methods: (a) original image, (b) gradient detection method, (c) Gaussian smoothed gradient detection method, (d) [41] method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Symmetry 15 00803 g003
Figure 4. Results of edge detection obtained with “Toys” image by using four methods: (a) noisy image ( σ = 10 ), (b) [41] method, (c) gradient detection method, (d) Gaussian smoothed gradient detection method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Figure 4. Results of edge detection obtained with “Toys” image by using four methods: (a) noisy image ( σ = 10 ), (b) [41] method, (c) gradient detection method, (d) Gaussian smoothed gradient detection method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Symmetry 15 00803 g004
Figure 5. Results of edge detection obtained with the “House” image by using four methods: (a) noisy image ( σ = 30 ), (b) [41] method, (c) gradient detection method, (d) Gaussian smoothed gradient detection method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Figure 5. Results of edge detection obtained with the “House” image by using four methods: (a) noisy image ( σ = 30 ), (b) [41] method, (c) gradient detection method, (d) Gaussian smoothed gradient detection method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Symmetry 15 00803 g005aSymmetry 15 00803 g005b
Figure 6. Results of edge detection obtained with the “finger” image by using five methods: (a) original image, (b) gradient detection method, (c) Gaussian smoothed gradient detection method, (d) [41] method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Figure 6. Results of edge detection obtained with the “finger” image by using five methods: (a) original image, (b) gradient detection method, (c) Gaussian smoothed gradient detection method, (d) [41] method, (e) the module of the wavelet coefficient detection method, (f) our proposed method.
Symmetry 15 00803 g006
Table 1. Comparison of PSNR (dB) for different methods on 2 levels of Gaussian noise.
Table 1. Comparison of PSNR (dB) for different methods on 2 levels of Gaussian noise.
Image σ Gradient DetectionGaussian Smoothed Gradient [41] MethodThe Module of Wavelet CoefficientsOur
Method
Airplane1030.724931.832531.346232.427332.8672
3027.932628.623928.193829.328129.9341
Lena1032.168232.796332.325233.575434.6057
3029.154329.657229.383630.369331.1639
Clock1029.771930.539530.946731.483632.3742
3027.316428.360428.531929.462530.5837
Baboo1030.835631.746231.295332.693133.7269
3028.742729.498529.143830.343831.5725
Peppers1032.463933.326233.642334.471635.3842
3029.424130.545130.796231.393232.4254
Cell1031.739632.683531.636433.824934.6028
3029.403730.236329.203831.163731.6546
Flower1030.706331.630731.284032.843833.7143
3028.245829.335228.862930.362531.3264
Toys1031.264231.945131.667232.834033.7932
3027.638528.344327.895729.171630.2537
Starfish1030.639631.538130.485232.463333.5749
3027.516728.270627.217828.936829.7472
House1032.147433.720632.564334.535235.7385
3026.362827.858326.934828.411929.6768
Average 29.709930.624530.167931.504832.4360
Table 2. Edge connectivity statistics table.
Table 2. Edge connectivity statistics table.
ImageGradient Detection
B / A
Gaussian Smoothed Gradient
B / A
[41] Method B / A The Module of Wavelet Coefficients
B / A
Our Method
B / A
Airplane0.03960.02740.05290.02080.0153
Lena0.03250.02910.04720.01940.0137
Clock0.04210.03820.05570.03150.0263
Baboo0.03960.03170.04690.02480.0195
Peppers0.02680.02280.03350.01710.0120
Cell0.03750.02940.05720.02690.0218
Flower0.02820.02160.03940.01870.0116
Toys0.03790.03250.07180.02750.0224
Starfish0.02740.02380.05220.01820.0139
House0.03950.02510.06930.01960.0127
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, C.; Wang, A. State-Aware High-Order Diffusion Method for Edge Detection in the Wavelet Domain. Symmetry 2023, 15, 803. https://doi.org/10.3390/sym15040803

AMA Style

Liu C, Wang A. State-Aware High-Order Diffusion Method for Edge Detection in the Wavelet Domain. Symmetry. 2023; 15(4):803. https://doi.org/10.3390/sym15040803

Chicago/Turabian Style

Liu, Chenhua, and Anhong Wang. 2023. "State-Aware High-Order Diffusion Method for Edge Detection in the Wavelet Domain" Symmetry 15, no. 4: 803. https://doi.org/10.3390/sym15040803

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop