Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction *1
1, First Author2,3
Dangguo Shao, 2Paul Liu, 3Dong C. Liu School of Computer Science, Sichuan University, Chengdu, China E-mail:
[email protected]
Abstract Tissue structure including lesions in ultrasound images is important in clinical diagnosis. The way to suppress noise effectively and to preserve the structure is vital for diagnosis and also for image postprocessing. In order to reduce speckle and improve the quality of ultrasound images, this paper presents a fast adaptive bilateral filter (FABF) based on local histogram. The presented filter is derived from a conventional bilateral filter and is adaptively adjusted by speckle detection based on histogram matching. The criterion of speckle region is defined from a similarity value obtained from local histogram matching between the processing window and a reference speckle area. The presented filter can effectively reduce the speckle noise and, at the same time, maintain the tissue structure. In phantom and in vivo data, the proposed method can improve the quality of an ultrasound image in terms of tissue SNR and CNR values.
Keywords: Speckle Reduction, Histogram Matching, Adaptive Filtering, Bilateral Filter 1. Introduction Owing to low cost, high efficacy, real-time, convenience and safety, medical ultrasound has gradually become one of the most important diagnostic tools. Ultrasound imaging, however, has its limitations due to the low contrast and interference from speckle noise. Speckle is a common phenomenon in coherent imaging systems. Speckle appears as a granular structure superimposed on the image and is one of the primary limitations for detecting low contrast lesions in ultrasonic imaging. Tissue structure including lesions on ultrasound image is important in clinical diagnosis. The way to suppress noise effectively and to preserve the structure is vital for diagnosis and also for image postprocessing. Compounding approach and post image formation filtering approach are two basic approaches to speckle reduction. Compounding approach includes methods by combining images in the different frequency contents [1], or different spatial views [2]. Post formation image filtering approach consists of many different filtering techniques to suppress speckle. Among them, the non-linear filters have recently received increasing interest because of some important characteristics or capacities that are superior to those of linear filters. Non-linear filters can be designed to utilize edge-preserving smoothing techniques, thus enhancing sharp edges and smoothing homogeneous regions in images. Non-linear edge-preserving filters applied to ultrasound include order statistic filter [3, 4], local statistic filter [5, 6], anisotropic diffusion filter [7, 8], symmetric inverse Gaussian model and an improved fuzz morphological filter [9, 10]. Yu and Acton derived SRAD [7] from an isotropic diffusion filter. They modified the isotropic diffusion equation to an anisotropic diffusion formulation. The SRAD is adaptive and does not utilize hard thresholds to alter performance in homogeneous regions or in regions near edges. A new post formation image filtering technique, to be called the Fast Adaptive Bilateral Filter (FABF), is presented to reduce speckle in this study. The FABF is derived from a conventional bilateral filter. According to one property of histograms, a local histogram is introduced to speed up the fast bilateral filter. On the other hand, a histogram matching technique is applied to derive an adaptive similarity value for adaptively adjusting smoothing. The organization of the paper is as follows. Section 2 describes a fast bilateral filter (FBF). The filter is derived from a conventional one. The details of our FABF method are illustrated in Section 3. The adaptive filter is based on local histogram matching. Evaluation methods are demonstrated in Section 4 using both phantom and in vivo data. Quantitative quality metrics are applied and discussed. Conclusions and potential future directions are presented in Section 5.
International Journal of Digital Content Technology and its Applications(JDCTA) Volume6,Number23,December 2012 doi:10.4156/jdcta.vol6.issue23.34
298
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
2. Fast Bilateral Filter The bilateral filter [11-13] is a non-linear technique that can blur an image while preserving sharp or distinct edges. This non-linear filter takes both intensity and spatial proximity metrics into account. In homogeneous regions, it is similar to a linear space-invariant filter which weights pixel values as a function of distance from the position in question; in regions near edges, it weights pixel values as a function of their relative values with respect to that of the current pixel. The input-output relationship for a conventional bilateral filter is demonstrated by the following:
BF [ I p ]
B(|| p q ||)G (| I I |) I B(|| p q ||)G (| I I |) p
qS
q
p
qS
q
and I ( n 1) BF [ I ( n ) ]
(1)
q
where S is the p-centric set of local pixels, and q is the element of S. ||p-q|| is the Euclidean distance between the local pixel q and the center pixel p in the set. |Ip-Iq| is the brightness distance between the local pixel q and the center pixel p. Iq is the gray value of local pixel in the set S, and q∈S. Gσ is a Gaussian function with variance σ, and B is a normalized box function. And n is the number of iteration. The process requires multiple iterations after selecting appropriate parameters because one filtering step is not enough for adequately smoothing speckle. Also, the user can adjust those values (include n, window size and the parameter of Gaussian function) according to different applications. The bilateral filter is the edge sensitive extension of the average filter. With larger filtering window, the time to process image will be increased. If a local histogram is applied to the bilateral filter, the time to process data can be shortened. A local histogram is defined in the following. 1 j I q H ( j ) ( I q j ) and ( I q j ) qS 0 j I q
(2)
where H(j) is the j-th bin of the histogram. From Appendix, we can obtain the following equation.
B(|| p q ||)G (| I qS
p
I q |) I q H ( j ) B (|| p q ||)G (| I p j |) j
(3)
jI
According to Equation (1) and Equation (3), we can convert the bilateral filter into the following one.
BF [ I p ]
H ( j ) B(|| p q ||)G (| I H ( j ) B(|| p q ||)G (| I jI
jI
p
j |) j
p
(4)
j |)
Equation (4) above is an approximate expression while the bins of histogram are fewer than gray levels in the range of intensity. To speed the bilateral filter, let us introduce one property of histograms [14]. For disjoint regions A and B,
H ( A B) H ( A) H ( B)
(5)
Histogram is a function of the bit depth of the image and the summing histograms is an O(1) operation. For those reasons, the time to process data in histogram depends only on the size of the histogram. Based on this property, an O(1) algorithm can be developed as follows. -----------------------------------------------------------------------------------------Input: Image X of size M×N, kernel radius r, n, bins and σ for k=1 to n Initialize kernel histogram H and column histograms h1...N for i=1 to M
299
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
for j=1 to N Remove Xi-r-1,j+r from hj+r ; Add Xi+r,j+r to hj+r ; H←H+hj+r-hj-r-1 ; Yi,j←BF(H, σ) ; end end X←Y end Output: Image Y of the same size --------------------------------------------------------------------------------------------In the fast bilateral filtering, the parameters such as kernel radius r, n, bins and σ, are first initialized. Then, the proposed algorithm maintains one histogram for each column in the image. This set of histograms is preserved across rows for the entirety of the process. Considering the case of moving to the right from one pixel to the next, the column histograms to the right of the kernel are yet to be processed for the current row. Next, all histograms can be kept up to date in constant time with a twostep method. The first step consists of updating the column histogram to the right of the kernel by subtracting its topmost pixel and adding one new pixel below it. The effect of this is lowering the column histogram by one row. This is O(1) thanks to the histogram. In the second step, the kernel histogram is updated by adding the modified column histogram and subtracting the leftmost one. So the kernel histogram moves to the right while the column histograms move downward and each pixel is visited only once and is added to only a single histogram. These two steps are clearly O(1) since only one addition and one subtraction need to be carried out. All updates on both the column and kernel histograms are O(1) operations which is independent of the filter radius. Therefore, most of these operations lower the time to process data considerably.
3. Adaptive Filtering It is required that speckle detection is used for adaptive speckle suppression algorithms. Dutt and Greenleaf [3] contend that a generalized version of the Rayleigh density function, the K distribution, can be used to model the statistics of the echo envelope when the scatterer densities are smaller than the Rayleigh limit. Logarithmic compression which changes the statistics of the input envelope signal, however, is widely used in clinical ultrasound scanners.
3.1. Histogram Matching Based Speckle Detection In this paper, we use the local amplitude histogram to extract the information of inherited distribution function of speckle statistics. The histogram for a reference region has a characteristic shape, which defines it as a region dominated by speckle. Other histograms have different shapes and are thus assumed to contain more structure in the block. To have a reliable speckle statistics, the size of the processing window must be chosen at the outset of the filtering procedure. And the size should be big enough to cover a region with at least one resolution cell. For a scanning depth of Z mm and N pixels in the axial direction after the scan conversion, the minimum window size [5] in the axial direction is
m NTC0 / 2 Z
(6)
where C0 is the sound speed and △T is the pulse width. In the case of 1.6us of pulse width, 100mm scanning depth and 512 sampling points in image, we obtain m=6.3. Accordingly, using a window of 7×7 is the minimum window size. In [5], the optimal number of bins to represent a normal (Gaussian) distribution with a 95% confidence level is
300
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
Number of bins 1.87(n 1) 2 / 5
(7)
and the number of bins could be 8 for n = 49, i.e., from a 7×7 local window. Equation (7) could be used to approximately determine the number of bins of more practical distribution, such as the double exponential from the compressed images. The histogram for a reference region has a characteristic shape, which defines it as a region dominated by speckle. With different frequency, transmit and receive parameters, the shape of the reference histogram has some difference. For consistency, the reference histogram in this study is derived from a speckle area under current system parameters. If the processing window contains some resolved structure, its histogram always shows a bias in shape, for example, narrow for echo-free region and wide for specular reflectivity area or even multimodal for edges. These will result in “less similar” to the reference histogram of fully developed speckle. Also, for low-contrast objects, histograms from different objects will also be different, for example, the width of the histograms is also a function of tissue type. The similarity value of two histogram shapes has been defined by comparing the two histograms bin by bin through a user-controlled error function:
S ij 1
1 L H ij ,k H r ,k n 2 nL k 1
L
H k 1
(8.1)
L
ij , k
H r ,k n
(8.2)
k 1
where Hij,k and Hr,k denote the observed frequency and expected frequency respectively, and n is the total number of sampling points. L is the length of histograms. A large similarity value (i.e., close to 1) means the processing histogram is very similar to the reference histogram. Otherwise, a small similarity means the processing histogram is very likely a tissue structure. The local region is classified by different similarity value. The classified result will be used in adaptive bilateral filter.
3.2. Adaptively Adjust Variance The variance of the Gaussian function, as a threshold to adjust smoothing, is used in the fast bilateral filter. The variance is a fixed value in a traditional bilateral filter. It is relatively difficult to select a suitable threshold for an ultrasound image in bilateral filter. Therefore, a fixed variance in the bilateral filter is not appropriate to reduce speckle. To solve the mentioned problem in speckle reduction with edge preservation in ultrasonic image, the variance in this paper is adapted using a local histogram matching approach based on ultrasonic speckle noise. Being similar with SRAD, FABF is adaptive and does not utilize hard thresholds to alter performance in homogeneous regions or in regions near edges. In histogram matching, a large similarity value (i.e., close to 1) means the processing histogram is very similar to the reference histogram. It also means that the processing region should been fully smoothed, and hence a larger variance is needed. Otherwise, a small similarity means the processing histogram is very likely a tissue structure and hence a smaller variance is needed to stop smoothing. The variance can be adjusted adaptively by the following expression.
2 (Th Sij 1) 2 ij
(9)
where Sij denotes the similarity value of two histograms at i,j location and β is exponent of similar. Th is the maximum amplitude. The classified result is used in an adaptive bilateral filter so that adaptive smoothing for speckle reduction is achieved. A higher frequency probe produces a higher resolution of B-mode image in ultrasound imaging. From above Equation (6), the minimum window size is decreased with increased frequency. Therefore, a smaller window size will be used for higher frequency probe; meanwhile it means to be a larger
301
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
exponent of similar and smaller maximum amplitude in order to improve the edge sensitivity; and vice versa for a large window size. In experiment, the following table is a reference parameters list. Table 1. A referential list of parameters Number of iteration (n) Th 3 40 2 50 1 60
Window size(Ws) 9×9 or 11×11 13×13 or 15×15 17×17 or 19×19
Exp of similar (β) 3 2 1
4. Experiments and Results 4.1. Criteria for Quantifying Algorithm Performance Two main image quality metrics in ultrasound images, the signal-to-noise ratio (SNR) [4] and the contrast-to-noise ratio (CNR) [6], are applied to both phantom and in vivo images. They are shown as follows:
SNR / CNR
(10)
2 ( t b ) 2 t2 b2
(11)
where μt is the mean of a region of interest, μb and σb are the mean and variance of similar sized regions in the image background. upSNR and upCNR, which are the growth rates of two image quality metrics, are defined as follows.
upSNR 100 ( SNRresult / SNRoriginal 1)
(12)
upCNR 100 (CNRresult / CNRoriginal 1)
(13)
4.2. Phantom and in vivo Ultrasound Image We have verified our proposed algorithms using phantom and in vivo ultrasound images obtained from Saset Healthcare iMago C21, a commercial digital ultrasound scanner. The results are shown from Figure 1 to Figure 4, which are a phantom, a human liver, a human liver-kidney and a human kidney ultrasound image respectively. Table 2 shows SNR and CNR values derived from a small square (15× 15 pixels) and a large twin-square. Figures display examples of these regions using white and black squares to indicate the background and region of interest respectively. In these four figures, every (a) is the original ultrasound image; every (b) is derived from one filtering step of FABF; every (c) is result from 100 filtering steps of SRAD filter; every (d) is obtained from our speckle detector where the dark pixels correspond to non-speckle (or structure) tissue; in every (e), the images filtered by some filtering steps of FABF are shown with better contrast resolution than ones filtered by SRAD when remaining useful clinical information.
Table 2. Comparison of de-noising methods for ultrasound images Image
Method
Windo w size
n
SNR
upSNR
CNR
upCNR
Figure.1
/ FABF SRAD FABF
/ 15×15 3×3 15×15
/ 1 100 2
4.147 11.641 22.36 38.86
/ 180.7 439.2 837.09
33.706 263.17 622.8 2647.66
/ 680.79 1747.8 7755.15
302
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
Figure.2
Figure.3
Figure.4
/
/
/
3.506
/
17.38
/
FABF
15×15
1
8.89
153.66
133.45
668.01
SRAD FABF
3×3 15×15
100 2
19.18 20.5
447.17 484.7
241.6 754.5
1290.6 4242.47
/
/
/
5.95
/
38.078
/
FABF
15×15
1
12.26
105.7
164.8
332.83
SRAD
3×3
100
23.067
287.5
444.3
1066.9
FABF
15×15
2
22.09
271.1
577.1
1415.6
/
/
/
5.0265
/
0.688
/
FABF
9×9
1
7.544
50.09
1.34
95.19
SRAD
3×3
100
32.4
544.6
1.54
123.8
FABF
9×9
3
34.8
592.6
2.38
246.5
Quantitatively, from Table 2, both CNR and SNR from speckle reduced images are a few times larger than that from original images. And the performance from the presented method in this study is better than that from SRAD filter, especially in CNR. From the speckle reduced images, the method of this paper is efficient to reduce the speckle noise and, at the same time, maintain the tissue structure.
Figure.1 (a)
(b)
(c)
(d)
(e)
Figure.2 (a)
(b)
(c)
(d)
(e)
Figure.3 (a)
(b)
(c)
(d)
(e)
Figure.4 (a) (b) (c) (d) (e) Figure.1 is a phantom ultrasound image. Figure.2 is a human liver ultrasound image. Figure.3 is a human liver and kidney ultrasound image. Figure.4 is a human kidney ultrasound image. (a) Original image; (b) One filtering step result of FABF; (c) 100 filtering steps result of SRAD; (d) Speckle Detection; (e) Some filtering steps result of FABF.
303
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
5. Conclusion In order to suppress speckle effectively and to preserve the structure in ultrasound image, we have presented a fast adaptive bilateral filter (FABF) based on local histogram matching. The presented filter is derived from a conventional bilateral filter. A local histogram matching technique is applied to differentiate speckle from tissue structure and to categorize the whole image into two different feature patterns followed by the adjustable fast bilateral filtering. Our method can be adapted to perform bilateral filtering which becomes a highly effective speckle-removal tool. Testing in phantom and in vivo imaging demonstrates that our method can maintain the structure and also reduce speckle noise effectively. It is our hope that the speed and adaptability of this new algorithm will make it useful across other clinical ultrasound applications such as breast and fetal imaging. Further investigation into these areas is necessary.
6. Appendix If Iq is equal to j and I is the range of intensity, the following formation can be derived from Equation (2).
(I jI
q
j) 1
(A.1)
According to Equation (2) and Equation (A.1), we can obtain the following equation when Iq is equal to j.
B(|| p q ||)G (| I qS
p
I q |) I q ( I q j )B(|| p q ||)G (| I p I q |) I q qS jI
( I q j )B(|| p q ||)G (| I p j |) j ( I q j ) B(|| p q ||)G (| I p j |) j qS jI
(A.2)
jI qS
H ( j ) B(|| p q ||)G (| I p j |) j jI
7. Acknowledgment The authors extend thanks to Jie Ren for many valuable suggestions during the algorithm development and testing in simulation and phantom data.
8. References [1] V.Behar, D.Adam, Z.Friedman, “A new method of spatial compounding imaging”, Ultrasonics, vol. 41, pp. 377–384, 2003. [2] P.Liu and D.C.Liu, “Directive Filtering Schemes for Frequency Compounding in Ultrasound Speckle Reduction”, Proceedings of International Pre-Olympic Congress on Computer Science, pp.227-231, 2008. [3] Vinayak Dutt, James F.Greenleaf, “Adaptive Speckle Reduction Filter for Log-Compressed BScan Images”, IEEE Trans. Medical Imaging, v.15, p802-813, 1996. [4] Y. Chen, R. Yin, P. Flynn, S. Broschat. “Aggressive region growing for speckle reduction in ultrasound images”, Pattern Recognition Letters 24 677-691, 2003. [5] Dong C. Liu, S. Czenszak and J. Kim, “Adaptive speckle reduction with color transparency display”, Proc. of IEEE Ultrason. Symp, pp.1611-1614, 1998. [6] X.Y. Li and D.C. Liu, “Ultrasound speckle reduction based on image segmentation and diffused region growing”, 9th International Conference on Computer Vision, Pattern Recognition and Image Processing, 2008. [7] Y. Yu and S. T. Acton, “Speckle reducing anisotropic diffusion”, IEEE Trans. Image Processing, vol. 11, no. 11, pp. 1260-1270, Nov. 2002.
304
Histogram-Based Fast Adaptive Bilateral Filter for Ultrasound Speckle Reduction Dangguo Shao, Paul Liu, Dong C. Liu
[8] Zhang Fang, Xiao Zhitao, Wu Jun, Xi Jiangtao, "Overview of The Partial Differential Equation Filter Method for The Electronic Speckle Pattern Interferometry Fringes", JDCTA, Vol. 5, No. 10, pp. 419 ~ 426, 2011 [9] Yuanjiang Li, Yuehua LI, Jianqiao Wang, "Passive Millimeter-wave Image Restoration Based on Symmetric Inverse Gaussian Model", JDCTA, Vol. 5, No. 3, pp. 87 ~ 97, 2011 [10] Yuanjiang Li, Yuehua Li, Han Xiao, Yingkun Hou, "Passive Millimeter-wave Image Restoration Based on an Improved Fuzz Morphological Filter", JDCTA, Vol. 5, No. 4, pp. 313 ~ 322, 2011. [11] Elad M., “On the origin of the bilateral filter and ways to improve it”, IEEE Transactions on Image Processing, vol. 11, pp. 1141-1151, 2002. [12] S.Bae,S.Paris,and F.Durand, “Two-scale tone management for photographic look”, ACM Transactions on Graphics, vol.25,no.3, pp.637–645, 2006. [13] S. Paris, P. Kornprobst, JT Tumblin. “Bilateral Filtering: Theory and Applications”, Foundations and trends in computer graphics and vision [1572-2740] Paris yr: vol: 4 iss: 1 pg: 1, 2008. [14] Simon Perreault and Patrick He′bert, “Median Filtering in Constant Time”, Image Processing, IEEE Transactions on, vol.16, pp.2389–2394, 2007.
305