Skip to main content

Rayleigh-maximum-likelihood bilateral filter for ultrasound image enhancement

Abstract

Background

Ultrasound imaging plays an important role in computer diagnosis since it is non-invasive and cost-effective. However, ultrasound images are inevitably contaminated by noise and speckle during acquisition. Noise and speckle directly impact the physician to interpret the images and decrease the accuracy in clinical diagnosis. Denoising method is an important component to enhance the quality of ultrasound images; however, several limitations discourage the results because current denoising methods can remove noise while ignoring the statistical characteristics of speckle and thus undermining the effectiveness of despeckling, or vice versa. In addition, most existing algorithms do not identify noise, speckle or edge before removing noise or speckle, and thus they reduce noise and speckle while blurring edge details. Therefore, it is a challenging issue for the traditional methods to effectively remove noise and speckle in ultrasound images while preserving edge details.

Methods

To overcome the above-mentioned limitations, a novel method, called Rayleigh-maximum-likelihood switching bilateral filter (RSBF) is proposed to enhance ultrasound images by two steps: noise, speckle and edge detection followed by filtering. Firstly, a sorted quadrant median vector scheme is utilized to calculate the reference median in a filtering window in comparison with the central pixel to classify the target pixel as noise, speckle or noise-free. Subsequently, the noise is removed by a bilateral filter and the speckle is suppressed by a Rayleigh-maximum-likelihood filter while the noise-free pixels are kept unchanged. To quantitatively evaluate the performance of the proposed method, synthetic ultrasound images contaminated by speckle are simulated by using the speckle model that is subjected to Rayleigh distribution. Thereafter, the corrupted synthetic images are generated by the original image multiplied with the Rayleigh distributed speckle of various signal to noise ratio (SNR) levels and added with Gaussian distributed noise. Meanwhile clinical breast ultrasound images are used to visually evaluate the effectiveness of the method. To examine the performance, comparison tests between the proposed RSBF and six state-of-the-art methods for ultrasound speckle removal are performed on simulated ultrasound images with various noise and speckle levels.

Results

The results of the proposed RSBF are satisfying since the Gaussian noise and the Rayleigh speckle are greatly suppressed. The proposed method can improve the SNRs of the enhanced images to nearly 15 and 13 dB compared with images corrupted by speckle as well as images contaminated by speckle and noise under various SNR levels, respectively. The RSBF is effective in enhancing edge while smoothing the speckle and noise in clinical ultrasound images. In the comparison experiments, the proposed method demonstrates its superiority in accuracy and robustness for denoising and edge preserving under various levels of noise and speckle in terms of visual quality as well as numeric metrics, such as peak signal to noise ratio, SNR and root mean squared error.

Conclusions

The experimental results show that the proposed method is effective for removing the speckle and the background noise in ultrasound images. The main reason is that it performs a “detect and replace” two-step mechanism. The advantages of the proposed RBSF lie in two aspects. Firstly, each central pixel is classified as noise, speckle or noise-free texture according to the absolute difference between the target pixel and the reference median. Subsequently, the Rayleigh-maximum-likelihood filter and the bilateral filter are switched to eliminate speckle and noise, respectively, while the noise-free pixels are unaltered. Therefore, it is implemented with better accuracy and robustness than the traditional methods. Generally, these traits declare that the proposed RSBF would have significant clinical application.

Background

Ultrasound imaging has been used as one of the most prevalent diagnostic techniques due to its advantage of being non-invasive, portable and cost-effective. However, ultrasound images are affected by many types of artifacts, therefore it is hard for an observer to interpret the images and obtain quantitative information from them. Noise in ultrasound can be modeled as the combined effect of two components: one is additive, such as electronic and thermal noise, and the other is multiplicative, called “speckle”. Speckle is the result of the constructive and destructive coherent summation of ultrasound echoes when ultrasound pulses randomly interfere with objects of comparable size to the sound wavelength and then the superposition of acoustical echoes produces an intricate interference pattern [1]. Noise and speckle, considered as undesirable consequence of the image formation process in coherent imaging, directly impact the visualization of the ultrasound image by the physician, deteriorate the quality and the perceivable resolution of diagnostically important features and thus lead to inaccuracy in clinical diagnosis. Therefore, it is essential to remove noise and speckle in the ultrasound images without compromising important image details.

Prior to noise and speckle elimination, the major differences between noise and speckle in ultrasound image should be investigated. Besides the additive nature of noise and multiplicative nature of speckle, their statistical characteristics are completely different in that noise and speckle are subject to Gaussian distribution and Rayleigh distribution, respectively [1]. Figure 1 illustrates the Gaussian distribution whose mean is set as 5 and the variance is set as 1 as well as the Rayleigh distribution whose variance is set as 1. The difference should be considered for effective enhancement.

Fig. 1
figure 1

The Gaussian distribution of noise and the Rayleigh distribution of speckle

To alleviate the negative effects of noise and speckle, many efforts have been done to enhance ultrasound images and made the images more valuable after they had been generated and digitized. The state-of-the-art denoising methods for ultrasound images include the median filter [2], adaptive filters such as the Lee filter [3], the Frost filter [4], the Kuan filter [5] as well as the non-local means filter and the anisotropic diffusion method [6].

The median filtering [2] and numerous improved versions [7,8,9] are often effective for noise reduction. The median intensity of a properly sized and shaped filtering window surrounding the central pixel is used as the output of the target pixel. It thus can eliminate impulsive artifacts whose size is less than a half of the filtering window. Since the amount of smoothing performed by the median filter is determined only by the size of the filtering window, the median filter removes some of the high frequency signal while it results in obscuring the edges. Moreover, the median filter is ineffective when the speckle size is larger than a half of the window size since the filtering scheme does not take into account the statistical characteristics of speckle. Therefore, it undermines the despeckling effectiveness.

