14
IEEE TRANSACTIONS ON SIGNAL PROCESSING. Detecting VOL 39. NO 5. MAY 1991 Boundaries in a Vector Field Hsien-Che Lee, Member, ZEEE, and David R. Cok Abstract-A vector gradient approach is proposed to detect boundaries in multidimensional data with multiple attributes (a vector field). It is used to extend a gradient edge detector to color images. The statistical effects of noise on the distribution of the amplitudes and directions of the vector gradient are characterized. The noise behavior of the L2 norm of the scalar gradients is also characterized for comparison. When the at- tribute components are highly correlated, as is often the case in color images, use of the vector gradient shows a small gain in signal-to-noise ratio over that of the L2 norm of the scalar gradients. This small gain may or may not be significant, de- pending on other measures an edge detector uses to deal with noise. Keywords-Image processing, boundary detection, vector gradient, color edge detection. I. INTRODUCTION NALYSIS of multidimensional data with multiple at- A tributes is usually difficult to do because the data can- not be visualized easily. The usual approach to dealing with the large dimensionality is to project the original data onto a lower dimensional subspace. In some applications, it is desirable to locate multidimensional regional bound- aries as defined by changes in the data attributes. These boundaries are then used for estimating the shape or vol- ume of the interested regions. To locate such boundaries, the multidimensional data with multiple attributes can be treated as a vector field, and the boundary detection prob- lem becomes a problem of detecting local changes in a vector field. Examples of multidimensional data with multiple attri- butes are abundant in various applications. Digital color images [26] are examples of a two-dimensional field with three attributes (red, green, and blue). A LANDSAT im- age [4] having seven spectral measurements associated with each spatial location is a two-dimensional field of seven attributes. Computed X-ray tomography can pro- duce images of slices of a three-dimensional object. These slices when stacked together represent a three-dimen- sional field with one attribute. A more interesting exam- ple is the magnetic resonance imaging (MRI) system in medicine [14], [27]. By proper choice of the resonance frequency, one can probe specific nuclear species and produce a three-dimensional image of their response in isolation. Furthermore, by choosing an appropriate pulse Manuscript received November 25, 1989; revised April 26, 1990. The authors are with the Eastman Kodak Company, Imaging Science IEEE Log Number 9042698. Laboratory, Rochester, NY 14650-1 8 16. sequence, the intensity of an MRI image can be made to represent one or more of the several MRI parameters in- herent to the various soft tissues inside the human body. Therefore, a three-dimensional field with multiple attri- butes can be produced by an MRI system. With three- dimensional data stored in the computer, surfaces or re- gion boundaries can be detected and reconstructed to al- low a physician to determine the volumes of organs or other abnormal tissues [27]. 11. DETECTING BOUNDARIES The most extensively studied case in boundary detec- tion is the two-dimensional field with one attribute, i.e., edge detection in a monochromatic image (see, for ex- ample, [51-[71, [111-[131, [151, [161, [191, [201, 1221, [23], [29], [30]). In one type of approach [6], [29], change of the single attribute (image irradiance) in the two-di- mensional field is computed as the gradient of a scalar field. Edges are then detected as local gradient maxima along their gradient directions. Color edge detection (2-D, 3 attributes) has also been studied in [8], [17], [24], and [28], where edges are de- tected more or less independently in each of the three color components and then combined together to give a final edge map according to some proposed rules. As for the direction of an edge pixel, the rule either chooses the di- rection that corresponds to the maximum component or a weighted average of the three gradient directions. Bound- ary detection in a three-dimensional field with one attri- bute has only been studied in simple cases [21], [31] where noise was assumed to be very small. Instead of separately computing the scalar gradient for each color component, Di Zenzo [9] derived a solution using tensor notations, but did not resolve the ambiguity in deciding the maximum-change and minimum-change directions. Novak and Shafer [25] used the Jacobian ma- trix to derive the same results. In this paper, we use vector fields to derive similar results and to solve the directional ambiguity. Because noise is the major problem in bound- ary detection, our main emphasis is to characterize the noise distribution in the derivative of a vector field. We will use the resulting vector gradient to extend a simpli- fied version of Canny’s edge detector to locate the bound- aries in multidimensional data with multiple attributes. It is shown that the vector gradient approach is slightly less sensitive to noise than an approach which uses the sum of the squares of the scalar gradients. We will use two-di- mensional color images as examples of vector fields be- cause they are by far the largest application of vector 1053-587X/91/0500-1181$01.00 0 1991 IEEE

A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

IEEE TRANSACTIONS ON SIGNAL PROCESSING.

Detecting VOL 39. NO 5. MAY 1991

Boundaries in a Vector Field Hsien-Che Lee, Member, ZEEE, and David R. Cok

Abstract-A vector gradient approach is proposed to detect boundaries in multidimensional data with multiple attributes (a vector field). It is used to extend a gradient edge detector to color images. The statistical effects of noise on the distribution of the amplitudes and directions of the vector gradient are characterized. The noise behavior of the L2 norm of the scalar gradients is also characterized for comparison. When the at- tribute components are highly correlated, as is often the case in color images, use of the vector gradient shows a small gain in signal-to-noise ratio over that of the L2 norm of the scalar gradients. This small gain may or may not be significant, de- pending on other measures an edge detector uses to deal with noise.

Keywords-Image processing, boundary detection, vector gradient, color edge detection.

I. INTRODUCTION NALYSIS of multidimensional data with multiple at- A tributes is usually difficult to do because the data can-

not be visualized easily. The usual approach to dealing with the large dimensionality is to project the original data onto a lower dimensional subspace. In some applications, it is desirable to locate multidimensional regional bound- aries as defined by changes in the data attributes. These boundaries are then used for estimating the shape or vol- ume of the interested regions. To locate such boundaries, the multidimensional data with multiple attributes can be treated as a vector field, and the boundary detection prob- lem becomes a problem of detecting local changes in a vector field.

Examples of multidimensional data with multiple attri- butes are abundant in various applications. Digital color images [26] are examples of a two-dimensional field with three attributes (red, green, and blue). A LANDSAT im- age [4] having seven spectral measurements associated with each spatial location is a two-dimensional field of seven attributes. Computed X-ray tomography can pro- duce images of slices of a three-dimensional object. These slices when stacked together represent a three-dimen- sional field with one attribute. A more interesting exam- ple is the magnetic resonance imaging (MRI) system in medicine [14], [27]. By proper choice of the resonance frequency, one can probe specific nuclear species and produce a three-dimensional image of their response in isolation. Furthermore, by choosing an appropriate pulse

Manuscript received November 25, 1989; revised April 26, 1990. The authors are with the Eastman Kodak Company, Imaging Science

IEEE Log Number 9042698. Laboratory, Rochester, NY 14650-1 8 16.

sequence, the intensity of an MRI image can be made to represent one or more of the several MRI parameters in- herent to the various soft tissues inside the human body. Therefore, a three-dimensional field with multiple attri- butes can be produced by an MRI system. With three- dimensional data stored in the computer, surfaces or re- gion boundaries can be detected and reconstructed to al- low a physician to determine the volumes of organs or other abnormal tissues [27].

11. DETECTING BOUNDARIES The most extensively studied case in boundary detec-

tion is the two-dimensional field with one attribute, i.e., edge detection in a monochromatic image (see, for ex- ample, [51-[71, [111-[131, [151, [161, [191, [201, 1221, [23], [29], [30]). In one type of approach [6], [29], change of the single attribute (image irradiance) in the two-di- mensional field is computed as the gradient of a scalar field. Edges are then detected as local gradient maxima along their gradient directions.

Color edge detection (2-D, 3 attributes) has also been studied in [8], [17], [24], and [28], where edges are de- tected more or less independently in each of the three color components and then combined together to give a final edge map according to some proposed rules. As for the direction of an edge pixel, the rule either chooses the di- rection that corresponds to the maximum component or a weighted average of the three gradient directions. Bound- ary detection in a three-dimensional field with one attri- bute has only been studied in simple cases [21], [31] where noise was assumed to be very small.

Instead of separately computing the scalar gradient for each color component, Di Zenzo [9] derived a solution using tensor notations, but did not resolve the ambiguity in deciding the maximum-change and minimum-change directions. Novak and Shafer [25] used the Jacobian ma- trix to derive the same results. In this paper, we use vector fields to derive similar results and to solve the directional ambiguity. Because noise is the major problem in bound- ary detection, our main emphasis is to characterize the noise distribution in the derivative of a vector field. We will use the resulting vector gradient to extend a simpli- fied version of Canny’s edge detector to locate the bound- aries in multidimensional data with multiple attributes. It is shown that the vector gradient approach is slightly less sensitive to noise than an approach which uses the sum of the squares of the scalar gradients. We will use two-di- mensional color images as examples of vector fields be- cause they are by far the largest application of vector

1053-587X/91/0500-1181$01.00 0 1991 IEEE

Page 2: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

I I82 IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. 39. NO 5 . MAY 1991

fields, but the reader should be aware that the following results are also applicable to other vector fields in general.

111. DERIVATIVE OF A VECTOR FIELD An image is usually defined on a two-dimensional

space. As mentioned previously, it is also possible to have images of higher dimensions. In a general case, one can define an image as a function (a vector field) which maps an n-dimensional (spatial) space to an rn-dimensional (color or attribute) space. The gradient of a scalar field can be generalized to the derivatives of a vector field. The mathematical definition can be found in calculus books (e.g., [3, pp. 269-2731) and is briefly summarized below:

R" be a vector field, V n n - m , defined on a subset S of R". Let fk denote the kth component off. Iff is a three-color image, then fi , f2, and might represent the red, green, and blue components of the image. It can be proved [3] that the first-order Taylor expansion takes the form

(1)

where e(x, a) -+ 0 as a -+ 0 andf ' (x) is now an rn X n matrix D(x):

Let f: S

f ( x + a) = f ( 4 + [f ' (x)l(a> + llalle(x, a)

LD,.irn(x) D2.im(x) * : * Dnfrn(x) 3 (2)

where Djfk is the first partial derivative of the kth com- ponent off with respect to the j th component of x.

If one travels out from the point x with a unit vector U

in the spatial domain, d = will be the corre- sponding distance traveled in the color (attribute) domain. It can be proved (see, e.g., [2, pp. 453-4561) that the vector which maximizes d is the eigenvector of the matrix DTD that corresponds to its largest eigenvalue. The square root of the largest eigenvalue and its corresponding ei- genvector are, for a vector field, the equivalents of the gradient magnitude and the gradient direction of a scalar field. We will call them the gradient of a vector field, or the vector gradient. Numerically, it is often better to use singular value decomposition to determine these quan- tities because it is more stable [ 101. The largest singular value of the matrix D will then be the gradient magnitude, and the direction of the corresponding right singular vec- tor will be the gradient direction.

We will now give a closed form solution for the special case of a color image V 2 , , which maps a two-dimen- sional (spatial) space (x, y) to a three-dimensional (color) space ( U , v , w). For this special case, the matrix D can be written as

aulax au lay

awlax awlay

Let us define the following variables to simplify the expression of the final solution:

P = (ET + (;T + (a,) aw (4)

t = (E) ($) + (g) ($) + (2) (g) (5)

9 = ($T + ($T + (a,) aw

The matrix D becomes - -

and its largest eigenvalue X is

(7)

X = (p + + J (p + q)2 - 4(pq - t')). (8)

The gradient direction requires a little careful examina- tion. In a general case, the direction is along the vector [ l , h - pIT, which is the eigenvector corresponding to the eigenvalue X. However, if t = 0 and X = p, then [ t , X - p]' becomes a zero vector, and we have to use [ X - q, tIT. The remaining case to be considered is when both vectors are zero vectors. In this case, uTDTDu is locally a spherical surface, and all vector directions are equiva- lent.

It is interesting to note that

au a v av au)? + (av - _ _ - - aw aw av)2 ax ay ax ay ax ay ax ay

+ (aw au ;; ;)2

ax ay

Therefore, pq - t 2 2 0, andp + q I A. Since

(9)

+ + (2)2 + ($y (10)

= llVu1l2 + llVv1l2 + llvwIl2 (1 1)

it follows that sum of the squares of scalar gradients p + q is always greater than or equal to A, the vector gradient squared. This conclusion is true even for the case of a general vector field V, + ,,,, as can be seen by the following simple proof. The sum of the squares of scalar gradients is the trace of the matrix DTD. Since DTD is symmetric and positive semidefinite, it has all real, nonnegative ei- genvalues. The trace of DTD is also equal to the sum of its eigenvalues. Since the eigenvalues are all nonnegative, the trace is at least as large as the largest eigenvalue. But the largest eigenvalue is the square of the magnitude of the vector gradient. Therefore the vector gradient squared is never larger than the sum of the squares of scalar gra- dients, and can be as small as 1 / n of the latter.

-

y w ~ w " . A U;UXWAX- 3, ' l w n u n a ~ u t j p 6 W 111UJ6VU \ l l l * L b l p L UIIIJ] 1U1 L1113 lLLL 1 KAlY3AL I 1 U I Y 3 ) I 1 h C LIIUSC JUUIUkIb 01 ULIler prumslonal societies, is not a necessary prerequisite for publication. However, payment of excess page charges is a prerequisite. The author will receive 100 free reprints (without covers) only if the voluntary page charge is honored. Detailed instructions will accompany the proofs.

Page 3: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

LEE A N D COK: DETECTING BOUNDARIES IN A VECTOR FIELD I I83

From now on, to simplify the terminology, we will call the quantities llVull, (IVvl(, llVwll the amplitudes of com- ponent gradients, the quantity the amplitude of the scalar gradient, and the quantity 6 the amplitude of the vector gradient. If there is no confusion in the context, we will omit the amplitude and simply call them the com- ponent gradients, the scalar gradient, and the vector gra- dient. The direction of the scalar gradient will be defined to be the same as that of the vector gradient. The case where the scalar gradient is equal to the vector gradient is whenpq - t 2 = 0, i.e., when all the component gradients of a color image have identical directions. For color edge signals, this is mostly true. For uncorrelated image noise, the component gradients will have different directions, and the vector gradient will have a value smaller than the sca- lar gradient.

In summary, by using the vector gradient in boundary detection, the vector gradient is about the same as the sca- lar gradient for the signal, but its value becomes smaller than the scalar gradient for the noise. The effect is a net increase in the signal-to-noise ratio for edge detection. This gain comes from the fact that signals of different color components are more correlated than noise. We can therefore conclude that for a typical color image, the vec- tor gradient is less sensitive to noise than the scalar gra- dient.

I v . STATISTICS OF NOISE I N A BOUNDARY DETECTOR To characterize the noise behavior in a boundary detec-

tor, we have to limit our discussion to two-dimensional images to reduce the complexity of the solutions. The im- ages can have an arbitrary number of attributes (colors). Noise is assumed to be identically and independently dis- tributed in all the attribute components. We also have to choose a particular form of boundary detector in order to analyze the noise statistics. For this purpose, a simplified version of Canny’s edge detector [6] is implemented with the following steps:

1) The input image is smoothed by a Gaussian filter with standard deviation of @b.

2) Partial derivatives with respect to x and y are com- puted by the following two masks:

- 1 0 1 1 1 1

- 1 0 1 0 0 0. (12) - 1 0 1 - 1 - 1 - 1

3) The amplitudes and directions of gradients are com- puted from the partial derivatives.

4) The points which are the local gradient maxima along their gradient directions are marked as candidate boundary points.

5) The candidate boundary points that have gradient amplitudes greater than a low threshold T, and are con- nected to at least one point that has a gradient amplitude greater than a high threshold Th are marked as the bound- ary points. This is Canny’s thresholding with hysteresis [6, P. 541.

The choice of the two thresholds, T, and Th, is impor- tant for the boundary detector. Too low a threshold will produce too many false edges, while too high a threshold will throw away too many true edges. In order to quantify the tradeoff, we have to characterize the noise behavior of the boundary detector. In the following, we will as- sume that the noise at each point of the image is station- ary, white (independent), Gaussian noise N ( x , y ) with mean = 0 and variance = 0:. We also assume that all the attributes have the same amount of noise. If this is not irue, each attribute has to be weighted with the inverse of its noise standard deviation before it is combined with other attributes.

The smoothed noise P ( x , y) is no longer white. Its au- tocorrelation function Rp(m, n) can be approximated as follows (see Appendix):

Rp(m, 4 = WW, n)P(O, 011 ut m2 + n2

r- 47ra;

This approximation is very good for 06 2 1.0 pixel, but quickly becomes unacceptable when ab is less than 0.7. In practice, for 06 less than 1 .O pixel, the discrete Gauss- ian mask becomes a very undersampled representation of a Gaussian filter, and should not be used without careful analysis. The partial derivatives P, = a P / a x and Py = a P / a y of P ( x , y), as computed by step 2, can be shown to be independent of each other, and their variances are given by (see Appendix):

0: = uir = a;, = 6Rp(0, 0) + 8Rp(l, 0)

- 2Rp(2, 0) - 8Rp(2, 1) - 4Rp(2, 2). (14)

Substituting (13) into (14), we arrive at the following re- lation:

where c = exp [-1/(4&]. When 06 is large, c = 1 - 1/(4u;), and

Smoothing with a Gaussian filter of size a b thus reduces the noise standard deviation of the partial derivative ap- proximately by a factor of 0;. Equations (15) and (16), as will be seen later, are the quantitative relations we need to determine how much smoothing we will need for step boundary detection. Since the partial derivatives, such as P, and Py , are linear combinations of Gaussian random variables, they are themselves normally distributed. We now have all the information needed to derive the distri- bution of the scalar gradient.

Let the amplitude r, of the scalar gradient of a vector field, Vn+rn, which maps (xlr * . , x,) to (U,, - * 7 urn), be defined as

Page 4: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

, I

I 1 8 4 IEEE TRANSACTIONS ON SIGNAL PROCESSING. VOL. 39, NO S. MAY 1991

TABLE 1

The distribution of r: is a x2 distribution, and the distri- bution of r, is

for r, L 0 (18) where k = mn and 0: is the variance of the partial deriv- ative, which, for n = 2, can be computed by (14). The peak of the distribution occurs at r, = c a d .

Let r,, be the amplitude of the vector gradient of a vec- tor field, V, , , , which maps (xi , x2) to ( u l , * , UJ. The statistical distribution of r,, turns out to be too com- plicated for us to find a closed form expression. We there- fore searched for an empirical equation to describe it. First, we show that in (8), the value of ( p q - 1') is sta- tistically a fraction of ( p + 4)':

, 111 1?1

= c c (0: - 0 + 04,) 2 r = I , = l , J # f

= m(m - 1104,. (19)

Since p + q = E?= , ((aui/axl)2 + (au i /ax2)*) has a x 2 distribution with 2m degrees of freedom, its mean is 2m0: and variance is 4ma:. We have

~ [ ( p + q12] = 4m0: + ( 2 m ~ : ) ~ = 4m(m + 1)~ : .

(20)

The expected value of 4 ( p q - t 2 ) is the fraction (m - l ) / ( m + 1) of the expected value of ( p + q)2. For m = 3, this fraction is 0.5. Now we can roughly rewrite (8) in the following way:

m + l

Assuming that the above approximation is true for all in-

Oh Measured U Predicted U

I .0 0.565 0.564 2.0 0.280 0.282 3.0 0.185* 0.188 4.0 0.137* 0.141

TABLE I1

U!, Measured U(/ Predicted

1 .0 1.663 1.660 2.0 0.539 0.541 3.0 0.254 0.254 4.0 0.146 0.146

teger values of m, the surprising conclusion is that even by measuring more and more attributes, the spread of the noise vector-gradient cannot be reduced beyond 1 /& of that using only one attribute, and the return diminishes fairly quickly. For m = 2 , r,, = 0.953r,7, and for m = 3, r,, 0.924r,. Therefore, we might expect that the ampli- tude of the vector gradient, r,,, would have a distribution very similar in shape as that of the scalar gradient, r,, with the scale reduced by a fraction. This, as we will see later from experimental results, is indeed a very good approx- imation. Thus, we have a numerically predictable advan- tage of reduced noise sensitivity when we use the vector gradient instead of the scalar gradient.

Since the above analysis is not rigorous, we have to verify the approximation by experiments. A stationary white Gaussian noise image (400 X 400) with standard de- viation 0, = 2.0 is generated. Four sizes of Gaussian smoothing with = 1.0, 2.0, 3.0, and 4.0 are applied to the noise image. The standard deviations of the central 200 x 200 part of the smoothed noise image are com- puted and compared with the values predicted by (13 ) . The comparison is shown in Table I. The standard devia- tions, a,,'s, of the partial derivatives of the smoothed noise image are also computed and compared with the values predicted by (14). The comparison is shown in Table 11.

Except for the two marked numbers, the measured val- ues are acceptable at the 0.05 level of significance. The deviations from the predicted values might be the result of a small residual correlation ( = 0.02) between the ran- dom numbers of the neighboring pixels in the input noise image. In general, ( 1 3 ) and (14) seem to be good approx- imations. We now compare the theoretical distributions of the scalar gradient r,7 (18) and the vector gradient r,, (21) with the experimental measurements. Figs. 1 and 2 show the measured distributions of the scalar gradient and the vector gradient for oh = 1.0 and 4.0. The histogram of which the peak is shifted to the left is the vector-gra- dient histogram, and the other one is the scalar-gradient histogram. The same relative shift can be seen for all val- ues of ub. The relation between the two distributions does

-- I 1,

y w ~ w " ; A U ; U X W A X ~ JA ' ~ w n u n l G u ~ J p 6 W 1111116VU \ l l l S L blbllL UIIIJ] 1U1 L1113 lLLL 1 KAlY3AL 1 1 U I Y 3 ) I 1 h C LlIubc J U u I I M b 01 ULIler pruiessimii societies, is not a necessary prerequisite for publication. However, payment of excess page charges is a prerequisite. The author will receive 100 free reprints (without covers) only if the voluntary page charge is honored. Detailed instructions will accompany the proofs.

Page 5: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

LEE AND COK: DETECTING BOUNDARIES IN A VECTOR FIELD 1185

gradient amplitude

Fig. 1. Amplitude histograms of the scalar (+) and the vector (box) gra- dients of Gaussian noise U,, = 2.0 smoothed by a Gaussian filter of size U,,

= 1 .O. The solid curves are the predicted distributions and the symbols are the measured data.

A 0.90 2

1. w gradient amplitude

Fig. 2. Amplitude histograms of the scalar (+) and the vector (box) gra- dients of Gaussian noise u , ~ = 2.0 smoothed by a Gaussian filter of size U,,

= 4.0. The solid curves are the predicted distributions and the symbols are the measured data.

not seem to change as we vary ab, the extent of smooth- ing. Solid curves in these figures are the theoretical dis- tributions and the symbols are the measured values. The fit between the predicted and the measured distributions of the vector-gradient amplitude is surprisingly good in view of the crudeness of our analysis. Equations (18) and (21) thus seem to be good approximations.

V. DETECTION OF A STEP BOUNDARY

A step boundary ir, an image corrupted with Gaussian white noise can be effectively detected by prefiltering the noise before computing the image gradient. Prefiltering is done by using a low-pass Gaussian filter. Smoothing by a low-pass filter has two major effects on the computation of gradient: 1) It reduces the noise ampitude more than the signal amplitude, and thus increases the signal-to- noise ratio in the computation of gradient amplitude. 2) It reduces the noise-induced angular spread in the gradient direction, and produces a more reliable estimate of direc- tional angle.

Both effects are discussed in detail in the following sec- tions.

A. Gradient Amplitude A two-dimensional step edge with step size A, after

smoothing by a Gaussian filter of size o b , becomes a blurred edge with the following profile:

Its gradient amplitude is

The maximum gradient of a step edge thus is reduced by a factor proportional to ab' after the smoothing. For the noise, the reduction factor is proportional to ab2 (as shown in (16)). Therefore, in principle, it is possible to apply a proper smoothing filer to increase the signal-to-noise ratio to any desirable amount for detecting an ideal step bound- ary (even if the step signal is arbitrarily small compared with the noise!). In practice, one never has an ideal step edge with infinite extent of flat regions on both sides of the edge. Furthermore, extensive Gaussian smoothing distorts the underlying edge structures in image irradi- ances, especially around the comers. The smallest size of the smoothing kernel which gives the acceptable perfor- mance requirement in terms of detection errors (the (Y and @ risks to be discussed below) is always preferred over a larger smoothing-kernel size.

To see how the signal-to-noise ratio is improved by smoothing, we generated a noisy step edge image with U,

= 2.0 and A = 1.0. In the discrete, sampled image, the edge transition occurs between pixels located at x = 0 and x = 1. The Gaussian filter has a square mask, extending four ab in both the horizontal and vertical directions. The mask size thus is 8ab + 1 by 8ub + 1. The computed gradient maxima occur at x = 0 and x = 1 with magni- tudes equal to

The factor 3 comes from the mask used to compute the partial derivatives as shown in (12). Because of the ad- ditive noise, the maximum gradient is no longer a single value but a random variable whose square has a noncen- tral x2 distribution (multiplied by U:). The noncentrality is defined as Ci p? , when p i is the mean of the ith-com- ponent normal variable with unit variance. For a step edge in a three-color image, the noncentrality is ( 3 g 2 ) (assum- ing the step size A is the same for all three colors). As we discussed before, the square of the scalar gradient of the pure noise in the flat region of the image has a x 2 distri- bution (multiplied by U:). The noncentrality thus repre- sents a shift in the distribution introduced by the presence of the signal. Since the noncentrality (a g2) decreases at a rate proportional to U;, and the noise squared decreases at a rate proportional to U: (see (16)), we can predict that the separation between these two distributions will be-

Page 6: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

I I86

140

2 3

5 84

P 112 0

9

C

c

k

56

28

0 a

scalar-gradient amplitude

(a)

r 1 40

0.00 6.00 12.00 18.00 24.00 30.00

vector-gradien f amplitude

(b) Fig. 3 . Amplitude histograms of (a) the scalar and (b) the vector gradients in both the flat region and along the edge transition boundary combined. Uh = 0.0

come wider and wider relative to their standard deviations as we smooth the image more and more. This is confirmed in the experiment. Assuming the edge transition occurs at pixel locations x = 0 and x = 1, we compute the histo- grams of the scalar and the vector gradient amplitudes by sampling both in the flat region (1x1 > ab + 1) and along the edge transition boundary (x = 0 and x = 1). The num- ber of the sampled pixels in the flat region and the number of the sampled pixels along the edge boundary are equal to each other. Figs. 3-6 show the histograms of the scalar and the vector gradient amplitudes in both the flat region and along the edge transition boundary combined. Each figure corresponds to one smoothing-kernel size, Ob,

which is increased from 0.0, to 4.0. The signal-to-noise ratio A l a , in this case is 0.5. With no smoothing, i.e., ab = 0.0, the two distributions (the pure-noise and the sig- nal-plus-noise) are not distinguishable (Fig. 3 ) . As the smoothing is increased, their separation becomes wider and wider relative to their standard deviations (Figs. 4- 6 ) . The peak of the histogram of the vector gradient is shifted to the left of that of the scalar gradient as discussed in the last section.

To verify that use of the vector gradient is, in theory, less sensitive to noise than that of the scalar gradient, we use both types of gradient with the same threshold for de- tecting a step boundary in a large amount of noise (signal-

IEEE 1RANSACTIONS ON SIGNAL PROCESSING. VOL. 3Y. NO. 5 . MAY I Y Y I

0.00 0.80 1.60 2.40 3.20 4.00

scalar-gradient amplitude (a)

100 ~

0 . I I I h.A-L 1 0.00 0.80 1.60 2.40 3.20 4.00

vector-gradient amplitude

(b) Fig. 4. Amplitude histograms of (a) the scalar and (b) the vector gradients in both the flat region and along the edge transition boundary combined. U* = 2.0

to-noise ratio is 0.5). It should be pointed out that the scalar gradient and the vector gradient for the signal alone are the same because the edge signal has the same direc- tion in all three colors. Fig. 7 shows the results of the boundary detection. The upper graph is the result using the scalar gradient and the lower graph, the vector gra- dient. The step edge image was smoothed, from left to right, with (Jb = 0.0, 1.0, 2.0, 3.0, and 4.0. The thresh- old was selected at two times the theoretical value of the noise scalar gradient where the histogram reaches its peak. (This choice of threshold corresponds to the rejection of 99.723% of the scalar gradients of the noise.) A more quantitative comparison is to look at the number of true + false edges detected by using either gradient. Because there is only one ideal edge in the image, the ideal answer is a long vertical straight edge. A crude rule, therefore, is the fewer edges, the better. The comparison is shown in Table 111.

It should be cautioned that the number of edges is meaningful only when used with Fig. 7, because other steps, such as hysteresis thresholding and short-segment deletion, can be taken to eliminate edges due to noise.

For ideal step edges, we know the statistical distribu- tions of both the pure noise and the signal-plus-noise. Therefore it is possible to calculate the statistical errors in this simple case of edge detection. If the minimum sig-

-

y'"9'"; 1 ".I"""' J i " n L A n w A & J p 6 U 1111116VU \ l l l S L b l p L UIIIJ] 1U1 L1113 lLLL 1 KAlY3AL LIUlY3) I 1 h C LlIubc JuuIIl"1b 01 ULIler pruiessionai societies, is not a necessary prerequisite for publication. However, payment of excess page charges is a prerequisite. The author will receive 100 free reprints (without covers) only if the voluntary page charge is honored. Detailed instructions will accompany the proofs.

Page 7: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

LEE A N D COK: DETECTING BOUNDARIES IN A VECTOR FIELD I I87

loo

8

a 8 0 2 c

ti 4 5 60 C

40

20

0 1

scalargradient amplitude

(a)

0.00 0.50 1.00 1.50 2.00 2.50

vectorgradlent amplitude

(b) Fig. 5 . Amplitude histograms of (a) the scalar and (b) the vector gradients in both the flat region and along the edge transition boundary combined. oh = 3.0

nal we want to detect is a step edge with amplitude A , the false edge rate (noise detected as edge) we can tolerate is a, and the maximum loss rate (true edges undetected) we can accept is /3, then the amount of smoothing (Tb required to do the job can be computed. Fig. 8 shows the required smoothing-kernel size ab as a function of noise-to-signal ratio (the inverse of the signal-to-noise ratio) when a = 0.01. The solid line corresponds to /3 = 0.001, the dashed line to /3 = 0.010, and the dotted line to /3 = 0.100. It is interesting to note that the relation is asymptotically a straight line with the operating slope being a function of cu and p. This behavior is actually predictable from (16) and (24), because the separation (relative to the variance) between the two distributions is proportional to the non- centrality divided by the variance, i.e., ( 3 g 2 ) / ( a $ ) , which is approximately ( 3 a ~ A 2 ) / ( a ~ ) . For a given pair of a and 6, the separation and therefore the noncentrality has to be kept constant for different signal-to-noise ratios, i.e., (abA) / (o , ) has to be kept constant. Therefore, ab has to be kept proportional to a n / A , the inverse of the signal-to- noise ratio. This proportionality property is a very useful tool to estimate the amount of additional smoothing re- quired to detect a smaller signal. Figs. 9 and 10 show the operating slope of the line in Fig. 8 as a function of a and 0, respectively. In both figures, the signal-to-noise ratio

120

,n

P W B

b S n

c

48

24

0 1

scalargradient amplitude

(a)

120

8 s a 9 6 c

ti 4 p

48

24

0 0.00 0.30 0.60 0.90 1.20 1.50

vector-gradient amplitude

(b) Fig. 6 . Amplitude histograms of the scalar and the vector gradients in both the flat region and along the edge transition boundary combined. U,, = 4.0.

was fixed at 1.0. For Fig. 9, was fixed at 0.001. For Fig. 10, a was fixed at 0.01.

So far, we have been using only one threshold. If one is going to use Canny’s thresholding with hysteresis [6, p. 541 and/or thresholding by edge length (throwing away edges shorter than a length threshold), the statistical dis- tributions we have derived can be used to compute the associated a and /3 risks. Still another possibility is to compute the joint probability of all the pixels along a can- didate edge and make a statistical decision as to whether the edge should be accepted or not according to the de- sired statistical risks.

Having calculated all the relevant probabilities, we can now quantify the small advantage of the vector gradient over the scalar gradient. If there are three color compo- nents in the image, we have shown that the vector gra- dient rr, is approximately 0.924 times the scalar gradient r,. For a given performance requirement specified by a and /3, use of the vector gradient can tolerate about 8.2% (=1.0/0.924 - 1.0) more noise than that of the scalar gradient, or it can detect a 7.6 % smaller signal in the same amount of noise. Although the gain may look small, it could be very significant under certain operating condi- tions. Fig. 1 1 shows a risk as a function of noise-to-signal ratio (the inverse of the signal-to-noise ratio) when the

Page 8: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

. . ..

4 5.w

.g 4.00

8 2.50

z 4.50

P 3.50 s 0 3.w.

2.00

1.50

l .w

I188 IEEE TRANSACTIONS ON SIGNAL PROCESSING. VOL. 39. NO. 5 . MAY 1991

.

.

. .

_ . . ..

I I .

. . 1

-1 1

(b) Fig. 7 . Detected edge pixels using (a) the scalar gradient and (b) the vector gradient (lower graph). The five segments in each graph represent different amount of noise smoothing by a Gaussian filter with U,,, from left to right, equal to 0.0, 1.0, 2.0, 3.0, and 4.0, respectively.

TABLE Ill

U,] Scalar Gradient Vector Gradient

0.0 4 10 142 1 .o 335 120 2.0 217 158 3.0 86 51 4.0 39 24

smoothing-kernel size ab is fixed at 4.0 and /3 at 0.001. If no processing steps, other than a simple thresholding, are taken to eliminate noise edges, and the boundary detector is working at a noise-to-signal ratio of 2.0, an 8 % reduc- tion in noise can bring the a risk from 0.0306 down to 0.0189-a 38% reduction in error. However, this gain is useful only for very low contrast edges. The amplitudes of high contrast edges are much larger than those of noise, and the performance of the scalar gradient would be sim- ilar to that of vector gradient. This is confirmed in the experiments on real images, but the effect is subtle and requires careful examination to see. Figs. 12(a), the bal-

o . 5 0 m 0. w 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 200 225 250

naise/signai ratio

Fig. 8. The required smoothing-kernel size U,, as a function of noise-to- signal ratio (the inverse of the signal-to-noise ratio) when a is fixed at 0.01. The solid line corresponds to p = 0.001, the dashed line, p = 0.010, and the dotted line, 6 = 0.100.

0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 alpha risk

Fig. 9. The operating slope as a function of a. The signal-to-noise ratio was fixed at 1 .O, and P was fixed at 0.001,

""1 0.60

0.40 o.ml 0.001 0.00 0.03 ' 1 0.05 0.08 0.10 n 0.13 ' 1 a i s 0.17 ' 1 0.20 0.22 0.25 1

beta risk Fig. IO. The operating slope as a function of 0. The signal-to-noise ratio

was fixed at 1 .O, and a was fixed at 0.01.

loongirl scene, and (b), the kitchen scene, are two images that were captured on film and scanned into digital form with a microdensitometer. The unit of the digital code values was calibrated to be log-exposure times 100. The noise in the calibrated images was measured and addi- tional Gaussian noise was added to make the standard de- viations of the noise in the red, green, and blue color rec- ords equal to 60.0. The noisy images are shown in Figs. 12(c) and (d), which are used as the input images for the

y w ~ w " ; A U J ~ ~ ~ W A ~ ~ Ji l w n u n a b u t J p 6 W 1111116VD \ l l l * L b l p L Ul l lJ] 1U1 L1113 lLLL 1 KAlY3AL 1 1 U I Y 3 ~ I 1 h C LIIubc JuuIIMlb 01 ULIler pruiessionai societies, is not a necessary prerequisite for publication. However, payment of excess page charges is a prerequisite. The author will receive 100 free reprints (without covers) only if the voluntary page charge is honored. Detailed instructions will accompany the proofs.

Page 9: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

LEE AND COB;: DETECTING BOUNDARIES IN A VECTOR FIELD

2 1.m- L

0.w- s a 0.80

0.70

0.60

0.50

0.40

0.30

0.20

0.10

0.m

- - - - - - - -

I 1 1

0.00 0.40 0.80 1.20 1.60 200 240 280 3.20 3.60 4.00

Fig. 12. (a) The original balloongirl scene, (b) the original kitchen scene, (c) the noise-added balloongirl scene (U,, = 60.0). and (d) the noise-added kitchen scene (U,, = 60.0).

I189

Page 10: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

I190

(b)

Fig. 13. Edge detection of the balloongirl scene: (a) edges detected by scalar gradient. (b) edges detected by vector gradient, and the noise stan- dard deviation. u , ~ = 60.0, is reduced by a smoothing filter (U,, = 4.0) to give ucl = 4.38. The same threshold, 19.588. i s used.

experiment. The image size of both scenes is 1532 pixels and 1200 lines. We have used a Gaussian smoothing filter with ab = 4.0 pixels. Figs. 13(a) and 14(a) show the de- tected edges using the scalar gradient. Figs. 13(b) and 14(b) show the detected edges using the vector gradient. A single threshold has been used for both images and for both the scalar and the vector gradients. The threshold corresponds to an a risk of about 0.2% for the scalar gra-

IEEE TRANSACTIONS ON SIGNAL PROCESSING. VOL. 3Y. NO. 5. MAY 1991

I I

(b) Fig. 14. Edge detection of the kitchen scene (a) edges detected by scalar gradient, (b) edges detected by vector gradient. and the noise standard de- viation, u , ~ = 60.0, is reduced by a smoothing filter (U/, = 4.0) to give U,,

= 4.38. The same threshold. 19.588. i s used.

dient. For both scenes, there are fewer edges detected by the vector gradient than the scalar gradient. For the bal- loongirl scene, the scalar gradient produces 997 edge seg- ments while the vector gradient produces only 852. For the kitchen scene, the numbers are 1780 and 1639 for the scalar and the vector gradients, respectively. The edges that differ are mostly very short and visually insignificant. It seems fair to say that use of the vector gradient does allow us to avoid some of the insignificant edges which are caused by noise. It should be pointed out that we have used the same directional information, which was com- puted from the vector gradient, for both the scalar and the vector gradient in this experiments.

B. Gradient Direction Another interesting effect of the smoothing is on the

distribution of the directional angle of the gradient. We will first derive the angular distribution of the gradient directions along a step boundary for the special case (m = 1) when the vector field has only one attribute (e.g., a monochromatic image). It is shown that the angular spread is reduced as the amount of smoothing is increased. We

y w ~ w " ; A U;UXWAX% Ji ' k v n u n . G U l J p 6 W 1111116VU \ l l l * L b l p L UIIIJ] 1U1 L1113 lLLL 1 KAlY3AL L 1 u l Y 3 ) I 1 h C LlIubc J U u I I M b 01 ULIler pruiedsionai societies, IS not a necessary prerequisite for publication. However, payment of excess page charges is a prerequisite. The author will receive 100 free reprints (without covers) only if the voluntary page charge is honored. Detailed instructions will accompany the proofs.

Page 11: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

LEE AND COK: DETECTING BOUNDARIES IN A VECTOR FIELD

then look at the case when there are three attributes in the vector field (rn = 3). The distributions show the same trend of reduced angular spread for increased smoothing. Furthermore, for the same amount of smoothing, increas- ing m, the number of attributes, also reduces the angular spread.

For a vector field V2 + I , the vector gradient is the same as the scalar gradient. Assume that a step boundary with step size A is oriented vertically and the additive Gaussian white noise has a standard deviation of U,. Let the smoothed image be E and its partial derivatives E , and E,. As we mentioned before, E , and E, are independent Gaussian random fields with the same standard deviation ad. The mean of E, is zero, while that of E, is given by (24)

p = 5 ( 1 + exp (2)). The angular distribution of the gradient direction along the step boundary can be determined by performing a change of variables to the polar coordinates and integrat- ing out the variable of radial distance. After lengthy but straightforward manipulations, the resulting distribution is found to be

&U),

* (1 + erf (s cos e))eszco\'B

where s = p / ( & a d ) , 0 5 8 < 2 n , and the error function (erf) is defined as:

erf (x) = (26) - e-'' dr.

Since we treat the directional angle 8 as equivalent to 8 + n, we have to modify the range of the distribution to that of - a / 2 to n / 2 (or 0 to n):

p,(8) = ~ - + (S cos 0) erf (S COS 8)u""~y] . (27)

To verify the derived distribution, an 80 x 2000 image was generated with A = 1.0 and U , = 2.0. The angular distribution of the gradient direction along the step bound- ary was computed from the image and compared with the theoretical distribution. When noise is dominating the sig- nal, the histogram of the directional angle, sampled along the edge transition boundary, does not show a well-de- fined peak (see Fig. 15). As can be seen from Figs. 16- 19, when the smoothing is increased, the distribution be- comes Gaussian-like, with a smaller and smaller standard deviation, while the mean is always centered at the true boundary angle (in this case, 0'). The solid curves in these figures are the theoretical distributions.

We now look at the case of a vector field with three attributes (rn = 3). Since the distribution of the direc- tional angle is too complicated for us to derive a closed

L o S'

2 I;;;

-~0.00-72.00-54.00-36.00 -18.00 0.00 18.00 36.00 54.00 72.00 90.00 gradlent directlon (degree)

Fig. 15. Histogram of the directional angles of the gradients sampled along a long, straight, vertical edge in a monochromatic image ( m = 1). The signal-to-noise ratio is 0.5 and no smoothing is done. The symbols are the measured data and the solid curve is the theoretical distribution.

-90.00 -72.00 -54.00 -36.00 -18.00 0.00 18.00 36.00 54.00 72.00 90.00 gradlent direction (degree)

Fig. 16. Histogram of the directional angles of the gradients sampled along a long, straight, vertical edge in a monochromatic image ( 1 ~ 7 = I ) . The signal-to-noise ratio is 0.5 and the input image is smoothed by a Gaussian filter of size U/, = 1.0. The symbols are the measured data and the solid curve is the theoretical distribution.

00

gradlent direction (degree)

Fig. 17. Histogram of the directional angles of the gradients sampled along a long, straight. vertical edge in a monochromatic image (m = 1). The signal-to-noise ratio is 0.5 and the input image is smoothed by a Gaussian filter of size U/, = 2.0. The symbols are the measured data and the solid curve is the theoretical distribution.

form expression, we decided to use the same function in (27 ) to approximate the angular distribution of the vector gradient of an rn-attribute vector field by defining s to be

r -

Page 12: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

I192 IEFE TRAKSACTIONS ON SIGNAL PROCESSING. VOL 39. NO 5 . MAY 1991

f l f+ +++% +

20 f 00

gradient direction (degree)

Fig. 18. Histogram o f the directional angles of the gradients sampled along a long, straight, vertical edge in a monochromatic image ( i n = I ) . The signal-to-noise ratio is 0.5 and the input image is smoothed by a Gaussian tilter of size U/, = 3 .0 . The symbols are the measured data and the solid curve is the theoretical distribution.

'i; im 'I + i\+ f-1

00

gradient direction (degree)

Fig. 19. Histogram o f the directional angles of the gradients sampled along a long, straight, vertical edge in a monochromatic image (ni = I). The signal-to-noise ratio is 0 . 5 and the input image is smoothed by a Gaussian filter of size U / , = 4.0. The symbols are the measured data and the solid curve is the theoretical distribution.

+ + + +++#+++

++ +

5 t 01 ' 1 1 ' ' 0 ' 1 I

gradient direction (degree) -90.00 -72.00 -54.00 -36.00 -18.00 0.00 18.00 36.00 54.00 72.00 90.00

Fig. 20. Histogram of the directional angles of the gradient\ sampled along a long, straight. vertical edge in a three-color image ( 1 7 1 = 3) . The signal- to-noise ratio is 0 . 5 and no smoothing is done. The symbols are the inea- sured data and the solid curve is the theoretical approximation.

Figs. 20-24 show the angular histograms of the vector gradient direction (rn = 3) and their approximations by the modified distributions. The approximation seems to be quite reasonable.

-90.00 -72.00 -54.00 -36.00 -18.00 0.00 18.00 36.00 54.00 72.00 90.00 gradient direction (degree)

Fig. 2 I. Histogram of the directional angles ot'the gradients sampled along a long, straight. vertical edge in a three-color image ( m = 3 ) . The signal- to-noise ratio IS 0 . 5 and the input image is smoothed by a Gaussian filter of size U,, = I .O. The symbols are the measured data and the solid curve is the theoretical approximation.

Fig. 2 2 . Histogram o f the directional angles of the gradients sampled along a long. straight. vertical edge in a three-color image ( i n = 3). The signal- to-noise ratio is 0.5 and the input image i b smoothed by a Gaussian tilter of size U,, = 2.0. The symbols are the measured data and the solid curve is the theoretical approximation.

20

00 gradient direction (degree)

Fig. 23. Histogram of the directional angles of the gradients sampled along a long. straight. vertical edge in a three-color image ( i i i = 3). The signal- to-noise ratio is 0.5 and the input image is smoothed by a Gaussian tilter of size U,, = 3.0. The symbols are the measured data and the solid curve is the theoretical approximation.

VI. DISCUSSION A N D CONCLUSION To detect boundaries in a multidimensional data with

multiple attributes, one can combine changes in the attri- butes in several ways. We have shown that when the sig-

y w ~ w " ; A U;UXWAX% J i ' ' k w n u n f i ~ u t J p 6 W ~111116VU \ l l l * L b l p L UIIIJ] 1U1 L1113 lLLL 1 KAlY3AL I 1 U I Y 3 ) I 1 h C LIIUSC JUUIIMb 01 ULIler prUKsslona1 societies, is not a necessary prerequisite for publication. However, payment of excess page charges is a prerequisite. The author will receive 100 free reprints (without covers) only if the voluntary page charge is honored. Detailed instructions will accompany the proofs.

Page 13: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

LEE AND COK: DETECTING BOUNDARIES IN A VECTOR FIELD I I93

3 250

$ [ i

$ 2 0 0 +

lrn t

00 gradlent dlrectlon (degree)

Fig. 24. Histogram of the directional angles of the gradients sampled along a long, straight. vertical edge in a three-color image ( rn = 3). The signal- to-noise ratio is 0.5 and the input image is smoothed by a Gaussian filter of size U,, = 4.0. The symbols are the measured data and the solid curve is the theoretical approximation.

nals are more correlated than the noise, use of vector gra- dient is less sensitive to noise than that of the L2 norm of scalar gradients. This advantage is there independent of how other information is used to help deciding whether a detected boundary pixel is due to noise or signal.

If the attributes of the vector field correspond to very different physical properties and therefore are not highly correlated, then the gain in signal-to-noise ratio from using the vector gradient is reduced. However, the vector gradient approach computes a representation of “dis- tance” that is more natural than that computed by the con- ventional color edge detectors, which use only scalar gra- dients. For example, to compute chromaticity changes in a color image, a uniform color space, such as CIE L*u*v* or L*a*b*, is often used. Such a space is constructed so that equal Euclidean distances correspond to approxi- mately equal perceptual differences. In such cases, vector gradient which computes the differential variation in terms of the Euclidean distance in the attribute space is more natural than the scalar gradient.

For a step boundary, we have shown that smoothing by a Gaussian filter reduces the noise gradient amplitude much faster than the signal gradient amplitude. For given performance requirements specified by a and 0 error tol- erances, the required smoothing to detect a given signal amplitude is approximately proportional to the inverse of the signal-to-noise ratio. The distribution of the square of the vector gradient amplitude for a Gaussian white noise is shown to be approximately a x2 distribution, with a scale factor dependent on rn, the number of attributes of the vector field. In addition, smoothing is also shown to reduce the angular spread of the directions of the vector gradients. We have also derived a good approximation to the distribution of the directional angles. These distribu- tions of the amplitude and the direction of the vector gra- dient are useful for characterizing the performance of gra- dient-based boundary detectors.

APPENDIX In this Appendix, we derive some of the noise charac-

teristics used in the main text. We assume that the noise

is a zero-mean, stationary, white, Gaussian random field N ( x , y) with standard deviation U,,. All operations are in the discrete (sampled) domain. Image signals are assumed to be quantized spatially, but not quantized in amplitude.

Let P ( x , y) be the output field of N ( x , y) smoothed by a Gaussian filter with standard deviation = oh. The au- tocorrelation function RP of P is derived as follows:

R d m , n) = E[P(m, n)P(O, 0)l

where

(x - rn/212 + (y - n/212 s = C C T e x p -

r 1 T U [ , a:,

(30)

l (

and x and y are summed over the overlapping area be- tween the two convolutional kernels, one centered at (0, 0) and the other at (rn, n ) . If both the image and the con- volution are continuous, the summation becomes integra- tion and S is equal to 1.0 exactly. However, in the sam- pled image, the value S is not exactly a constant. It varies with rn, n , ah, and the convolution mask size. In our im- plementation, the mask is 8ah + 1 by Eah + 1 , and the value of S is close to 1.0. Table IV shows the variation of s.

The variance of the partial derivative of P ( x , y) can be computed from R, straightforwardly:

a;, = E [ ( P ( l , - 1 ) + P(1, 0) + P(1, 1) - P(- l , - 1 )

- P ( - l , 0) - P(-1, 1))*]

7 6 R p ( O , 0) + 8Rp(l, 0) - 2Rp(2, 0)

- 8Rp(2, 1) - 4Rp(2, 2).

The correlation between P, and P, can be shown to be zero simply by substituting P, = P ( 1, - 1) + P ( 1, 0) + P(1, 1) - P(-1, - 1 ) - P(-1, 0) - P(-1, 1) and P,

- 1 ) - P ( - 1 , - 1 ) into E [ P x P , ] , and cancelling all terms. It is interesting to note that E[P,P,] is zero as long as P ( x , y) is symmetric in x and y, and, therefore, use of sym- metric filters other than Gaussian still give uncorrelated partial derivatives. Since we assume that the noise is Gaussian, and so are their partial derivatives, uncorrelat- edness also means independence.

= P(1, 1 ) + P ( 0 , 1 ) + P(-1, 1 ) - P(1, - 1 ) - P ( 0 ,

Page 14: A NALYSIS of multidimensional data with multiple at-people.csail.mit.edu/tieu/notebook/imageproc/lee02.pdfstudied in [8], [17], [24], and [28], where edges are de- tected more or less

I194 IFFk IKANSACTIONS O N SIGNAL PROCESSING. VOL. 39. NO 5 . MAY l Y 9 l

I .O 1.000207 1 .OOOOOO 0.999793 1.000207 I .000000 I .5 1 .000000 1 .000000 I .000000 I .000000 0.999999 2 .0 I .000000 1 .000001 0.999999 0.999999 I .000000 2.5 I .OOOOOO I .OOOOOO I .OOOOOO 0.999999 0.999999 3.0 0.999999 I .000000 I .000000 I .000000 1 .000000 3.5 1 .000001 I .000000 1 .000000 1 .000000 0.999999 4.0 0.999999 1 .000000 0.999999 I .000000 0.999998

[ 141 W. S . Hinshaw and A. H . Lent. "An introduction to NMR imaging: From the Bloch equation to the imaging equation," Pro(,. IEEE. v o l . 71, no. 3, pp. 338-350. 1983.

[ IS] J . S . Huang and D. H. Tseng. "Statistical theory of edge detection.'' Cornpur. Vision, Gruph. , Iinuge Proc.essirig. vol. 43, pp. 337-346, 1988.

1161 M. H. Hueckel, "An operator which locates edges in digitized pic- tures," J. A.ssoc. Compuf. Mtrch. , vol. 18, no. I , pp. 113- 125. J a n . 1971.

1171 A. Hurlbert, The Cornpuration of Color, Ph.D. dissertation. Dep. Brain and Cognitive Sci.. Massachusetts Institute of Technology, Cambridge. MA, Sept. 1989.

[ 181 M. Kendall and A . Stuart. The Adiwic.ed Theory ofSru/istic,.%. vol. 2. 4th ed. London, England: Charles Griffin Co. Ltd.. 1979.

I191 Y. Leclerc and S. W. Zucker. "The local htructure of image discon- . 1

Final,y, we have used Some approximation formulas to tinuities in one dimension." in Proc. 7rh I n f . Conj Parr. Rrcwgniriori (Montreal, Canada). 1984. pp. 46-48.

tection, classification, and measurement." / E € € Truris. Putt. Ancrl.

H, K , Liu. "Two- and three-diinensional boundary detection." Co,ii-

compute the probability of the central and noncentral x2 pol D. Lee. "Coping with discontinuities in computer vision: Their de- distributions. They are taken from [ l ] . Because of their

M u d . htrl l . . vol. 12, no. 4 . pp. 321-344, Apr. 1990.

pur. Grcrph. /mire Proc~essinr. vol. 6, no. 2. m. 123-134, 1977. in computing the and P risks in 1211

detection in the presence of Gaussian noise, we list the . . formula numbers in [ 11 1221 D . C. Marr and E. Hildreth, ""Theory of edge detection." Pro<.. R o y .

26.2'173 26'2'237 26'4' 1 5 * 26'4' 18, 26.4'283 and (231 V. S. Nalwa and T . 0. Binford. "On detecting edges." IEEE Trtrns.

for the reader's reference: Soc. London. ser. B. vol. 207. pp. 187-217, 1980.

Pnrr. Antrl. Mtrch. I n r e / / . , vol. PAMI-8. n o . 6. pp. 699-714. Nov. 26.4.32. It should be pointed out that the noncentrality parameter X used in these formulas is defined as X = E, CL;, where C L I is the mean of the th-component normal variable with unit variance. For a discussion of the non- central x 2 distribution, the reader is referred to [18, pp, 243-2461,

1986 1241 R Nevatia, "A color edge detector and i t \ u\e in \cene \egmentd-

tion." IEEE T r m \ S\\f , Mori, C\herri , vol SMC 7 , pp 820-826. 1977

1251 C L Novdk and S A Shafer. "Color edge detection." i n Ptoc DARPA Imuge C/ndrrsrand/ng W o r h h o p (Los Angele5, CA). Feb 1987 Lo\ Alto\. CA Morgan Kautmann Publisher\, Inc . pp 35- 37

(261 W K Pratt. Drqrrcil Inicrgc, Protrc\rng New York Wiley. 1978.

1271 1 L Pykett, "NMR imaging in medicine," Screnrijc Arneri(crri, vol pp 78-79 ACKNOWLEDGMENT

The authors thank M. Kaplan and D. puzio for their

used to produce the test images with great ease, H. Kwon for his helpful comments and suggestions, and D. Ken- worthy for her editorial help.

246. no 5 , pp 78-88. May 1982

479-484. 1977

image generation and programs which they 1281 G S "Color edge detection." Opt EllK , "01 16, pp

1291 V Torre and T Poggio. "On edge detection." IEEE Trcrrrc Purr

1301 H Voorhees, "Finding texture boundarie\ in image\.' M 1 T Ar- tificial Intell Lab . Cambridge, MA, Rep AI TR 968, 1987

[31] S W Zucker and R A Hummel. "A three-dimen\iond! edge oper- ator." IEEE T r m \ P N I I . A M / M ~ r t h lnfcll . vol PAMI-3. n o 7, pp 324-331. 1981

Atiul M~th. I t i r ~ l l , V O I PAMI-8. pp 147-163, 1986

REFERENCES

[ I ] M Abramowitz and I A Stegun. Eds . HerridhooL ofMtrr/ie,,icrtr[~rl

(21 T W Anderson, Ai7 Introcluctiori 10 Mitlriicrrrcitc~ Sttrrrcrrtnl Anoh \ I \ .

[3] T M Apostol, Cultuluc, vol 11, 2nd ed New York Wiley. 1969 Hsien-Che Lee ( S 79-M'82) received the Ph D [4] R Bem\tein. "Digital image processing ot earth observation \en\or degree in electrical engineering Irom Purduc Uni-

data." IBM J Res Deielop , vol 20, pp 40-57, 1976 ver\ity in 1981 151 A Blake m d A Zisaerman. Visutrl Reconctruction Cambridge. He I\ currently with Koddk Rewarch Ldbor'i

MA M I T Press, 1987 tories. Ea\tman Kodak Company. Roche\ter, NY [6] J F Canny, "Finding edge\ and lines in image\. . M 1 T Artihcial He ha \ uorked on computer v i \ i o n , color image

Intell Lab , Cambridge, MA. Rep A I TR 720. 1983. also "A com- enhnncernent. m d modeling of human color per- putationdl approach to edge detection.'' / € F E Trcinc P ~ r r Anul ception He I\ intere\ted in hnding out how vi \ ion Much Inrrll . vol PAMI-8. no 6. pp 679-698, Nov 1986 can be under\tood in term\ ot phy\ ic \ and coin

[7] L. S Davi\. "A survey ot edge detection technique\," Compur putation. and how the hnowledgc can bc applied Graph Irncrgr Protec\rriq, vol 4 , no 3 . pp 248-270. Sept 1975. to image proce\\inp

181 C J Delcroix and M A Abidi, "Fusion of edge maps in color ini-

age\." Proc SPIEInr Soc Opt Eng . vol 1001. pp 545-554. 1988 191 S Di Zenzo. "A note on the gradient of a multi-imane." Comnuf

Funtrron\ New York Dover. 1972

2nd ed New York Wiley, 1984

. . 1101

Vision, Graph., Image ProcessinR, vol. 33, p p . 116-125. 1986. G . E. Forsythe, M. A. Malcolm, and C . B. Moler. Computer Merh- ods f o r Mathemarical Computations. Englewood Clitfs. NJ : Pren- rice-Hall, 1977. ch. 9. D. Geman, "Stochastic model for boundary detection." Irncrge Vision Computing, vol. 5 . no. 2, pp. 61-65, 1987. W. E. L. Grimson and T . Pavlidis. "Discontinuity detection lor \ 3 i -

sua1 surface reconstruction." Cornpur. Vision, Gruph., Iniagc Pro- cessing. vol. 30. pp. 316-330. 1985. R. M. Haralick. "Edge and region analysis for digital image data." Comput. Vision, Gruph.. Imrrgr Pror.cssing. vol. 12. pp. 60-73, 1980.

David R . Cok received the Ph.D. degree i n phys- ics from Harvard University in 1980.

He is currently a Research Associate with the Research Laboratories of Eastman Kodah C o n - pany working in the Imaging Science Laboratory

p ~ w o . A U ; U X W A X ~ J i ' L ~ n u n a ~ u t j p 6 W 1111116VU \ l l l * L b l p 1 L U I I l J ] 1U1 L1113 lLLL 1 KAlY3AL 1 1 U I Y 3 ~ I 1 h C LIIUSC J U U I I I ~ I S U1 ULIlGr PrUlGSSlUnal

societies, is not a necessary prerequisite for publication. However, payment of excess page charges is a prerequisite. The author will receive 100 free reprints (without covers) only if the voluntary page charge is honored. Detailed instructions will accompany the proofs.