15. adaptive weighted median filter

Upload: jebilee

Post on 14-Apr-2018

271 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 15. Adaptive Weighted Median Filter

    1/7

    is used as the dummy basic waveform filling up the vacancy. Itcan be shown easily that the zero vector does not interfere withthe functioning of the network. By the application of (1)-(3), thej t h basic waveform stored previously is exchanged for the newlygiven one. When the previous waveform is the zero vector, theexchange corresponds to the addition of the new waveform; andwhen the new waveform is the zero vector, the exchange corre-sponds to the deletion of the previous waveform.Following is the procedure that exchanges the j t h basic wave-form. Firstly, the connection of the lines is switched as follows.The feedback lines are disconnected from the outputs. The volt-age of the j t h feedback line is set to 1 and other feedback lines to0. The constant voltage V is set to 2 and is fed only to the resistorT,, connected with the j t h vertical line. Other resistors Tko( f j )are disconnected from the constant voltage line. Secondly, a newwaveform Z is supplied to the input lines. Thirdly, the conduc-tances are modified. The modifications are applied only to theresistors connected with the j t h vertical line or j t h feedback line.The other conductances are fixed. Arrows in Fig. 1are subjoinedonly with the resistors that are needed to be modified in this case.(The arrows are actually subjoined with all resistors in order tomodify all basic waveforms.) The arrows show that the conduc-tance at the head of an arrow is modified depending on thevoltage or conductance at the tail of that arrow. For everyi ( i =1;. .,N ) , the conductance S,, is set in proportion to thevoltage on the horizontal line (S,,=4 ) . he conductances T,,,and Tk (k f j ; k =1 , . . . M ) are determined by the voltage onthe vertical lines. Each of these conductances takes the value atwhich the voltage uk on the vertical line is zero. And theconductances T J k (k f j ; k =1; . . M ) are set equal to Tk (Tk =T k ) . inally, the conductances are fixed and the connections ofthe lines are returned to the original state.

    Equations (1)-(3) can be introduced by the algorithm. Equa-tion (1) is obvious. Equations (2) and (3 ) are obtained from theequation of the voltage u k . As in [l], the input impedance of theamplifier is assumed equivalent to that of the parallel circuit ofthe resistor R and capacitor C. Then the voltage u k on the kthvertical line satisfiesN M

    ( - k ) + kO( -k ) + k k ( V k - u k )i = l k = l

    duk uk=c- +- . (4 )dt RApplying the above algorithm, one can reduce (4 ) to (2) whenk = , and to (3 ) when k #j.It is also valuable to consider the case in which S( i=1 , . . .,N ) is not overridden by the new value but shifts alittle from i ts old value. In this case, the network may respond tothe average of the new waveform and old one.

    111. DISCUSSIONThe simulation studies showed that the state of the networksometimes falls into the local minimum of the energy function.The global minimum was not always obtained. It may be ashortcoming of the network, but may be overcome by means ofthe simulated annealing technique which was used in neuralnetwork researches [ 2 ] , 3].The resistors in the network may be realized by voltage-con-trolled resistors. Each conductance for S is controlled in propor-tion to the line voltage. Each conductance for TJ P and Tk J iscontrolled in proportion to the output of an invertmg integrator

    which integrates the line voltage. It is shown easily that thecircuit brings the line voltage to zero. Each control for T J k issame as that for T k J .The proposed algorithm has the following advantages. First,basic waveforms already learned need not be maintained, becausethese are not needed for learning a new one. Only the newwaveform and its basic waveform number are needed. Second,the learning process is completed in a short time, because it doesnot include repeti tive presentation of basic waveforms.Though the algorithm is not applicable to other neural net-works [4], it may be utilized in signal decomposition/decisionproblems.REFERENCES

    [ l ] D. W. Tank and J. J. Hopfield, Simple neural optimization networks:an A/D converter, signal decision circuit, and a linear programmingcircuit, I EEE Tr ans . Cmu ir s Syst., vol. CAS-33, pp. 533-541, May 1986.D. E. Rumelhart, J. L. McClelland, and the PDP Research Group Eds..Parallel distributed processing-Explorations in the microstructure ofcognition, vol. 1, Foundations.P. D. Wasserman and T. Schwartz, Neural networks, Part 2: What arethey and why is everybody so interested in them now?, I E E E E x p e rt ,vol. 3, pp. 10-15, 1988.R. P. Lippmann, An introduction to computing with neural nets, I EEEAcoust. Speech, Signul Processing Mug., pp. 4-22, Apr. 1987.

    [2 ]Cambridge, MA: MIT Press, 1986.

    [3]

    [4]

    An Adaptive Weigh ted Median Filter for Spe ckleSuppression in Medical U ltrasonic ImagesT.LOUPAS, W. N. MCDICKEN, AND P. L. ALLAN

    Abstruct-A method for reducing speckle noise in medical ultrasonicimages is presented. It is called the adaptive weighted median filter(AWMF) and it is based on the weighted median, which originates fromthe well-know n median filter through the introdu ction of we ight coeffi-cients. By adjusting the weight coefficients and consequently the smooth-ing characteristics of the filter according to the local statistics around eachpoint of the imag e, it is possible to suppress noise while edg es and otherimportant features are preserved. Application of the filter to severalultrasonic scans has shown that processing improves the detectability ofsmall structures and subtle grey-scale variations without affecting thesharpness or anatomical information of the original image. Comparisonwith the pure median filter demonstrates the s uperiority of adaptivetechniques over their space-invariant counterparts. Examples of processedimages show that the AWMF preserves small details better than othernonlinear space-varying filters which offer equal noise reduction in uni-form areas.

    I. INTRODUCTIONSince the advent of real-time ultrasonic imaging, ultrasound isbeing used at an ever increasing rate and has been established asone of the most important techniques in the field of medicaldiagnostic technology. Image quality is of central importance tothe success of an ultrasonic examination. However, ultrasonic

    Manuscript received October 5 , 1987; revised March 30, 1988. This workwas supported in part by the Scottish Home and Health Office. T. Loupasswork was supported by the State Scholarship Foundat ion of Greece and bythe British Council. This paper wa s recommended by Associate Editor H.Gharavi.T. Loupas and W . N. McDicken are with the Depar tment of MedicalPhysincs and Medical Engineering, University of Edinburgh, Edinburgh EH39YW, United Kingdom.P. L. Allan is with the Department of Medical Radiology, University ofEdinburgh, Edinburgh EH3 9YW, United Kingdom.IEEE Log Number 8824586.

    IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS, VOL. 36 , NO. 1, JANUARY 1989 12 9

    OO98-4094/89/01OO-0129$01 .OO01989 IEEE

  • 7/30/2019 15. Adaptive Weighted Median Filter

    2/7

    130 IEEE TRANSACTIONS ON CIRCUITSAND SYSTEMS, VOL.6, NO. 1,JANUARY 1989images suffer from a type of acoustic noise called speckle [l ],which represents one of the major sources of image qualitydegradation. Ultrasonic speckle, like similar phenomena encoun-tered in laser and microwave radar imaging, is an interferenceeffect caused by the scattering of the ultrasonic beam frommicroscopic tissue inhomogeneities [2]. The resulting granularpattern does not correspond to the actual tissue microstructure.On the contrary, speckle tends to mask the presence of low-con-trast lesions and reduces the ability of a human observer toresolve fine detail [3]. Hence, speckle suppression by means ofdigital image processing should improve image quality and possi-bly the diagnostic potential of medical ultrasound.Ultrasonic scans represent a very difficult and demandingapplication area for noise reduction algorithms because, althoughthey are heavily corrupted by noise, they possess sharp contrastwhich should be retained. In addition, they contain a variety offeatures which should also be preserved. These include brightlarge-scale interfaces between organs such as liver and di-aphragm, structures such as small blood vessels with dimensionscomparable to the average speckle size and, more importantly,boundaries between areas of slightly different grey-scale levelwhich enable the physician to detect abnormalities such as tu-mors. Linear filters are not suitable for this type of imagesbecause they introduce severe blurring and loss of diagnosticallysignificant information.

    The inadequacy of linear filtering techniques has long beenrecognized by the image processing community. In order toovercome their limitations, several nonlinear algorithms havebeen introduced with the well-known median filter [4] probablythe most popular among them. The median filter has been widelyapplied in image processing, including medical imaging [5], [6],because of its edge preserving properties and simplicity of imple-mentation. Recently, considerable effort has been devoted indeveloping more general families of nonlinear order statisticsfilters [7]-[lo] with some very interesting results.In this paper, a new nonlinear space-varying filter called theadaptive weighted median filter (AWMF) is presented. Theweighted median, which is the basic estimation unit of the filter,is introduced in Section I1 together with a brief discussion on theeffect of the weight coefficientson the weighted medians perfor-mance. Section I11 introduces the idea of adjusting the weightcoefficients according to the local statistics of the image in orderto achieve maximum noise reduction in uniform areas but alsopreserve resolvable structures. Comparisons with other nonlinearfilters based on the median are presented in Section IV. Althoughthe effectiveness of the AWMF is demonstrated only by applyingit to ultrasonic scans, this approach could be useful for any typeof speckle suppression problem where signal preservation is veryimportant, provided that a single quantity which characterizesthe statistical properties of speckle can be found. For example,the ratio of the local standard deviation to the local mean couldbe chosen to characterize laser speckle because it is independentof the signal intensity [ll ].

    11. THEWEIGHTED EDIANThe weighted median is a general class of median-type filters,of which the pure median is a special case. This type of filter hasbeen applied to astronomical images for object removal, with theweight coefficients chosen so that specified desirable features arepreserved [12]. More recently, a 3-by-3 weighted median filtercapable of real-time operation has been developed for impulsesuppression in FM satellite TV signals [13].

    25

    20

    15

    T10

    5

    Fig. 1.

    . . . . . . . . . .1 2 3 4 5 8 7 8 0 IOj

    \ family of linear weight coefficients with variable slope a

    For the sake of simplicity the filters examined in this sectionare one-dimensional. The weighted median of a sequence {X , }isdefined as the pure median of the extended sequence formed bytaking each term X , , w, imes, where {w, are the correspondingweight coefficients [14]. For example, if w1=2, w,=3, w3=2,the weighted median of the sequence {X I , X,, X3} is given by

    Intuitively, it is expected that as more emphasis is placed onthe central weights the ability of the weighted median to suppressnoise decreases but also the signal preservation increases. This isa very useful characteristic because it allows the design of aspace-varying filter which combines median-type properties withadjustable smoothing. One way of achieving this is to choose afamily of weights which decrease as we move away from thecenter of the window and the rate of decrease is controlled by thelocal image content. This is the main idea behind the adaptiveweighted median. Families of weights which have been proposedfor the design of digital FIR fil ters using the window method [15]are suitable for this type of application. Since the families wehave experimented with (generalized Hamming, Kaiser, etc.) havecomparable performance, the simplest and computationally moreefficient of all has been chosen. This is a family of linear weightswith variable slope a. For a 2K +1-point window, the weightcoefficient w, at point i is given by

    W,=[wK+ - K +1- ll. (2)The symbol [ X I denotes the nearest integer to x if x is positive,or zero if x is negative. The pure median corresponds to a=0with all the weights equal to For the following applicationsa window size of 2K +1=9 has been used. Fig. 1displays theweights for three values of a.Some of the first- and second-order probability density func-tions (PDFs) of the weighted median have been derived in [16].The resulting expressions tend to be very long and cumbersomeso they will not be repeated here. However, they will be used togive an insight to the effects of the weights on the weightedmedians smoothing characteristics. It must be noted that due tothe nonlinear nature of the weighted median the curves shown inFigs. 2-4 are only valid for the specific input distributionsmentioned in the text.

  • 7/30/2019 15. Adaptive Weighted Median Filter

    3/7

    IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS, VOL.6, NO. 1, J A N U A R Y 1989 13 1The variance u k M of the weighted median when the input is acons tant signal corrupted by noise gives an indication of thefilters ability to suppress noise in uniform areas. By using theprobability density function fWM(x) of the weighted medianwhen the input is a constant signal m corrupted by whiteadditive noise having a symmetric PDF, the theoretical outputvariance ukMthcan be calculated from

    (3 )The variance ukMth s plotted in Fig. 2 as a solid curve for thecase of Gaussian noise with mean 0 and variance 1.From [14], anapproximate expression for the variance ukMapof the weightedmedian is given in terms of the approximate variance of the puremedian ugMapby

    which suggests that the variance of the weighted median isproportional to the ratio p, defined as

    p takes values between 1/(2K +1) if all the weights are equal,and 1 f only one weight has a nonzero value. p is also plotted inFig. 2 as a broken curve. Comparison between the two curvesshows that the theoretical variance is indeed proportional to p forsmall values of a. The agreement deteriorates after the pointa=4 because the assumption made in the derivation of (4) thatnone of the weights wf is considerably larger than the rest is nolonger valid.It is well known that median-type filters preserve ideal edges.However, in the presence of noise they do introduce edge distor-tion although this is smaller than the distortion introduced bylinear filters [17]. As a quantitative index of the weighted mediansperformance in edge preservation when noise is present the meansquare error MSE has been used. Let us consider an ideal edge ofheights h , , h , , with the transition occurring at point M andcorrupted by white additive noise. Since for a filter size of 2 K +1the window encounters the edge 2 K times, the total MSE isdefined from [17] as

    M + K - 1total MSE = E { (y, - ,)}1 - M - KM + K - 1

    = C J(x-s,)fwM(x;i)dx (6)r = M - K

    whereY, filter output when the window is centered at posi-tion i,s, signal value at that point before noise was added,fwM(x; ) PDF of the weighted median at position i whenthe input is an ideal edge corrupted by whiteadditive noise.

    The total MSE is plotted as a solid curve in Fig. 3 for the case ofGaussian noise with mean 0, variance 1, and edge heights h , =0,h , =5. The broken curve represents the inverse quantity of (59,l /p =[CW,]~/[CW?].gain there is a close agreement betweenthe two curves up to a value of a=4.Figs. 2 and 3 follow a similar pattern. For weights relativelyclose to the central value (slope values a=0 to 2) the filter

    0.30

    0.15 1

    3 6S L O P E aFig. 2. Output variance of the weighted median (solid curve) and p (brokencurve) as a function of the slope a of the weight coefficients. The input iswhite Gaussian noise with mean 0 and variance 1

    .- \ \ \\I \

    \\ \

    3 6S L O P E aFig. 3. Total M SE introduced by the weighted median (solid curve) and l/ p(broken curve) as a function of the slope a of the weight coeffici ents. Theinput sequence is an ideal edge corrupted by white additive Gaussian noisewith mean 0 and variance 1.

    behaves almost as a pure median, offering maximum noise sup-pression in uniform areas but also introducing maximum distor-tion to edges corrupted by noise. However as the slope a in-creases, i.e., the weights fall more rapidly as we move away fromthe center of the window, signal preservation improves at theexpense of the abili ty to reduce noise. Signal preservation isproportional and noise reduction is inversely proportional to pprovided that the weights do not have significantly differentvalues. The ability of the ratio p to describe the weighted mediansperformance improves as the filter window becomes larger.By calculating the Fourier transform of the autocorrelation ofthe output when the input is a constant signal corrupted by whiteadditive noise, the power spectrum of the weighted median hasbeen obtained for slope values a=0, 3, and 6 (Fig. 4). This figureillustrates how the slope a modifies the low-pass characteristicsof the weighted median. As the slope increases the bandwidthbecomes wider while both ripple and attenuation in the stopbandzone are reduced. It is interesting to note the similarity betweenthis behaviour and that of the weighted average filters.

  • 7/30/2019 15. Adaptive Weighted Median Filter

    4/7

    I

    15 -EEE TRANSACTIONS ON CIRCUITS AND SYSTEMS, VOL.6, NO. 1,JANUARY 198932

    DaB5Gaw

    \-5 h \ \ \

    aEaPI

    -15-!- 2 0

    0 0

    0.10 0.20 0.30 0.40 0.50NORMALISED FREQUENCYFig. 4. Normalized power spectrum of the weighted median for three differ-ent sets of weight coefficients. The input is a constant signal plus whiteadditive Gaussian noise (quantized to 32 levels).

    ~

    30 BO BOMEAN GREY-SCALE LEVELStandard deviation vs. the mean of ultrasonic speckle noiseig. 5 .

    111. THEADAPTIVEEIGHTED EDIANFILTERIt has been stated already in Section I that a noise smoothing

    algorithm applied t o ultrasonic scans must satisfy several diverseand conflicting requirements. A space-invariant filter which per-forms the same type of operation to every pixel of an imagecannot satisfy all requirements simultaneously. This is true evenin the case of nonlinear edge-preserving filters because signalpreservation deteriorates rapidly as the window size increases toprovide adequate noise reduction. Clearly what is needed is aspace-varying algorithm which takes into account the local imagecontent.Local statistics have been widely used to describe the imagecontent in space-varying filtering applications [18]. The statisticsof ultrasonic speckle have been studied along similiar lines aslaser and synthetic aperture radar speckle [19]. It has been foundthat the envelope-detected signal has Rayleigh distribution withmean proportional to the standard deviation. This implies thatspeckle could be modelled as multiplicative noise. However, thesignal processing stages inside the scanner (logarithmic compres-sion, low-pass filtering, interpolation) modify the statistics of theoriginal signal. By taking into account these factors we havearrived at the graph of the standard deviation versus the mean ofspeckle shown in Fig. 5. The solid curve has been obtained bymodeling the signal processing stages mentioned above. Thepoints represent experimental measurements from scans of ob-jects which have acoustic properties similar to those of soft tissue(tissue mimicking phantoms). From this figure it is evident thatspeckle is no longer multiplicative in the sense that the mean isproportional to the variance rather than the standard deviation.Therefore, if x denotes the true signal, n is a noise term which isindependent of x and has mean 0 and y is the observed signal,the following signal-dependent noise model can be used:

    y =x +x 1 l 2 n . (7)Assuming that a uniform area is scanned, i.e., x =m is constant,it can be easily proven from (7) that the variance U of theobserved signal is U =mu:, where U? is the noise variance. Thecurve of Fig. 5 establishes the expected values of u/m foruniform areas of speckle.

    The adaptive weighted median (AWM) takes advantage of thefact that the ratio u/m can characterize the local image contentby performing space-varying weighted median filtering with theweight coefficients adjusted according to the local statistics of theimage by using the formulaw(i, ) =[w( K +1,K+ 1 ) - do/rn]

    wherec scaling constant,m , U the local mean and variance inside the 2 K +1 by2 K +1 window,d distance of the point ( 2 , j ) from the centre of thewindow ( K +1,K +l),[XI defined as in ( 2 ) .

    Equation (8) is the 2-D equivalent of the weight equation ( 2 ) withthe product c d / m corresponding to the slope a. n Section I1 ithas been demonstrated that the selection of the weight coeffi-cients represents a trade-off between noise reduction and signalpreservation. F or uniform areas where intensity fluctuations aredue to noise, the local mean and variance follow the curve of Fig.5. The constant c has been chosen so that in this case the slopecu/m has a low value. Hence, maximum noise reduction isperformed. However when the filter window includes a resolvablestructure or a boundary between two regions of different grey-scale level, the local variance is larger than that expected from auniform area having the same local mean. Consequently, theslope increases and fine image detail can be preserved.The AWMF parameters have been selected experimentally interms of the clinical quality of the processed image. In thefollowing applications the window size, which determines themaximum noise reduction, is 9 by 9. The scaling constant c andthe central weight w(K +1,K +l),which determine the filtersability to preserve image detail are equal to 20 and 99 , respec-tively. Experience has shown that the values chosen give satisfac-tory results with a variety of images from different patients andscanners.The images of Fig. 6, which display part of the liver and portalvein, are used to demonstrate the AWM filters ability to preservenot only bright edges but also subtle grey-scale variations. Fig.6(a) is a magnified region taken from a 576X530X&bit ultra-sonic scan and Fig. 6(b) is the same region taken from the

  • 7/30/2019 15. Adaptive Weighted Median Filter

    5/7

    IEEE TRANSACTIONS ON C I R C U I T SAND S YS T E MS , vnL 36. NO . 1, JANIJARY 1989 133

    LO 40 60R OW No

    (b )Fig. 6. Part of an ultrasonic scan of the liver (L) and portal vein (PV). (a )Original. (b ) Adaptive weighted median 9 by 9. The images have beenmagnified from 64x 64 to 256x 256

    processed scan. Comparisons between the two images shows thatspeckle has been almost totally eliminated and the visibility ofthe hypoechoic area above the portal vein has been greatlyenhanced in the processed image. Some quantitative data aboutthe AWM filters operation, calculated from Fig. 6 along thecolumns indicated by the white markers and using 9 by 9windows, are presented in Fig. 7. The ratio u/m of the localvariance to the local mean of the original image is plotted in Fig.7(a) and i ts effect on the weight coefficients of the AWMF can beseen in Fig. 7(b) which plots the quantity p = [ X w 2 ( i , ) ] /[ C w ( i , ) ] , already defined in (5) for the 1-D case. Finally, thenoise reduction acheved can be seen from Fig. 7(c) which plotsthe ratio uiWM/u2of the local variance of the processed over thelocal variance of the original image. The three graphs followsimilar patterns with high values of u 2 / m , which imply thepresence of an edge or resolvable structure, resulting in less noisereduction. Also, p is approximately proportional to the varianceuiWM,omething observed in Section I1 for the 1-D case.The AWMF possesses certain advantages. The use of localstatistics enables space-varying processing to be performed whichtakes into account the local image content. The median-typenature of the filter guarantees good signal preservation even inregions of subtle grey-scale variations, like the hypoechoic area ofFig. 6(a) and 6(b). In addition, the weighted median is moresuitable than the pure median for a space-varying applicationbecause it offers more flexibility. The smoothing characteristicsof the pure median can only be controlled by its window size. Onthe contrary, it has been shown in [20] hat for a given windowlength the weighted median acts in a very large (but finite) wayon the data, depending on the selection of the weight coefficients.The method for finding the AWM at a particular point in-volves a three-step procedure. First, the local statistics of theterms inside the window and the weight coefficients are calcu-lated. Next, the grey-level histogram H ( ) , =1, . ., (maximum

    (9)

    b

    Fig. 7. (a) Ratio a 2 /m along column 23 of the original image of Fig. 6(a).calculated using a 9 by 9 window. (b) Corres onding values for the ratlo pof the AWMF. (c) The 9 by 9 variance along column 23 of theprocessed image of Fig. 6(b), normalized by the variance a calculatedalong the same column of the original image.

    grey level), of the minimum square window which includes all thenonzero weight coefficients is formed by examining the grey levelx , , of each pixel (2, j ) and incrementing H(x,,)y the corre-sponding weight coefficient. Finally, the weighted median isdetermined as the smallest grey level y,, which satisfies

    VW MH ( I ) 2 ( c w ( r n . n ) + 1 ) / 2

    / = 1

    where Z w ( m , n ) is the sum of the weight coefficients.IV . COMPARISONS

    The AWMF was compared with three more nonlinear filters.The task of comparing different algorithms can be very difficult,especially when real instead of simulated images are to be pro-cessed, because there is not an objective way of selecting theparameters such as window size, thresholds etc. of the algorithmsinvolved. The approach followed here was to process speckleimages obtained from tissue mimicking phantoms which do notcontain any resolvable structures and choose the parameterswhich offered equal noise reduction.Fig. 8(a) is a scan of the liver, gallbladder and the hepatic vein.The 64X 64 area enclosed by the white square has been magnifiedand is displayed as a 12 8x 12 8 image at the top left part of Fig.8(a). The vertical profile of the intensities along the columnindicated by the markers above and below the square is displayedat the top-right part of the image. The processed images of Fig. 8are also displayed following the same format. Processing by theAWMF results in Fig. 8(b). Comparison with Fig. 8(a) shows thatspeckle has been suppressed to a great extent in the processedimage while the edges are as sharp as in the original and all theimportant features have been preserved. Also. processing seemsto improve the resolution of small structures, like the portaltracts and small blood vessels in the left part of the scan, which

  • 7/30/2019 15. Adaptive Weighted Median Filter

    6/7

    134

    ( e )Fig 8 Ultrasoiu \can of th e lner (L), ailbladder I(%) and the hepahc win (hv) (a)Ongind (b) dlrrpti\e ueightd m e d u n V 1% 9( ci Sepatdhlemedian of 5 pomti (d) Vanablelength rrretlian 9 bv 9 ( e ) T3W MTM 7 h\ 7

    were previously obscured by speckle. Fig. X(c) is obtained byprocessing the original scan with a separable median of 5 points(first along the vertical and then along the horizontal direction)which wa s preferred instead of the 2-D median because in somecases it offers better signal preservation [21]. This figure demon-strates the inadequacy of space-invariant filters. Despite th e factthat a small window of 5 points was chosen. there is considerable

    loss of image detail and also insufficient noise suppression, &\ itcan be seen by coinpmng Fig X(b) and (c). An additionaldisadvantage is that the processed scan has a \ e m blotchy ap-pearance. A 7- or 9-point mindow uhicb offers cmnparable noisereduction to that of the AWMF introduces severe blurnng andresults In an image uhere almost all diagnostic inforniation i slost. A5 a computationally len demanding aiternativo to the

  • 7/30/2019 15. Adaptive Weighted Median Filter

    7/7

    IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS, VOL.6, NO. 1, JANUARY 1989 135AWM F the original scan has been processed by a variable-lengthmedian filter (Fig. S(d)). This is a 2-D median filter with awindow size 2N+1 by 2N +1 calculated at each point from theformula

    N =[K (1- u 2 / m > ]where

    2K +1 by 2 K +1 maximum window size,m ,U mean and variance of the terms inside the2K +1 b y2 K+ 1 window,C scaling constant,[ defined as in (2).

    The parameters chosen for this filter were 2 K +1=9 and c =0.30. Fig. S(b) and S(d) exhibit similar appearance, something notvery surprising since both filters use the same local statisticscriterion. However the variable-length median is not able toperform fine adjustments to its smoothing characteristics becauseit can only offer a few distinct modes of action (5 in this case:from window size 9 by 9 to 1 by 1).This inflexibility, whichresults in smearing of fine details such as the branch of thehepatic vein indicated by the arrow, restricts the diagnosticquali ty of the processed image. The result of processing theoriginal scan by the double-window modified trimmed mean(DW MTM) filter is shown in Fig. S(e). This is an adaptivenonlinear filter which can be implemented without having tocalculate the local statistics at each point of the image and hasbeen found to perform better than other generalized medianfilters [SI. The DW MTM filter involves a two-step procedure.First, the median m ,, of a small window centered at pixel ( 2 , j ) sfound and used as an initial estimate of the true signal value.Then, a better estimate is obtained by averaging all the termsinside a larger window which lie within the interval [ m , ,- , m ,,+q]. The threshold q is related to the noise variance and ingeneral it is signal-dependent and determined by the type ofnoise degradation [22]. For the noise model assumed here (7), qis given by

    q =c {m,, }1The filter parameters chosen were: median window 3-by-3, meanwindow 7-by-7, c =2. The DW MTM has a satisfactory perfor-mance as it can be seen from Fig. Se. Speckle has been reducedsubstantially and the overall appearance of the scan is muchcleaner. However, comparison between Fig. S(b) and (e) showsthat the DW MTM filter has an inferior performance in signalpreservation than the AWMF. For example, the visibility ofsmall structures such as the portal tracts and blood vessels in theleft part of Fig. S(e) has been reduced. This happens becauseeven the use of a small 3-by-3 window for calculating the medianm,, can cause loss of image detail. Also, the averaging operationperformed during the second phase of DW MTM filtering canintroduce a degree of blurring, something which can be appreci-ated better by comparing the magnified regions of Fig. S(b) and(9 .As far as computational complexity is concerned the AWMF isthe least efficient of the filters compared here. The average CPUtimes on a MicorVax I1 were: separable median-15 s, DWMTM-100 s, variable-length median-110 s, AWMF-230 s.However, this is not regarded as a serious disadvantage for anoff-line application such as ours. A clinical trial involving seventyfive patients is in progress to evaluate the clinical usefulness ofthis technique

    V. CONCLUSIONThe flexibility offered by the WMs through the selection ofthe appropriate weight coefficients can make the use of median-type filters more efficient and better suited to particular appli-cations. The AWM filter for speckle suppression in medicalultrasonic images demonstrates this. The filter combines theedge-preserving properties of the W Ms with the space-varyingimplementation based on the local image characteristics to re-duce significantly the speckle with negligible loss of genuine

    image detail. The examples shown above indicate that processingimproves the detectability of subtle grey-scale variations andsmall structures within the parenchyma of an organ, and seems toenhance the information content of an image.ACKNOWLEDGMENT

    The authors would like to thank the referees for providingREFERENCES

    constructive comments and suggestions.[ l ][2][3][4]

    [5]

    C. B. Burckha rdt, Speckle in ultrasound B-mode scans, I EEE Tr an s.Sonic Ultrason., vol. SU-25, pp. 1-6, Jan. 1978.J. G. Abbott and F. L. Thurnstone, Acoustic speckle: Theory andexperimental analysis, Ultrason. Imag., vol. 1, pp. 303-324, 1979 .S. W. Smith and H. Lopez, A contrast-detail analysis of diagnosticultrasound imaging, Med. Phys . , vol. 9, pp. 4-12, 1982.W . K. Pratt, Digital Image Processing. New York: Wiley, 1978, pp.330-333.A. Ioannidis, D. Kazakos, and D. D. Watson, Application of medianfiltering on nuclear medicine scintigram images. in Proc. 7th Inr. Conf.Pattern Recognition, Montreal , Canada, pp. 33-36, 1984.E. R. Riteno ur, T. R. Nelson, and U. Raff, Appli cations of the medianfilter to digital radiographic images, in Proc. IEEE In t . Conf. Acousr.Speech, Signal Processing, San Diego, CA, pp. 23.1.1-23.1.4, 1984.A. C. Bovik, T. S. Huang, and D. C. Munson, Jr., A generalization ofmedian filtering using linear combinatio ns of ord er statistics, I E E ETrans. Acoust., Speech, Signal Processing, vol. ASSP-31, pp. 1342-1349,Dec. 1983.Y. H. Lee and S. A. Kassam, Generalized median filtering and relatednonlinear filtering techniques. IEEE Trans . Acoust . , Speech, SignalProcessing, vol. ASSP-33, pp. 672-683, June 1985.I. Pitas and A. N. Venetsanopoulos, Nonlinear order statistic filters forimage filtering and edge detection, Signal Processing, vol. 10, pp.R. Bernstein, Adaptive nonlinear filters for simultaneous removal ofdifferent kinds of noise in images, IEEE Trans . Circui ts Syst., vol.CAS-34, pp. 127551291. Nov. 1987.J. W. Goodman, Some fundamental properties of laser speckle, J .Opt. Soc. Amer. , vol. 66, pp . 1145-1150. Nov. 1976.

    [6]

    [7]

    [8]

    [9]395-413, 1986.

    [lo]

    [ l l ]D. R. K. Brownrigg, 6;eighted median filter, Commun. Assoc.Comput. Mach. , vol. 27, pp. 807-818, Aug. 1984.S. S. Perlman, S. Esenhandler, P. W. Lyons, and M. J. Shumila,Adapti ve median filtering for impulse noise elimination in real-time TVsignals, IEEE Trans . Commun. , vol. COM-35, pp. 646-652, June 1987.B. I. Justusson, Med ian filtering: Statistical properties, in Two Dimen-sional Signal Processing I I : Transform and Median Fil ters . New York:Springer-Verlag. 1981, ch. 5.A. V. Oppenheim and R. W. Schafer, Digital Signal Processing. Engle-wood Cliffs, NJ: Prentice-Hall, 1975, chap. 5.T. Loupas, Digital image processing for noise reduction in medicalultrasonic images, Ph.D. dissertation, Appendix A, Univ. of Edin burgh,Scotland, 1988.C. A. Pomalaza-Rae and C. D. McGillem. An adaptive nonlinear edgepreserving filter, IEE E Trans . Acoust . , Speech, Signal Process ing, vol.ASSP-32, pp. 571-576, June 1984.V. T. Tom, Adaptiv e filters for digital image enhancement, i n DigitalImag e Processing; critical review of technologv. Proc. SPIE, vol. 528, pp.29-42, 1985.R. F. Wagner, S . W. Smith, J. M. Sandrik, and H. Lopez, Statistics ofspeckle in ultrasound B-scans, IEEE Trans . Sonic Ultrason. ,vol. SU-30,pp. 156-163, May 1983.D. R. K. Brownrigg. Genera tion of representative members of an RrSstweighted median filter class, Proc. Ins t . Elect. Eng., vol. 133, pt. F, pp.G. Y. Liao, T. A. Nodes, and N. C. Gallagher Jr., Output distributionsof two dimensional median filters, IEEE Trans . Acoust . , Speech, Sig-nal Processing. vol. ASSP-33, pp. 1280-1295, Oct. 1985.R. Ding and A. N. Venetsanopoulos, Generalized homomorphic andadaptiv e order statistics filters for the removal of impulsive and signal-dependent noise, IEEE Trans . Circui ts Syst.. vol. CAS-34, pp. 948-955,Aug. 1987.

    445-448, Aug. 1986.