Statistical adaptive filters replace the regions within the image whose statistical characteristics similar to those of speckles with the local mean value while keeping the regions with property least similar to speckle unaltered. Therefore they remain effective for speckle suppression. Two of these works are the filters proposed by Lee [3] and Frost [4]. They were first applied on synthetic aperture radar images and then were used on ultrasound images. Lee used the minimum mean square error (MMSE) method to design the filter for additive noise, multiplicative noise and a mixed of the two, its output was estimated by a weighted average based on the mean and the variance of the sub-regions. The frost filter was designed by using an exponentially damped convolution kernel adapted to image fine details and the output was calculated based on local statistics. The Kuan filter [6] is closely similar to the Lee filter but with a different weighting function. Although these filters perform well for removing speckle, they have to compromise between averaging in homogeneous regions and preserving sharp features in the original image.

Non-local means (NLM), a weighted Gaussian filter was proposed for denoising by making use of the high degree of redundancy in the original ultrasound image [10]. NLM performs well in Gaussian noise suppression and sharp edge reservation since it uses the region comparison instead of pixel comparison, which the pattern redundancy is not restricted to be local. However, NL-means cannot be directly applied to ultrasound images since speckle differs from Gaussian noise significantly and is subject to Rayleigh distribution. To extend the application of the NLM method to speckle reduction, relevant NLM-based methods have been studied and proposed. Because these methods determine pixel similarity based on the noisy image patches, speckle in US images will lead to inaccurate computation of the similarity and thus lead to fine detail distortion [11,12,13,14,15]. Furthermore, additional time is required for computing the scale and shape parameters of the distribution of speckle [16].

The anisotropic diffusion was first proposed to reduce noise in images by smoothing in homogeneous regions without blurring the edges [17]. Thereafter, Yu and Acton [6] analyzed the statistical methods for speckle suppression and developed speckle reducing anisotropic diffusion (SRAD), a non-linear and space-variance filter. The SRAD approach reduced speckle by applying isotropic diffusion in homogeneous regions and enhanced edges by inhibiting diffusion across edges, which achieved a balance between despeckling and edge preservation. Flores et al. [18] extended the SRAD to a Log-Gabor guided anisotropic diffusion (ADLG), handling the trade-off between smoothing level and preservation of lesion contour details. Thereafter, a lot of work has been done with anisotropic diffusion equations in such a way that the important structural information can be retained in the denoised images [19,20,21]. But these SRAD based methods often produce a visually disappointing outputs when they are applied to filter the primary noise contained in ultrasound images, which is subject to Gaussian distribution.

Based on the assumption of Rayleigh distribution of speckle, Aysal [22] first proposed a Rayleigh-trimmed filter for speckle reduction in medical images. For ensuring high efficiency of removing the primary noise and speckle in ultrasound images, two filters are applied to the original image. An alpha-trimmed mean filter was used for suppressing the primary noise and the anisotropic diffusion was subsequently used to further reduce speckle. In addition, Deng et al. [23] proposed a Rayleigh-trimmed anisotropic diffusion filter for speckle reduction in ultrasound images. A Rayleigh-trimmed filter was first applied to estimate the relative standard deviations of local signals and then the anisotropic diffusion was utilized to reduce speckle. However, fine details were simultaneously removed by each filter because speckle detection was not performed before removing.

Elad proposed a new denoising method, named bilateral filter (BF) [24]. It is a non-linear weighted Gaussian filter, taking advantage of adaptive weights based upon spatial and radiometric similarity. Compared with the above-mentioned denoising methods, the BF replaced each pixel by a weighted average of the intensities in the window, which the weighting function gave high weight to those pixels near or similar to the central pixel. Hence it performed well in Gaussian noise reduction and sharp edges preservation. Lin [25] proposed a switching BF (SBF), where the BF could classify a pixel as Gaussian noise, impulse noise or noise-free one. And then the improved SBF switched between the Gaussian and impulse mode depending on the classification result to effectively remove Gaussian noise and impulse noise. However, these BF methods suffered from the drawback that they became ineffective when denoising speckle since the speckle model in ultrasonic images is subject to Rayleigh distribution.

Though these denoising and despeckling approaches operate well in some situations, they have several limitations. Firstly, some approaches do not take into account the statistical characteristics of noise or speckle, undermining the denoising effectiveness. Secondly, most algorithms, for example, the above mentioned approaches, except SBF, do not identify pixel property, such as noise, speckle or edge, before denoising, so they cannot balance effectively in enhancing edges and small structure while reducing noise and speckle, especially when the quality of the original image is poor. Finally, these methods can effectively suppress Gaussian noise or speckle but their performances are not satisfactory in the case of enhancing ultrasound images since ultrasound image is contaminated by addictive background noise and multiplicative speckle.

In order to effectively remove the primary noise and speckle contained in ultrasound images while preserving fine edges and details, a novel and robust method, named as Rayleigh-maximum-likelihood switching bilateral filter (RSBF), which performs the “detect and replace” mechanism before filtering, is proposed. To detect noise, a reference median [25] in the filtering window is first calculated based on the property of the edge in an image, and then the target pixel is identified as noise, speckle or noise-free texture according to the absolute difference between the target pixel and the reference median. Subsequently, noise is removed by the bilateral filter and speckle is suppressed by the Rayleigh-maximum-likelihood filter while noise-free pixels are kept unaltered. The performance and effectiveness of the proposed approach are demonstrated by experiments by using both simulated and clinical ultrasound images.

The remainder of this paper is organized as follows. "Methods" introduces the noise speckle model and the bilateral filter, followed by the detailed description of the proposed RSBF. "Experiments" gives a brief introduction to the experiment environment. "Results and discussion" presents the simulation of the ultrasound images and experiment results on synthetic ultrasound images and real clinical cases in which the proposed method is compared with six state-of-the-art methods for ultrasound speckle reduction. Finally, some conclusions are drawn in "Conclusions".

Methods

