1-s2.0-0146664x81900770-main

Upload: debdutta-ghosh

Post on 03-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 1-s2.0-0146664X81900770-main

    1/15

    COMPUTER GRAPHICS AND IMAGE PROCESSING 15, 167- 181 (1981)

    NOTEGradient Inverse Weighted Smoothing Scheme and the

    Evaluation of Its PerformanceDAVI D C . C . WANG AND ANTHO NY H. VAG NUCCI

    Montefore Hospiial, Uniwrsity of Pittsburgh School of Medicine, Pittsbwg~ Penmyloania 15213

    AND

    c. c . LIDepartme nt of Electrical Engin eering, Uniwrsi@ of Pittsburgh, Pittsburgh, Pennryl oania I5261

    Received January 17, 1980; revised March 31, 1980This paper presents an image smoothing scheme for improveme nt of the qual i ty of noisypictures. I t is an i terative schem e employing a 3 x 3 ma sk in which the weighting coeff ic ientsare the normalized gradient inverse between the center pixel and its neighbors. The smo othingoperation tends to clean out noise inside a region without blurring its bounda ry. In order toevaluate the performance of the proposed schem e, we adopt an f statisticwhich is based onthe analysis of variance. Simulation studies show that this method reduces the gray level

    scattering within a region, and keeps i ts mean relatively unchanged. Appl ications to severalreal world image s are il lustrated.1 . I NTRO DUCTI O N

    During the past two decades, much effort has been devoted to the developmentof techniques of image processing by digital computers. However, the outcome issometimes still limited by the quality of pictures. In general, a digitized picture canbe degraded by (1) noise inside the object and within the background, and (2)smearing of the objects boundary. To remove the first degradation, image smooth-ing is usually performed. To sharpen the boundary, edge enhancement can beemployed.Image smoothing has the purpose of removing noise and making the pixel graylevels uniform. In the spatial domain, smoothing is achieved by applying anoperation, such as averaging, through a mask to the picture. The gray level of thepixel at the center of this mask is replaced by the gray level average of the pixelsinside the mask. Most of the masks have fixed weighting coefficients for theaverage. These coefficients are either equal [l-4], or decrease from the center pixelto the outside pixels [5-61. These masks do not take into consideration the changeof picture content. They will smooth the image, but at the same time, they also blurthe sharpness of the objects boundaries. To avoid smearing, some other masks usevariable weighting coefficients. Graham [5] smoothed the image along those direc-tions which have second derivatives smaller than some value. Graham [5] andPrewitt [4] suggested replacing a pixel by the average of its surrounding pixels if theabsolute value of their difference is smaller than some threshold. Lev ef al. [7] used,as weighting coefficients, the exponential of the negative absolute value of the

    167 0146-664X/81/020167-15$02.00/0Copyright 0 1981 by Academic Press, Inc.

    All rights of reproduction in any form rexred.

  • 8/12/2019 1-s2.0-0146664X81900770-main

    2/15

    168 WANG, VAGNUCCI , AND L Igradient divided by some constant. These masks require some prespecified con-stants which are obtained either by trial and error, or as a prior i knowledge.Median filtering [8, 91 does not require prespecified parameters, but it may createartifacts. Nagao and Matsuyama [lo] proposed an edge preserving smoothingscheme which does not need prespecified parameters, and yields satisfactoryresults. However, it requires a huge computational effort. In the frequency domain,smoothing is equivalent to filtering out the high-frequency portion [3, 1 - 131. Theselection of parameters in the filter function needs a priori knowledge about thepicture characteristics. In general, low-pass filters will smear the boundary.

    In this paper, we propose a simple spatial domain smoothing scheme. The newtechnique iteratively cleans out noise and homogenizes pixel gray levels inside aregion without any significant decrease of the sharpness of the regions boundary.The mask used in this technique is local and context-sensitive, and no prespecifiedconstant is required. We have applied this method to several simulated images toevaluate i ts performance. A measure of picture quality based on the discriminabil-ity among regions and uniformity inside regions is defined. On the basis of thesimulation study, we conclude that this smoothing scheme does improve the imagequality. The results of applications of this scheme to several real world images arealso demonstrated.

    2. GRADIENT INVERSE WEIGHTED SMOOTHING SCHEMESThe proposed smoothing scheme is based on the observation that variations ofgray levels inside a region (i.e., objects or background) are smaller than those

    between regions. In other words, we assume that before the noise corruption, theboundary is sharp, and that the absolute value of the gradient at the edge is high.The problem posed is to remove the noise within regions without blurring theirboundaries.Let the image be expressed as an n x m rectangular array {p( i,j )l i = 1,2, , . j , n,andj = 1,2,..., m} where p(i,j) is the pixel gray level at coordinate (i,j). Theinverse of the absolute gradient at (i,j) is defined as6(i,j; k, I) = IIp(i + k,j + I) -p(i,j)l

    where k, I = - 1, 0, 1, but k and I are not equal to zero at the same time. In otherwords, S(i,j; k, Z)s are calculated for the eight immediate neighbors of (i,j ). Wedenote this vicinity as V(i,j ). If p(i + k, + I) = p(i, j), the gradient is 0 and S(i, j; k, I) is defined as 2. The value of 6(k, j; k, r) thus ranges over [2,0), andtS(i, ; k, I) is much smaller at the edge than inside a region.The proposed 3 x 3 smoothing mask is defined as

    [

    w(i - I,j - 1) w(i - 1,j) w(i - 1,j + 1)W(i,j) = w(i,j - 1) w(i,j) w(i,j + 1)

    I, (2)

    w(i + 1,j - 1) w(i + I,j) w(i + 1,j + 1)where w( i, ) = i and w(i + k,j + I) = Zvci,Ji,j; k, I)]-S(i,j; k, I) for k, I =- 1,0, 1 but k, I not 0 at the same time. The factor 4 is used in the expressions sothat after smoothing, pixel gray levels are within the dynamic range of the original

  • 8/12/2019 1-s2.0-0146664X81900770-main

    3/15

    GRADIENT INVERS E WEIGHTED SMOOTHING 169image. Thus the weighting coefficients are the normalized gradient inverses. Thesmoothed image is

    1 Ip^(i,j) = 2 x w(i + k,j + I)p(i + k,j + I).k=-, I=-, (3)Hence, p( i, j) is a convex combination of the nine pixel gray levels in the mask. Ifp(i,j) is surrounded by eight pixels which have the same gray levels, q, w(i + k,j +I) equals & for V(i, j), and p^(i, ) = &(i, j) + q]. If the gray levels in V(i,j) arenot the same, ( i, ) wil l be the weighted average over V( i, ) and (i, j).Intuitively, from Eqs. (1) to (3), we see that if (i, j) is at the immediate vicinity ofan edge, those pixels which are in the same region as (i, j) wil l have weightingcoefficients larger than those pixels outside of the region. The latter pixels willcontribute, only to a small degree, to the smoothing; thus, the proposed schemewill not destroy the sharpness of the region boundary. Inside a region, isolatednoisy pixels which are surrounded by pixels with much higher or lower gray levelswil l have small S(i,j; k, 1)s. However, the normalization makes w(i + k; j + f)srelatively larger. The surrounding pixels will contribute to the smoothing, and thenoise is thus smoothed out. Pixel gray levels inside a region will tend to be moreuniform than they were before the smoothing.The proposed scheme assumes that the boundary is sharp. In some situationswhere the original image contrast is low, the gradient at the object edge is small.Within the mask, those pixels which belong to regions different from that of thecenter pixel may have significant weighting coefficients. To avoid possible smear-ing at the edge, some gray level stretching techniques using nonlinear functions,such as the y function [ 141, quadratic function, or logarithmic function [ 151, can beapplied to the image before the smoothing operation. The stretching will increase

    0 (b)

    FIG. 1. Sam ple curves before a nd after smoothin g operations. (a) Original, (b) smoothed once, (c)smoothed twice.

  • 8/12/2019 1-s2.0-0146664X81900770-main

    4/15

    170 WANG, VAGNUCCI , AND L Ithe gray level difference between the object and its background, but it alsoenhances the noise. The smoothing operation follows, and after that, an inversemapping is employed to keep the gray levels within the given range if required.Figure 1 demonstrates the application of the proposed smoothing scheme to aone-dimensional curve where only the right and left vicinity points of each pointare considered. Figure la is the original curve where the dashed line separates tworegions. Figures lb and c are the resulting curves after one and two smoothingoperations, respectively. Note that the curve inside each region is more uniformafter smoothing [Fig. lc]; the sharpness of the edge between the two regions,however, is preserved.

    3. EVALUATION OF THE PROPOSED SCHEMEIn the previous section, we discussed qualitatively the proposed smoothing

    scheme. In this section, a quantitative evaluation of this scheme is presented. Theevaluation is based on the fact that in a picture, the more the uniformity insideeach region and the greater the discrimination between regions, the better thepicture quality. In order to measure the uniformity inside each region, and thediscrimination among regions in a simulated image, we adopt the analysis ofvariance (ANOVA) approach [ 161.Let an image have N pixels and k regions. Each region, 52,, I = 1,. . . , k, containsN1 pixels. An f-statistic which measures the discrimination is defined as

    f=SSB/ (k - 1)

    SSW/ (N - k) where

    ssw = i: 2 [did) -P;12,I=1 (i,j)EQf

    kSSB = 2 N,(p; - ji),I=1

    ~5~ s the mean gray level over region Q,, and p is the global mean of the entirepicture. In Eq. (4), SSB is the sum of squared gray level deviation between regions;SSW is the sum of squared gray level scattering within the region. The value offwould increase as the difference between regions becomes larger and/or theuniformity within each region increases. If the gray level distribution within eachregion is normally distributed with the same variance, f is F-distributed. When thiscondition is not met, f st ill indicates the discriminability between regions, althoughit is not &distributed [16].The proposed smoothing scheme will reduce SSW while keeping SSB relativelyunchanged, and thus will increase f value. Table 1 illustrates the mean andstandard deviation (s.d.) for each of the two regions in the curves of Figs. la to c. Itis obvious that after smoothing, the means are relatively unchanged, and the s.d.sare decreased. We have applied this smoothing scheme to several simulated imagesto evaluate its performance. Two typical runs are presented below.

  • 8/12/2019 1-s2.0-0146664X81900770-main

    5/15

    GRADIENT INVER SE WEIGHTED SMOOTHING 171TABLE 1

    Means and s.d. of the Two Regions and TheirJStatistics in Curve of Fig. 1 before a nd after Sm oothi ngIterations

    Region III

    f

    0 1 2Mean s.d. Mean s.d. Mm s.d.

    21.67 1.56 21.89 0.88 21.89 0.741.60 1.56 1.60 0.80 1.50 0.67

    698.83 2494.40 3565.42

    Image A, as shown in Fig. 2a, has three regions. The left rectangle (Region 1) isgenerated from a normal distribution with mean gray level 60 and variance 100,denoted as N(60,lOO); the right outside dark ring (Region II) from N(20,lOO); andthe right inner light square from N(95,lOO). In Figure 2a, each square represents apixel. Figures 2b to d illustrate the processing results of Image A after one, two,and five smoothing iterations, respectively. It can be seen that all of these three

    FIG. 2. Sim ulate d Image A. (a) Origina l imag e, (b) after one smoothin g iteration, (c) after twosmoothi ng iterations, (d) after five smoothin g iterations.

  • 8/12/2019 1-s2.0-0146664X81900770-main

    6/15

    T

    2

    Me

    a

    sdsothTe

    Ro

    a

    T&asc

    inIma

    Aboea

    aeSmohn

    Ieao

    0

    1

    2

    5

    7

    1

    1

    Mea

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    Ro

    I50

    87

    58

    70

    57

    63

    54

    57

    53

    56

    53

    54

    52

    54

    I

    11

    90

    14

    69

    16

    61

    19

    52

    10

    50

    11

    49

    12

    49

    I

    90

    94

    90

    61

    98

    51

    90

    37

    90

    37

    81

    50

    86

    11

    84

    1

    6

    1

    0

    2CS1

    2

    1

    2

    3

    1

    8

    -_

  • 8/12/2019 1-s2.0-0146664X81900770-main

    7/15

    GRADIENT INVERS E WEIGHTED SMOOTHING 173regions become less noisy and more uniform after smoothing. Table 2 tabulates themean and s.d. for each region before and after smoothing. We notice that afterseven iterations, the maximum change of gray level mean is less than 8% (RegionIII), while the s.d. is reduced up to 60%. However, the s.d., especially that of thesmall region, increases if the image is smoothed too many times-for instance,more than 10 times. This increase is due to the fact that the contribution of edgepixels to the smoothing is cumulative. We also observe that the f value, at first,increases rapidly, then it plateaus off and finally drops as one would expect fromthe discussion above.Image B, shown in Fig. 3a, has the same geometry as that of Image A except thatthe three regions are generated from N(75, lOO), N(30, lOO), and N(55, lOO), respec-tively. This image demonstrates the case in which the mean gray levels of the threeregions are close. Figs. 3b to d illustrate the processing results of Image B after one,two, and five smoothings, respectively. Means, s.d.s, and f values are listed inTable 3.From these two experiments, we notice that after the smoothing operations, thegray levels inside each region are more uniform, and the regions are moredistinguishable. In other words, the decrease in the s.d.s without substantial

    FIG. 3. Sim ulate d Image B. (a) Origina l imag e, (b) after one smoothin g iteration, (c) after twosmoothi ng iterations, (d) after five smoothin g iterations.

  • 8/12/2019 1-s2.0-0146664X81900770-main

    8/15

    T

    3

    Me

    a

    sdsothTe

    Ro

    a

    T&asc

    inIma

    Bboea

    aeSmohn

    Ieao

    0

    1

    2

    5

    7

    1

    1

    Mm

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    Me

    sd

    -

    -

    -

    Ro

    I79

    96

    74

    70

    72

    61

    71

    50

    79

    46

    79

    46

    79

    46

    I

    34

    12

    3

    77

    31

    66

    33

    55

    34

    48

    35

    46

    35

    46

    I

    54

    14

    59

    81

    53

    72

    57

    67

    57

    69

    50

    72

    58

    73

    f

    47

    71

    92

    1

    7

    1

    1

    1

    8

    1

    0

  • 8/12/2019 1-s2.0-0146664X81900770-main

    9/15

    GRADIENT INVERS E WEIGHTED SMOOTHING 175changes in the means, that is, the increase in the f values, make the images moreappealing visua lly, and enhances the detectability of different regions by eitherinspection or machine analys is. The uniformity within each region wil l helpclustering and segmentation of the images.Figure 4 depicts curves off value versus the number of smoothing iterations forImages A and B. These curves first increase, after five iterations they begin toflatten off, and eventually they drop. The number of iterations used to reach themaximum f value depends on the image. It is suggested to smooth an imagethrough no more than five iterations in order to avoid degradation of a sharpboundary, and to save computational effort.To examine further the ability of the proposed scheme, an experiment wasconducted as described below. Figure 5a is a simulated image showing a small

    2500

    .- .--.-,_tic -3,*I -. \2000- ,' '\. \/ '\f \

    / '\ \,I \ \

    /I '\ ..'

    I --------I1500- II- IE -' 0 /

    -f

    g .:IL II10007 1 /

    ( %

    FIG. 4. Curves of f-statistic vs number of smoothi ng iterations. Dashed curve for Image k Cxmtinu-ous curve for Image B.

  • 8/12/2019 1-s2.0-0146664X81900770-main

    10/15

  • 8/12/2019 1-s2.0-0146664X81900770-main

    11/15

  • 8/12/2019 1-s2.0-0146664X81900770-main

    12/15

    FIO. 6. Chromosome images. (a) Original image, (b) degraded image with addit ive ntiimage after two smo othing iterations, (d) degraded image after five smoo thing iterations

    FIO. 7. Character image s. (a) Origbl image, (b) dqmded image with addit ive noise,image after two smoothing i terations, (d) degraded image after f ive smoothing i terations.17R

  • 8/12/2019 1-s2.0-0146664X81900770-main

    13/15

    179

  • 8/12/2019 1-s2.0-0146664X81900770-main

    14/15

  • 8/12/2019 1-s2.0-0146664X81900770-main

    15/15