In this section, the characteristics of noise and speckle is first analyzed. Based on the analysis, a sorted quadrant median vector (SQMV) scheme is performed to classify the target pixel as noise, speckle or noise-free. Thereafter, the bilateral filter is applied to remove noise based on the Gaussian distribution of noise. And the Rayleigh-maximum-likelihood filter is proposed to suppress speckle based on the Rayleigh distribution of speckle. Noise free pixels are kept unchanged in order to enhance images and meanwhile preserve the edge details.

The ultrasound noise model and the bilateral filter

Thermal noise and speckle model

Artifacts in ultrasound images contain additive electronic or thermal noise and multiplicative speckle. When an image is corrupted by thermal noise, each original pixel value is added with a noise value \( n_{i,j} \) produced from a zero-mean Gaussian distribution. Then the noisy image \( u_{i,j} \) is related to the original image \( f_{i,j} \) by:

$$ u_{i,j} = f_{i,j} + n_{i,j} $$
(1)

Speckle is an interfering phenomenon. It occurs when two or more waves traveling to the probe from the scatters interfere with each other, whose severity depends on the relative phase between two overlapping returning ultrasonic echoes. A reasonable trade-off between accuracy and simplicity is to model the speckle as a multiplicative artifact with Rayleigh distribution [26]. The relationship between the uncorrupted signal \( f_{i,j} \) and the observed signal \( u_{i,j} \) contaminated by speckle is:

$$ u_{i,j} = f_{i,j} *\eta_{i,j} $$
(2)

where \( \eta \) is a Rayleigh probability density function with the scale parameter \( \sigma \):

$$ p(\eta ) = \frac{\eta }{{\sigma^{2} }}e^{{\left( { - \frac{{\eta^{2} }}{{2\sigma^{2} }}} \right)}} $$
(3)

The noisy ultrasound image, \( u_{i,j} \) contaminated by noise and speckle can be modeled as:

$$ u_{i,j} = n_{i,j} + f{}_{i,j} * \eta_{i,j} $$
(4)

The bilateral filter

The Bilateral filter was proposed to remove Gaussian noise while preserving edges [24]. Each pixel is replaced by a weighted average of the intensities in the filtering window, where the pixels near or similar to the target one are assigned a high weight.

In a \( (2N + 1)*(2N + 1) \) window, let \( u_{i,j} \) and \( u_{i + s,j + t} \) represent the value of the central pixel and the pixels surrounding the central one, respectively, where \( (i,j) \) and \( (i + s,j + t) \) indicate the location of \( u_{i,j} \) and \( u_{i + s,j + t} \). Then the filtered result of the bilateral filter \( y_{i,j} \) is defined as:

$$ y_{i,j} = \frac{{\sum\nolimits_{s = - N}^{N} {\sum\nolimits_{t = - N}^{N} {W_{G} (s,t)W_{R} (s,t)u_{i + s,j + t} } } }}{{\sum\nolimits_{s = - N}^{N} {\sum\nolimits_{t = - N}^{N} {W_{G} (s,t)W_{R} (s,t)} } }} $$
(5)

where

$$ W_{G} (s,t) = \exp - \frac{{(i - s)^{2} + (j - t)^{2} }}{{2\sigma_{S}^{2} }} $$
(6)
$$ W_{R} (s,t) = \exp - \frac{{(u_{i,j} - u_{i + s,j + t} )^{2} }}{{2\sigma_{R}^{2} }} $$
(7)

\( \sigma_{S} \) and \( \sigma_{R} \) are the two parameters that control the bilateral filter, whose values are determined based on experiments.

The bilateral filter performs well in suppressing Gaussian noise while keeping the edge, but it is hard to remove ultrasound speckle because speckle is a type of multiplicative noise and it follows Rayleigh distribution. In order to effectively filter noise and speckle in ultrasound image, we propose a Rayleigh-maximum-likelihood bilateral filter (RSBF) with noise/speckle detection scheme, discussed in the following.

The Rayleigh-maximum-likelihood switching bilateral filter(RSBF)

The Rayleigh-maximum-likelihood bilateral filter (RSBF) consists of two steps. Firstly, the target pixel is identified as noise, speckle or noise-free by using a sorted quadrant median vector [25]. Subsequently, noise and speckle are suppressed by the bilateral filter and the Rayleigh-maximum-likelihood filter, respectively, while noise-free pixels are left unaltered. Figure 2 shows the coarse structure of the proposed method.

Fig. 2
figure 2

The scheme of noise/speckle detection and reduction by RSBF

Noise/texture detection with the sorted quadrant median vector [25]

  1. 1.

    The Sorted Quadrant Median Vector (SQMV)

SQMV was proposed for noise detection to avoid false noise detection or blurring image details with inappropriate window size [25]. A large window with the size of \( (2N + 1) \times (2N + 1) \) is divided into four subwindows of size \( (N + 1) \times (N + 1) \), where the central pixel is the corner pixel in the four subwindows, shown in Fig. 3 (\( N = 2 \)).

Fig. 3
figure 3

Four subwindows in a \( 5 \times 5 \) window

Let \( C_{i,j} \) be the intensity of the central pixel in the large window, then the set of pixels within the window, denoted as \( W \), is defined as:

$$ W = \{ C_{i + x,j + y} : - N \le x \le N, - N \le y \le N\} $$
(8)

The set of pixels in the four subwindows, denoted as \( W_{1} ,W_{2} ,W_{3} \) and \( W_{4} \), can be expressed as

$$ W_{1} = \{ C_{i + x,j + y} :0 \le x \le N,0 \le y \le N\} $$
(9)
$$ W_{2} = \{ C_{i + x,j + y} : - N \le x \le 0,0 \le y \le N\} $$
(10)
$$ W_{3} = \{ C_{i + x,j + y} : - N \le x \le 0, - N \le y \le 0\} $$
(11)
$$ W_{4} = \{ C_{i + x,j + y} :0 \le x \le N, - N \le y \le 0\} $$
(12)

In case that \( N = 2 \) then the window size is \( 5 \times 5 \) and there are four sub-windows with size of \( 3 \times 3 \). The sequence of the sub-windows is shown in Fig. 3. The median value of each sub-window is denoted as:

$$ m_{j} = median\{ W_{j} \} ,\quad j = 1\;to\;4 $$
(13)

The \( SQMV \) is defined as the four median values in the subwindows in a sorted increasing order:

$$ SQMV = [SQM_{1} ,SQM_{2} ,SQM_{3} ,SQM_{4} ] $$
(14)

where \( SQM_{i} (i = 1,2,3,4) \) is the median of the four subwindows sorted in an increasing order.

  1. 2.

    Edge/texture detection based on the \( SQMV \) clusters

The edge and texture pixels in a window can be detected based on the difference between the maximal and the minimal \( SQMV \) values:

$$ SQM_{\text{max} } = (SQM_{4} - SQM_{1} ) $$
(15)
$$ SQM_{\text{min} } = (SQM_{3} - SQM_{2} ) $$
(16)

where \( SQM_{\text{max} } \) and \( SQM_{\text{min} } \) represent the maximal and the minimal value of the \( SQMV \), respectively.

If \( SQM_{\text{max} } \) is small, then the pixel intensities in the window are close to each other, so there is no edge. In case that \( SQM_{\text{max} } \) is large but \( SQM_{\hbox{min} } \) is small, then the window contains a weak edge. If \( SQM_{\hbox{max} } \) and \( SQM_{\hbox{min} } \) are both large, then the pixel intensities are different, so the target pixel is identified as strong edge or texture. Based on the analysis, the edge and texture can be detected by:

$$ Edge /texture = \left\{ {\begin{array}{llll} {without \,edge} & & {SQM_{\text{max} } \le T} \\ {weak\, edge} & \hfill & {SQM_{\text{max} } \ge T} \hfill & {\& \, SQM_{\text{min} } \le T} \hfill \\ {strong\, edge/texture} & \hfill & {SQM_{\text{min} } \ge T} \hfill \\ \end{array} } \right. $$
(17)

where T is a threshold.

  1. 3.

    Features of edge/texture

The cluster of \( SQM_{i} \) and the order of four medians \( m_{j} \) mapping to the clusters implicate the edge features in the window. (1) If \( SQM_{i} \) is clustered as two unequal classes, such as \( \{ (SQM_{1} ,SQM_{2} ,SQM_{3} ,),(SQM_{4} )\} \) or \( \{ (SQM_{1} )(SQM_{2} ,SQM_{3} ,SQM_{4} )\} \) then a diagonal edge is contained in the window. (2) If \( SQM_{i} \) is clustered as two equal classes, \( \{ (SQM_{1} ,SQM_{2} )(SQM_{3} SQM_{4} )\} \), furthermore, \( \{ (m_{2} ,m_{3} )\} \) and \( \{ (m_{1} ,m_{4} )\} \) are associated to \( \{ SQM_{1} ,SQM_{2} \} \) and \( \{ SQM_{3} ,SQM_{4} \} \), respectively, then there is a vertical edge within the window. (3) If \( SQM_{i} \) is clustered as two equal classes,\( \{ (SQM_{1} ,SQM_{2} )(SQM_{3} SQM_{4} )\} \), furthermore, \( \{ (m_{1} ,m_{2} )\} \) and \( \{ (m_{3} ,m_{4} )\} \) are associated to \( \{ (SQM_{1} ,SQM_{2} )\} \) and \( \{ (SQM_{3} ,SQM_{4} )\} \), respectively, then the window contains a horizontal edge.

  1. 4.

    Reference median

If “without edge” or “weak edge” are detected by Eq. (17), the majority feature of the window is denoted by the medians in the major cluster. Thus the reference median is defined as the average of \( SQM_{2} \) and \( SQM_{3} \). When there is edge or texture in the window, a directional average, used to determine which subwindow the target pixel is more similar to, is calculated by the average of the four pixels in the major pattern depending on the feature of edge or texture, expressed by \( ref \).

$$ ref = \left\{ {\begin{array}{*{20}l} {(SQM_{2} + SQM_{3} )/2} \hfill & {without\, edge\quad \& \;weak\, edge} \hfill \\ {\left( {\sum\limits_{i = 1}^{4} {x_{i} } } \right)/4} \hfill & {strong\, edge /texture} \hfill \\ \end{array} } \right. $$
(18)

where \( x_{i} (i = 1,2,3,4) \) are the four pixels in the major pattern, defined according to the feature of edge or texture, shown in Fig. 4.

Fig. 4
figure 4

The four pixels in the major patter of a vertical, b horizontal, c diagonal directions

If \( ref \) is close to \( (SQM_{1} ,SQM_{2} ) \) then the reference median is defined as \( SQM_{2} \). If \( ref \) is close to \( (SQM_{3} ,SQM_{4} ) \) then the reference median is defined as \( SQM_{3} \). The reference median (\( SQMR \)) can be expressed as:

$$ SQMR\begin{array}{*{20}c} = & {\left\{ {\begin{array}{*{20}l} {(SQM_{2} + SQM_{3} ) /2} \hfill & {SQM_{\text{min} } \le T} \hfill &{} \hfill \\ {SQM_{2} } \hfill & {SQM_{\text{min} } \ge T} \hfill &{\& \, ref \in (SQM_{1} ,SQM_{2} )} \hfill \\ {SQM_{3} } \hfill & {SQM_{\text{min} } \ge T} \hfill & {\& \, ref \in (SQM_{3} ,SQM_{4} )} \hfill \\ \end{array} } \right.} \\ \end{array} $$
(19)
  1. 5.

    Noise and edge/texture identification

The noise, speckle and edge/texture detection mechanism is implemented by the reference median and the threshold \( T \). When the target pixel is greatly different from the reference median then it is detected as speckle generated by ultrasound echoes [1]. When the target pixel is close to the reference median then it may be a Gaussian background noise or edge/texture. Then the noise and edge/texture is further identified based on the clusters of \( SQMV \) by using Eq. (17). The noise/speckle and edge/texture detection algorithm is shown as follows:

$$ noise /speckle\;detector = \left\{ {\begin{array}{lll} {speckle} \hfill & {\left| {x_{i,j} - SQMR} \right| \ge T_{1} } \hfill \\ {noise} \hfill & {\left| {x_{i,j} - SQMR} \right| \ge T_{2} } \hfill \\ {noise{ - }free} \hfill &\quad{otherwise} \hfill \\ \end{array} } \right. $$
(20)

where \( T_{1} \) and \( T_{2} \) are thresholds determined by experiments.

The Rayleigh-maximum-likelihood filter

Speckle in ultrasound images is modeled as a multiplicative form defined by Eq. (2). The estimation of uncorrupted image \( f \) can be adopted by the robust maximum likelihood (ML) approach [22]. \( f(i,j) \) is assumed to be a constant in the observation window \( \varOmega \) from which \( f(i,j) \) is to be estimated [22], i.e., \( f(i,j) \approx \beta \) for \( \forall (i,j) \in \varOmega \). Hence, for \( \{ u(i,j):(i,j) \in \varOmega \} \) defined in Eq. (2) can be calculated by using:

$$ u(i,j) = \beta *\eta (i,j) $$
(21)

where \( (i,j) \) denotes the coordinates of a pixel in the ultrasound image. \( u \), denoting the image corrupted by speckle, is a Rayleigh distribution with parameter \( \sigma_{I} \). The ML estimation of \( \sigma_{I} \), represented as \( \hat{\sigma } \), is given by

$$ \hat{\sigma }_{I} = \mathop {\arg \hbox{max} }\limits_{\beta } \psi (\vec{u}|\sigma_{I} ) $$
(22)

where \( \vec{u} \) denotes the pixel values of \( u(i,j) \) in the observation window \( \varOmega \) arranged in a vector format. The solution to Eq. (22) is

$$ \hat{\sigma }_{I} = \left( {\frac{1}{2\left\| \varOmega \right\|}\sum\limits_{(i,j) \in \varOmega } {u^{2} (i,j)} } \right)^{1/2} $$
(23)

where \( \left\| \varOmega \right\| \) denotes the cardinality of \( \varOmega \). For example, \( \left\| \varOmega \right\| \) = 9 in a \( 3 \times 3 \) window. Then the ML estimation of the uncorrupted image \( f(i,j) \), denoted as \( \hat{f}(i,j) \), can be calculated as

$$ \begin{aligned} \hat{f}(i,j) & = \hat{\beta } = \hat{\sigma }_{I} (\sigma )^{ - 1} \\ & = (\sigma )^{ - 1} \left[ {\frac{1}{2\left\| \varOmega \right\|}\sum\limits_{(i,j) \in \varOmega } {u^{2} (i,j)} } \right]^{1/2} \\ \end{aligned} $$
(24)

where \( (i,j) \) denotes the pixel location of the estimated original image.

The Rayleigh-maximum-likelihood bilateral filter

Inspired by the “noise/speckle detection and reduction” scheme and statistics of noise and speckle, we combine the bilateral filter and Rayleigh-maximum-likelihood filter together after performing noise/texture identification. Firstly, the target pixel is classified as noise, speckle or noise-free one. Subsequently, noise is removed by using the bilateral filter and speckle is suppressed by using the Rayleigh-maximum-likelihood filter while the noise free pixels are kept unaltered. The detailed algorithm is described below, which can be directly implemented by MATLAB or C language.

For each pixel \( u_{i,j} \) in the noisy image:

  1. 1.

    Take the search window, size of \( (2N + 1) \times (2N + 1) \), and the corresponding subwindows size of \( (N + 1) \times (N + 1) \).

  2. 2.

    Compute \( SQMV \) by Eq. (14) and detect the edge and texture by using Eq. (17).

  3. 3.

    Identify edge feature according to the cluster of \( SQMV \).

  4. 4.

    Calculate \( ref \) by Eq. (18) and \( SQMR \) by Eq. (19).

  5. 5.

    Detect \( u_{i,j} \) as noise, speckle or noise-free pixel.

  6. 6.

    If \( u_{i,j} \) is classified as noise, replace the target pixel with a weighted average intensities in the window by using Eq. (5).

  7. 7.

    If \( u_{i,j} \) is detected as speckle, filter the target pixel with the Rayleigh-maximum-likelihood filter in the window by using Eq. (24).

  8. 8.

    If \( u_{i,j} \) is noise-free then the original intensity is kept unaltered.

Experiments

In the experimental study, synthetic and clinical ultrasound images are used as test sources to evaluate the performance of the proposed RSBF by comparing it with those of six previously proposed filters, including the switching bilateral filter (SBF), the median filter, the SRAD, the NL-means filter, the Lee filter and the Kuan filter.

The proposed RSBF is implemented by using Matlab 7.1 and the experiments are performed on a PC with 2.66 GHz Intel Core 2 processor. Here the parameter \( \sigma_{S} \) and \( \sigma_{R} \) of the bilateral filter are set as 35 and 40 based on the experiments, respectively. The parameter \( \sigma \) of the Rayleigh-maximum-likelihood filter is set as 1. The size of the observation window is \( 5 \times 5 \).

Three widely used quantitative metrics, including signal to noise ratio (SNR) [26], peak signal to noise ratio (PSNR) [27] and root mean squared error (RMSE) [28], are used to measure the effectiveness of various algorithms along with the visual evaluation. The SNR is defined as

$$ {\text{SNR\_dB}} = 10\log \left( {\frac{{\sum\nolimits_{i = 1,j = 1}^{i = Row,j = Col} {f(i,j)^{2} } }}{{\sum\nolimits_{i = 1}^{row} {\sum\nolimits_{j = 1}^{col} {[\hat{f}(i,j) - f(i,j)]^{2} } } }}} \right) $$
(25)

where \( f(i, j) \) is the original image, \( \hat{f}(i,j) \) is the denoised image, and the size of image is \( Row \times col \). The PSNR reflects the average statistics of the signal-to-noise ratio change in an image, and is defined as

$$ PSNR\_dB = 10\log \left( {\frac{{255^{2} \times {\text{Row}} \times Col}}{{\sum\nolimits_{i = 1}^{Row} {\sum\nolimits_{j = 1}^{Col} {[f(i,j) - \hat{f}(i,j)]^{2} } } }}} \right) $$
(26)

The higher value of SNR and PSNR indicate better performance of denoising.

The RMSE is defined as

$$ RMSE = \sqrt {\frac{{\left( {\sum\nolimits_{i = 1}^{row} {\sum\nolimits_{j = 1}^{col} {(f(i,j) - \hat{f}(i,j))^{2} } } } \right)}}{Row \times Col}} $$
(27)

The less the RMSE, the better the image quality.

Results and discussion

Synthetic images with speckle

In this paper, synthetic ultrasound images contaminated by speckle are simulated by using the speckle model proposed by Laporte [29] and the details of this simulation model can be found in the work by Laporte et al. [29]. The corrupted synthetic images are generated by the original image multiplied with Rayleigh distributed noise of various SNR levels. A simulated image with speckle generated with this model (SNR = 6 dB) is shown in Fig. 5.

Fig. 5
figure 5

Speckle simulation a the original image. b The noisy image (SNR = 6 dB)

To visually evaluate the performance of the proposed method compared with other methods, seven algorithms, including the proposed method, the SBF, the Median filter, the SRAD, the NL-means filter, the Lee filter and the Kuan filter, are applied to the simulated images. The windows size of the Median filter and the Lee filter are \( 5 \times 5 \), the iteration time of the SRAD is 300.

Figures 6 and 7 illustrate the results of the seven filters at SNR = 12 dB (shown in Fig. 5a) and SNR = 5 dB (shown in Fig. 6a), respectively. Figures 6b–h and 7b–h show the corresponding filtered outputs of the proposed method, SBF, Median, SRAD, NL-means, Lee and Kuan, respectively. The visual quality of Fig. 6e is not as good as that of Fig. 6b, since the result obtained by the proposed method (Fig. 6b) contains sharp boundaries but no artifacts. The SRAD (Fig. 6e) can suppress the speckle but it meanwhile blurs the edges. However, the SBF (Fig. 6c), the Median (Fig. 6d), the NL-means (Fig. 6f), the Lee (Fig. 6g) and Kuan filter (Fig. 6h) can hardly remove the Rayleigh distributed speckle, and a mass of speckle is clearly distributed in the background. The performance of the SRAD greatly degrades when the image quality is poor and obvious speckle appears in the background (Fig. 7e), while the proposed method (Fig. 7b) can achieve the result which is more similar to the ground truth and filter the speckle more effectively.

Fig. 6
figure 6

The visual experiment results for a the synthetic image corrupted with speckle (SNR = 12 dB), the output by b the proposed RSBF, c SBF filter, d Median filter, e SRAD, f NL-means, g Lee filter and h Kuan filter

Fig. 7
figure 7

The visual experiment results for a the synthetic image corrupted with speckle (SNR = 5 dB), the output by b the proposed RSBF, c SBF filter, d Median filter, e SRAD, f NL-means, g Lee filter and h Kuan filter

The quantitative effectiveness of the proposed method is confirmed by the indices of the SNR, PSNR and RMSE, as shown in Tables 1, 2 and 3, respectively. The SNR of the corrupted images are 1, 3, 5, 7, 10, 12, 15 dB. The SRAD can obtain better results than those by the proposed method when the image quality is high (SNR = 15 dB), whereas at low SNRs (SNR = 7, 5, 3 and 1 dB), the performance of SRAD decreases significantly. It can hardly eliminate the speckle. But the proposed method still holds high SNR and PSRN as well as low RMSE values, outperforming SRAD. In all cases, the achievements of the proposed methods are better than those of the SBF, Median, NL-means, Lee and Kuan filters. It is worth noting that the proposed method can improve the SNRs of the filtered images to nearly 15 dB compared with the corrupted image under various SNR levels. It can thus be concluded that the proposed RSBF can reduce noise and speckle effectively while simultaneously keeping edges and fine details.

Table 1 The SNR comparison of the synthetic images corrupted by speckle under different noise levels (dB)
Table 2 The PSNR comparison of the synthetic images corrupted by speckle under different noise levels (dB)
Table 3 The RMSE comparison of the synthetic images corrupted by speckle under different noise levels

The synthetic images corrupted by speckle and Gaussian noise

In this section, the synthetic image is generated by multiplying the original image with Rayleigh-distributed speckle of various levels, and then additive Gaussian noise of zero mean with the variance of 0.002 is mixed into obtain the noisy images.

Figures 8 and 9 show the visual performance of the proposed method in comparison with the SBF, Median, SRAD, NL-means, Lee and Kuan filters at SNR = 12 dB (shown in Fig. 8a) and SNR = 5 dB (shown in Fig. 9a), respectively. It can be observed that the SRAD (Fig. 8e) suppresses the speckle significantly but it distorts the edges of ROI (region of interest) and the output inevitably contains background noise even when the image quality is high (SNR = 12 dB). However, the SBF (Fig. 8c), the Median (Fig. 8d), the NL-means (Fig. 8f), the Lee (Fig. 8g) and Kuan filter (Fig. 8h) cannot effectively remove the speckle and background noise, whose outputs include considerable distortion and illegibility. The SRAD cannot correctly eliminate the speckle or Gaussian background noise and the image is greatly deteriorated (Fig. 9e), leaving a lot of residual speckle and noise in the recovered results. Figures 8 and 9 show that the proposed method (Figs. 8b, 9b) can perform better for edge preserving as well as speckle and noise suppression than other methods do since the proposed method identify a pixel as speckle, noise or noise-free prior to removing, and it subsequently remove noise and speckle by the bilateral filter and the Rayleigh-maximum-likelihood filter, respectively, while the noise-free pixel is kept unchanged.

Fig. 8
figure 8

The visual experiment results for a the synthetic image corrupted with speckle and Gaussian noise (the variance of Gaussian is 0.002, SNR = 12 dB), the output by b the proposed RSBF, c SBF filter, d Median filter, e SRAD, f NL-means, g Lee filter and h Kuan filter

Fig. 9
figure 9

The visual experiment results for a the synthetic image corrupted with speckle and Gaussian noise (the variance of Gaussian is 0.002, SNR = 5 dB), the output by b the proposed RSBF, c SBF filter, d Median filter, e SRAD, f NL-means, g Lee filter and h Kuan filter

Table 4 shows that our method has a larger SNR index than those of the other methods. Compared with the SRAD, the index values obtained by the proposed RSBF are 14 dB higher than those obtained by SRAD when the SNRs of the noisy image are not greater than 7 dB. Therefore, it can be concluded that our method produces images with more structural similarity with the noiseless image than other methods do and our method is more effective and robust than the compared approaches, especially when the image quality is poor. This uniformity can be confirmed by the quantitative indices of the PSRN and RMSE, as shown in Tables 5 and 6.

Table 4 The SNR comparison of the synthetic images corrupted by speckle and Gaussian noise under different noise levels (dB)
Table 5 The PSNR comparison of the synthetic images corrupted by speckle and Gaussian noise under different noise levels (dB)
Table 6 The RMSE comparison of the synthetic images corrupted by speckle and Gaussian noise under different noise levels

Clinical imaging data

Experiments are also performed on one dataset of real ultrasound breast images. The clinical breast (Fig. 10a) ultrasound images are collected by using Philips Envisor 2540A ultrasound system, provided by the third hospital affiliated to the Kunming medical university, and are used with patients’ consent.

Fig. 10
figure 10

The visual experiment results for a the clinic breast ultrasound image, the output by b the proposed RSBF, c SBF filter, d Median filter, e SRAD, f NL-means, g Lee filter and h Kuan filter

Figure 10a is the original image selected from the experimental dataset. Figure 10b–h are the results obtained by the proposed method, the SBF, the Median, the SRAD, the NL-means, the Lee and the Kuan filters, respectively. It can be seen that the pixel intensity of the ROI processed by the proposed method is smoother than those of six other methods, which demonstrates that our method is more effective in enhancing edge while smoothing the speckle and noise in clinical ultrasound image.

Conclusions

A novel and robust method, RSBF, has been proposed to remove speckle and background noise in ultrasound images by implementing a “detect and replace” two-step mechanism. Firstly, each central pixel in the observation window is classified as noise, speckle or noise-free texture according to the absolute difference between the target pixel and the reference median, which is calculated based on the property of the edge in an image. Subsequently, a Rayleigh-maximum-likelihood filter and a bilateral filter are switched to eliminate speckle, assumed to be Rayleigh distributed, and noise, subjecting to Gaussian distribution, respectively, while keeping the noise-free pixel unaltered. Experiments are performed on synthetic and clinical ultrasound images by comparing seven different despeckling methods. Visual evaluation and three numerical indices are applied to evaluate the performance of the proposed method. Results show that the proposed method performs effectively in speckle and noise suppression as well as edge preservation, and is superior to some well-accepted state-of-the-art filters in despeckling, especially when the image quality is poor.

The first conclusion is that the proposed method yields excellent noise/speckle attenuation and edge enhancement because it detects the target pixel as speckle, noise and noise-free before performing filter. Besides, our method achieves robust performance at various image quality levels, especially when the image is greatly deteriorated because the switched filters take into account the statistics of speckle and noise.

In the application of the RSBF, the parameter \( \sigma_{S} \) and \( \sigma_{R} \) of the bilateral filter and the parameter \( \sigma \) of the Rayleigh-maximum-likelihood filter are set as fixed. It is not adaptive in processing the real clinical ultrasound images. Thus, how to optimize the parameters needs to be further researched.

In addition, even though the proposed method is theoretically suitable for ultrasound images of various organs, such as abdominal ultrasound images, the experiment only performs on one dataset of breast ultrasound images due to the limitation of the data. Therefore, more clinic ultrasound images of various organs should be utilized to test the performance of the proposed method in future research.

Abbreviations

RSBF:

Rayleigh-maximum-likelihood switching bilateral filter

SQMV:

sorted quadrant median vector

SNR:

signal to noise ratio

PSNR:

peak signal to noise ratio

RMSE:

root mean squared error

References

  1. Burckhardt CB. Speckle in ultrasound b-mode scans. IEEE Trans Sonic Ultrasound. 1978;25:1–6.

    Article  Google Scholar 

  2. Luo W. Efficient removal of impulse noise from digital images. IEEE Trans Consum Electron. 2006;52(2):523–7.

    Article  Google Scholar 

  3. Lee JS. Digital image enhancement and noise filtering by use of local statistic. IEEE Trans Pattern Anal Mach Intell. 1980;2:165–8.

    Article  Google Scholar 

  4. Frost VS, Stiles JA, Shanmugan KS, Holtzman JC. A model for radar images and its application to adaptive digital filtering of multiplicative noise. IEEE Trans Pattern Anal Mach Intell. 1982;4:157–66.

    Article  Google Scholar 

  5. Kuan DT, Sawchuk AA, Strand TC, Chavel P. Adaptive restoration of images with speckle. IEEE Trans Acoust. 1987;35:373–83.

    Article  Google Scholar 

  6. Yu YJ, Acton ST. Speckle reducing anisotropic diffusion. IEEE Trans Image Process. 2002;11(11):1260–70.

    Article  MathSciNet  Google Scholar 

  7. Chen PY, Lien CY. An efficient edge-preserving algorithm for removal of salt-and-pepper noise. IEEE Signal Process Lett. 2008;15:833–6.

    Article  Google Scholar 

  8. Toh KKV, Isa NAM. Noise adaptive fuzzy switching median for salt-and-pepper noise reduction. IEEE Signal Process Lett. 2010;17(3):281–4.

    Article  Google Scholar 

  9. Yuan C, Li YQ. Switching median and morphological filter for impulse noise removal from digital images. Optik. 2015;126:1598–601.

    Article  Google Scholar 

  10. Yang J, Fan JF, Ai DN, Wang XH, et al. Local statistics and non-local mean filter for speckle noise reduction in medical ultrasound image. Neurocomputing. 2016;195(26):88–95.

    Article  Google Scholar 

  11. Coupe P, Hellier P, Kervrann C, Barillot C. Nonlocal means-based speckle filtering for ultrasound images. IEEE Trans Image Process. 2009;18(10):2221–9.

    Article  MathSciNet  Google Scholar 

  12. Guo Y, Wang Y, Hou T. Speckle filtering of ultrasonic images using a modified non local-based algorithm. Biomed Signal Process Control. 2011;6(2):129–38.

    Article  Google Scholar 

  13. Teubera T, Lang A. A new similarity measure for nonlocal filtering in the presence of multiplicative noise. Comput Stat Data Anal. 2012;56(12):3821–42.

    Article  MathSciNet  MATH  Google Scholar 

  14. Deledalle CA, Denis L, Tupin F. Iterative weighted maximum likelihood denoising with probabilistic patch-based weights. IEEE Trans Image Process. 2009;18(12):2661–72.

    Article  MathSciNet  Google Scholar 

  15. Wang F, Qin W, Xie Y, Wen T, Gu J. A shape-optimized framework for kidney segmentation in ultrasound images using NLTV denoising and DRLSE. Biomed Eng Online. 2012;11(82):1–13.

    Google Scholar 

  16. Sudeep PV, Palanisamy P, Rajan J, Baradaran H, Saba L. Speckle reduction in medical ultrasound images using an unbiased non-local means method. Biomed Signal Process Control. 2016;28:1–8.

    Article  Google Scholar 

  17. Perona P, Malik J. Scale-space and edge detection using anisotropic diffusion. IEEE Trans Pattern Anal Mach Intell. 1990;12(7):629–39.

    Article  Google Scholar 

  18. Flores WG, Pereira WC, Infanosi AF. Breast ultrasound despeckling using anisotropic diffusion guided by texture descriptors. Ultrasound Med Biol. 2014;40(11):2609–21.

    Article  Google Scholar 

  19. Liu X, Liu J, Xu X, Chun L, Tang J, Deng Y. A robust detail preserving anisotropic diffusion for speckle reduction in ultrasound images. BMC Genomics. 2011;12:S14.

    Article  Google Scholar 

  20. Chao SM, Tsai DM. An improved anisotropic diffusion model for detail and edge preserving smoothing. Patter Recogn Lett. 2010;31:2012–23.

    Article  Google Scholar 

  21. Gupta D, Anand RS, Tyagi B. Despeckling of ultrasound medical images using nonlinear adaptive anisotropic diffusion in nonsubsampled shearlet domain. Biomed Signal Process Control. 2014;14:55–65.

    Article  Google Scholar 

  22. Aysal TC, Barner KE. Rayleigh-maximum-likelihood filtering for speckle reduction of ultrasound images. IEEE Trans Med Imaging. 2007;26(5):712–27.

    Article  Google Scholar 

  23. Deng Y, Wang Y, Shen Y. Speckle reduction of ultrasound images based on Rayleigh-trimmed anisotropic diffusion filter. Pattern Recogn Lett. 2011;32:1516–25.

    Article  Google Scholar 

  24. Elad M. On the origin of the bilateral filter and ways to improve it. IEEE Trans Image Process. 2002;11(10):1141–51.

    Article  MathSciNet  Google Scholar 

  25. Lin CH, Tsai JS, Chiu CT. Switching bilateral filter with a texture/noise detector for universal noise removal. IEEE Trans Image Process. 2010;19(9):2307–20.

    Article  MathSciNet  Google Scholar 

  26. Hajiaboli MR. An anisotropic fourth-order diffusion filter for image noise removal. Int J Comput Vis. 2011;92:177–91.

    Article  MathSciNet  MATH  Google Scholar 

  27. Gonzalez RC, Woods RE. Digital image processing. India: Prentice-Hall; 2001.

    Google Scholar 

  28. Sudeep PV, Palanisamy P, Kesavadas C, Rajan J. Nonlocal linear minimum mean square error methods for denoising MRI. Biomed Signal Process Control. 2015;20:125–34.

    Article  Google Scholar 

  29. Laporte C, Clark JJ, Arbel T. A fractal multi-dimensional ultrasound scatter distribution model. In: 4th IEEE international symposium on biomedical imaging. 2007. p. 880–3.

Download references

Authors’ contributions

HL and JW implemented the experiments, draft and analyzed the data. AM suggested the proposed algorithm. PY, JC and YZ were responsible for theoretical guidance. All authors read and approved the final manuscript.

Acknowledgements

This work was supported by the Grant (61561050), (61462094), (61661050) from the Natural Science Foundation of China, the Grant (2015Z013) from the key project of scientific research foundation of Yunnan Provincial Department of Education.

Competing interests

The authors declare that they have no competing interests.

Availability of data and materials

The data supporting the conclusions of this article are included within the article. Any queries regarding these data may be directed to the corresponding author.

Ethics approval and consent to participate

The clinical image used in the research is provided by the third affiliated hospital of the Kunming medical university and are we have been informed that the patient were consent to participate in the study.

Funding

This work was supported by the Grant (61561050), (61462094), (61661050) from the Natural Science Foundation of China, the Grant (2015Z013) from the key project of scientific research foundation of Yunnan Provincial Department of Education.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Aimin Miao.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, H., Wu, J., Miao, A. et al. Rayleigh-maximum-likelihood bilateral filter for ultrasound image enhancement. BioMed Eng OnLine 16, 46 (2017). https://doi.org/10.1186/s12938-017-0336-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s12938-017-0336-9

Keywords