Feature space transforms for curve detection

Feature space transforms for curve detection

0031 3203/78'0601 0129 $02.00/0 Pattern Recoynition, Vol. 10, pp 129- 143. Pergamon Press. 1978. Printed in Great Britain. © Pattern Recognition Soci...

757KB Sizes 47 Downloads 77 Views

0031 3203/78'0601 0129 $02.00/0

Pattern Recoynition, Vol. 10, pp 129- 143. Pergamon Press. 1978. Printed in Great Britain. © Pattern Recognition Society.

FEATURE SPACE TRANSFORMS FOR CURVE DETECTION*" STEPHEN D. SHAPIRO

Stevens Institute of Technology, Hoboken, NJ 07030, U.S.A. (Received 22 July 1977; received for publication 3 January 1978)

Abstract - Hough-like transforms may be used to detect curves in digital pictures. Applications of this technique are surveyed. The essentially parallel character of transforms is discussed. Elements of theory are presented for performance prediction together with simulated results. Line detection

Edge linking

Image processing

Picture transforms

Pattern recognition

straight line b = - x m + y. O n e such line is present for each (x, y). Each intersection of these lines occurs at a point, e.g. (mo, bo), which would yield a straight line through all of the points in feature space corresponding to the intersecting lines at that point. In the case above each feature point gives rise to a region, line, in parameter space because the equations for the parameters are underdetermined. If the input image had been processed by a local edge detection operator," 41 each feature point could be expressed as ( x , y , y ' ) or (x,y,~0) where tp is the slope given as an angle. Now the transform would be

INTRODUCTION M a n y image processing problems require curve detection. These include vision directed automation, remote control of vehicles, analysis of aerial photographs, and other remotely sensed data, bubble chamber pictures, and numerous biomedical applications such as X-ray photographs and ultrasound scans. To apply the transform technique, the sought after curves are assumed to be of known, or at least approximately known, parametric form. However, the parameter values are unknown. In the usual formulation, it is assumed that the picture has been processed to produce feature points which are possible points of curves. In the simplest form, a single transformation is applied to all feature points, mapping them into a parameter space. The transformation is found by inverting the parametric characterization of the curve sought; finding the parameters as a function of the feature point values. Feature points corresponding to the same curve are mapped into the same point or dense region in the parameter space. Clustering is then applied in the parameter space and the resulting clusters correspond to curves in the original picture. The earliest example of this kind of procedure is indicated in Hough ~13~ for finding straight lines. All points on the same straight line must satisfy y = m x + b for some particular value of (m,b). Suppose the picture has been processed to yield a set of feature points, {(x, y)}, subsets of which are possible points on straight lines in the picture. We wish to partition the set into subsets, each of which belong to the same line. For each (x,y), the equation y = m x + b gives possible solutions for m and b. These possible solutions lie on a

m = y',

b = -y'x

+ y,

(I)

which is a m a n y : one mapping. All points from the same straight line map into the same (re, b) point in parameter space. This is the fully determined case. There is no inherent difference between these two cases; however, the kind of clustering techniques applied tend to differ. In general, curves of arbitrary form can be detected using these transforms as discussed, for example, in Duda and Hart 16"Vl and Shapiro. ~2a~ Consider curves of the form y = F(x,a)

a is a parameter vector

where the feature vectors are of the form z = (x, y. y'). A pair of equations then results y = F(x,a),

y' = ~ F ( x , a ) .

(2)

Each z value gives rise to subspace of possible parameter values. Say the sought after curves are parabolas

* Copyright © 1977 by The Institute of Electrical and Electronics Engineers, Inc. Reprinted, with permission, from Proceedings of the IEEE Computer Society Conference on Pattern Recognition and Image Processing, 6-8 June 1977, p. 377. t This work was supported by the National Science Foundation under Grant MCS76-08176.

y = F(x,a) = F ( x , a , b , c ) = a x 2 + bx + c

(3)

then each z gives rise to a line a = cx - z - y x -2 + y ' x -1, b = - 2 c x -2 + 2 y x -1 - y' in (a,b,c) space. The intersection of these lines yields the indicated solutions. The fully determined case is given, for example, by

129

130

S.D. SHAPIRO

assuming that there are only two parameters, say c = 0. The mapping for (3) is then given by a = y ' x - 1 _ y x - 2,

b = 2 y x - 1 _ y,.

(4)

In general the transform is a mapping T from points in feature space to points in parameter space: T :z--* a.

For the case in which z = (x, y, y') and a = (a, b), define T by two functions a = A(z), b = B(z) which are the solutions Of the parametric equation of curve. Equations (4) are an example of these functions. In practice, exact estimates ofz are not known due to errors in measurement, quantization errors and inexact knowledge of the form of the sought after curve, F ( x , a). In what follows the estimated, measured, value ofw is denoted ¢vwhere w is random variable. Thus ~ is the estimated value of z. APPLICATIONS

We first consider applications to straight line and circle detection. For straight lines the form y = m x + b present an implementation problem due to large slopes, as discussed in Rosenfeldt25) and Duda and Hart/6'7) In most of the work indicated below for straight lines, the normal parameterizationt6) is used. The method is discussed in the fourth section. Application to straight line detection in digital pictures for simple feature points is given in Duda and Hart (6) where an accumulator method is introduced to detect the intersections. Griffithtl ~) uses a histogram procedure based on the standard representation for lines. Other work includes O'Gorman and Clowes. t2°~ Perkins and Binford,t22) in their application to TV images, give an error estimation procedure and utilize slope information in the feature vector. Other applications based on the normal parameterization appear in Nevatia (aS) and Dudani and Luk t8) for outdoor scenes. The transform method for detecting circular segments is usually based on a polar coordinate representation. Application to bubble chamber photographs is given in Bazin and Benoit c4~and Bastian and Dunn. TM Detection of tumors in X-ray photographs is carried out in Kimme, Ballard and Sklanskyt15) based on the generally circular appearance of these tumors. Application to rib detection in X-rays is given in Wechsler and Sklanskyc3~) based on parabolic segments. The potential application to planar surfaces having arbitrary orientations is indicated in Nitzan, Brain and Duda/19) Related techniques

A geometric mapping technique for arbitrary curves which is related to the transform method although all parameters are suppressed is described by Merlin and Farber/! 71 Curve fitting based on slope and distance, e.g. Perkins,~23)and other projections, such as centroid profile, Freeman,~1°) as well as certain kinds of template matching, e.g. Baird, tx) may also be viewed as

"suppressed parameter" transformations. Related considerations f o r implementation

Detection of significant picture points ( x , y ) and slope estimators are widely treated; e.g. Davis, ~5) Heuckel,ts4) Rosenfeld. ~26) Application of the transform is followed by clustering. Many methods have been used including histogram techniques as indicated above. Clustering techniques are surveyed in Duda and Hart/v) Noise considerations and distance measures are discussed in Shapiro/27) Two surveys, although not bearing directly on the transform method, deal with immediately related considerations: shape analysis, Pavlidis,(21) and segmentation of scenes, Riseman and Arbib/TM PARALLEL I M P L E M E N T A T I O N OF TRANSFORMS

One of the key features of Hough-like transforms is that they can be applied in parallel to digital pictures. The following implementation is proposed. The picture plane can be divided in small areas and each area can be processed in parallel. For example, suppose curves of the form y = a x 2 + bx are sought and the feature vectors contain slope information, z = (x, y, y'). Let the elementary regions of the picture plane be indexed i = 1,2,3 .... so that (x~,yl) represents the location of the ith region. Each region operates over enough pixeis to produce an adequate estimate, 2. When a picture is presented to the array, an output is given for the ith region if and only if a significant slope is found within the region, in which case the output is ~ = (xi, Yi' -v~)-The transform for the region is then activated, from (4): ?t= f ; J 7 1 -

~,~7 2,

b = 2~,JTX - y',.

(5)

Each such transform may be implemented by a microprocessor and in parallel over the whole picture. Each local processor operating over a region may be programmed or directed to detect a variety of possible curves by implementing the appropriate transforms. ANALYSIS OF TRANSFORM PERFORMANCE

Various aspects of transform performance are considered in Shapiro/TM These include the effects of noise, approximate knowledge of curve shape, and performance when the transform is applied to feature points from a different curve family--the case in which there is a variety of curve families in the picture, a subset of which are sought. Performance of the transform method, considered as a tool in and of itself, is governed by several factors, all related to the distribution of the transformed points in parameter space. In particular, the following factors control the clustering performance: 1. The total number of points. 2. The size of clusters associated with the sought after curves. 3. The spatial distribution of the clusters in parameter space.

Feature space transforms for curve detection 4. The spatial distribution of points in parameter space when the incorrect transform is applied. An analysis of several of these properties is given ~28) as indicated above. Outlined below are several approaches for characterizing the second and fourth factors. Clustering performs best when there are small, dense and widely separated clusters. Alternatively, the worst case for clustering is uniformly distributed points. Even though these uniform points may arise from an underlying process where there inherently are clusters, it would be impossible to detect theunderlying clusters without additional information. One measure of performance is the variance, used to estimate the spread in parameter space induced by inaccurate measurement of the feature points, z. A technique for evaluating the variance is to linearize the parameter values about their true, unknown, values. Suppose

131

line from the origin to the line being characterized and 0 represents the angle of this shortest line with the xaxis. The line is given by p = x c o s 0 + y sin 0.

(11)

Here the values of such 0 take on finite values eliminating the problem of large slopes in the y = m x + b characterization. N o t e that the maximum value of pis~/x 2 +y2. It may be shown (2a) that Var ~3 --- %2 sin 2 t,0 + cr~ cos 2 tp + a,p2 N ×(xcos~0 + y s i n q ~ ) 2.

(12)

where q> = slope of the line, t a n - 1y,. Assuming G2 = a~ = a 2 , Varf~-az

+ a ~ ( x c o s q ~ + ysinqg) z.

~13t

Looking along the line x = y = c, 3c = x + ct,

~'=y+fl,

5,' = y' + 7,

(6)

where the errors ~, fl, "; are zero mean. Then for the fully determined case : N = (=, fl, y) Var h ~ A 2l ( z ) G2 + A~(z)a~ + A 32( z ) %2,

(7)

N

where A i = partial of A wrt ith variable and a 2 = Var w, w = ct, fl, 7. Continuing the example y = ax 2 + bx: Finding the inverses, we obtain the transformation (4) : a = A(z)

= y'x-

1 -- yx-2

2 Vart3 -~ a 2 + c 2 %(1 + sin 2~0).

(14)

This also illustrates the sensitivity of p to location in the retina. A non-statistical comment about influence of the error in q> appears (22) in terms of the normal coordinates of an edge segment : for the case analogous to our cr~ ~ 0, an analogous incremental expression is given. This suggests (222~ that the influence of errors can be reduced by appropriately locating the point(s) of origin. The objective (27~ is to reduce the factors multiplying the larger error variances.

b = B(z) = 2 y x - t _ y,; Containment

then A 1 ( z ) = 2yx A2(7. ) --:- - - X A3(Z) = x

3 _ x Zy,

B l(z) = - 2 y x - 2,

2

B2(z) = 2 x - 1,

I

B3(z ) = - 1.

(8)

The variance expressions follow immediately. We shall look at the sensitivities in terms of this example. The relative importance of %,2 a~, %2 will depend on (a, b) and the position in the retina. We may substitute the functions F and F~ in the above. A l(z) = b x - 2,

B 1(z) = - 2a - 2b/x,

A2(z) :: - x -2,

B2(z ) = 2x -1,

A3(2)=X

B3(z) =

-1 ,

-1;

(9)

thus V a r h ~ _ o--2 x - 4 G2 +

X - 4 0 " ~ -}" X

-2 O'~, 2

(10)

N 2 Var fi ~ 4(a - b/x)Za~ + 4 x - 2 a ~ + a,~. N

Note that, a,ez plays a large role when x is large and a relatively small one when x is small.

Another estimate of spread when the correct transform is applied can be made probabilistically. Assume the errors ~, fl, 7 are normally distributed with the corresponding variances a~, cry, a~ Then the error in the parameter estimate is also approximately normally distributed, e.g. the error in & is gt -- a ~ Al(z)ot + A2(z)fi + A3(z)7 ,

(15)

and has variance a] for small errors in feature vector measurements. Consider the case of two parameters (a, b) which are fully determined. We can now look at

e{la-al<<_Ka]/2;

t[~-bl<_Ka~/2}.

(16)

Although h - a and b - b are generally dependent, it appears that (16) may be approximated by the product the probabilities : P{I~ - a I <_ Ka]/2}P{l[, - b[ < Kay~21.

07)

Given (17) we may estimate the cluster size by a rectangle of area K 2 a ] a } which illustrates explicitly, the effect of feature measurement accuracy on cluster size. Examples are given in the next section.

Normal parameterization (normal transform)

Transform scattering property

A straight line may be represented m) by two parameters, p and O. p represents the length of the shortest

Since clustering is the tool used to find underlying curves after the transform has been applied, we would

S.D. SHAPIRO

132

like the points to cluster if and only if the corresponding points in the original image correspond to the same underlying curve. This criteria presented in (zS) can be used to examine transform performance for pictures with multiple curve families and can also be used to treat pictures with texture.

Textured image data Suppose the image contains a mixture of feature points due to texture,(2"~ 2. ~61and those due to underlying curves. The texture points will be transformed along with points from the underlying curves possibly producing erroneous clusters. An extension of the transform method to deal with this possibility is given (3°) and is sketched here. It is based on the assumption of the "transform scattering property". Let H 0 be the hypothesis that a particular feature point (x, y, y') originated from a curve of the sought after family. Let H a be the hypothesis that (x,y,y') is the result of texture. We would like to design a transform so that when it is applied to all points we have the following scattering property: points in the transformed space should cluster for feature points

under H o and should be uniformly distributed under H a•

The uniform distribution under Ha has two consequences : the transformed texture points will have a minimum influence on the clustering used to form curves and, if filtering of transformed texture points is carried out, the filtering procedure will be simplified. We will use the following approach. Apply the usual transform. Now apply a second transform T, to the transformed points. Tt has the property that under Ha the points in its range are uniformly distributed. The transforms are then:

Z r_~(a,b) r.~ ' (Ul,U2). In order to preserve clustering under Ho, T t must be 1:1 and as the distance between two points in the domain of Tt decreases the corresponding two points u-space must approach each other. Both of these are satisfied if (u 1, u2) is monotonically increasing in (a, b). We assume that under H a, x, y, and y' are each independently and uniformly distributed random variables, each distributed Uto .~]. Using the fact that if P{x < t} = H(t) for random

4.00

3.63

3.25 (ii)

2.8~ - -

2.5( --

2.13--

1.75 - -

1.38

-

-

1.00 1,00

I

I

I

1.38

1.75

2.13

[ 2.50 X

I 2.88

I 3.25

I 3.63

Fig. I. Original noise free picture showing the three curves used later.

4.00

Feature space transforms for curve detection variable X, then H ( X ) is a uniformly distributed random variable, we obtain the transform pair implementing T, : u x = H~(a(z));

133

E x a m p l e 2. y = F ( x , a, b) = a x + b

Then y ' = a and T is given by

u 2 = H2(b(z)).

a = A(x,y,y')

An example of this kind of texture processing is given in the next section.

= y'

b = B(x,y,y')

= y - y'x.

Scatter diagrams

PERFORMANCE

OF

Some typical curves, how they look with noise added, and a typical scatter diagram resulting from applying the appropriate transformation to each curve are shown. Figure 1 is the original noise free picture showing the three curves which are used in this section. Curves (i) and (ii) are of the form y = a x 2 + b while curve (iii) is of the form y = a x + b. Each curve is represented by uniformly spaced x samples. Figure 2 shows the feature points, in the presence of noise, used as inputs to the transforms. A feature points is represented by a square and a small line segment indicating the slope. Figures 3-5 show scatter diagrams in the transformed space for curves (i), (ii), and (iii) respectively. The noise present in the original picture for this case is a, = tr;. = 0.033, tr~ = O.

TRANSFORMS

In this section simulated results are used to illustrate several of the transform properties discussed above. The accuracy of the approximations for variance and containment are treated. Scatter diagrams showing the distribution of points in parameter space are given. In what follows two examples are used. Both are the fully determined case yielding a many "one transform. Example

1.

y = F(x,a,b)

= ax 2 + b

Then y' = 2 a x and T is given by a = A(x,y,y')

= y'/2

b = B(x,y,y')

= y-

y'x/2.

9

4.10

~o 9 3.69

P 3.28

P

2.86

~P

~9 P )/

la

~m

2.45--

m

2.04 --

~e

p~n

m

m l°

a m ~o ~ # ° m

ia jD

la

io~ lu

so

P m

• •

1.65 - -

~ ,r

la la la la ~

~o

m

mm

la

, m %m~mm~ ,. %

,

1.21 - m

0,80 0.80

I

I

1.21

1.63

I

1

2.04

2.45

I 2.86

I 3,28

x Fig. 2. Inputs in the presence of noise to the transforms 2 __

2 --

-

2 0"./

O.Ol.

I 3.69

I 4.10

134

S.D. SHAPIRO

Parameter variance prediction

The following may be seen : for b, tr~ plays a large role when x is large and a relatively small one when x is small and therefore x feature points with large x values should be examined more closely for computing the b parameter. Cluster shape does not seem to be affected by corresponding changes in noise level. Figures 6 and 7 show the effect a tenfold difference in the noise level has on the cluster shape. At higher levels linearity will not hold. Cluster size depends on the noise level and also on the position of the curve in the retina. Figures 8 and 9 are the clusters for curves (i) and (ii). They clearly show the effects of position and noise level on the cluster size. We may conclude that the position a curve has in the retina is an important determinant of cluster shape. Since a clustering algorithm is applied to the transformed points, a distance measure is needed. For this purpose variances of the points in the transformed space will be needed. As examples, least-squares fitting can be weighted by the reciprocal of the variance and tests motivated by the likelihood ratio required variance estimates under the assumption of normality. The same applies for distance measures based on extreme points or magnitudes of differences. Therefore we would like to know if the variance estimates are indeed accurate enough to be used.

Shown here are the effect of noise and position on cluster size and variance. Also evaluated for reasonableness is the variance prediction described in the previous Section. The curves of Fig. 1 are used in the simulation. The analytical expressions for these curves are : (i) y = 0.8x 2 + 0.8

1.2 < x < 1.99

(ii) y = 0.4x 2 + 0.4

1.4 < x < 3.28

(iii) y = 0.5x + 0.5

1.2 < x < 3.77.

Each curve is represented by I00 points uniformly distributed in the above intervals. Using Gaussian noise, perturbed feature points are formed and corresponding transformations are applied. For a given parametric family, the transformed variances due to noise only depend on the parameters (a, b) and the position in the retina. For Example 1 we have for curves (i) and (ii): a2

Var(h)=-,v

1

z+__a2

x 2 0"=

4x 2

X2

YarN(b) = x,2_2_2 2 u % + t r y + __ 4 a~.

(18)

1.50 - -

1.35

B

1.20

--

1.05

--

0.90-

0.75 - -

0.60

I I I I I I

--

I

I I

0.45--

I I 0.30 0.30

I 0.41

I 0.53

1 0.64

I 0.75

I

i 0.86

A

Fig. 3. Typical cluster for curve (i) ~r~ = or2 = 0.0or, ~ =0 Cluster center = (0.8,0.8).

I 0.98

I

I

i.09

1.20

F e a t u r e space transforms for curve detection 1.00

135

--

0.86

C'.75

0.59

0,45

0.3

al

0.1

0.0,

-0.t0 -OJO

I 0.04

I

I

I

I

I

0.18

0.31

0.45 A

0.59

0.73

I

I 0.86

1.00

Fig. 4. Typical cluster for curve (ii) o'~ = a~ = 0.001,

aJ = 0

Cluster center = (0.4,0.4). h20 I

h03 F

0.85

0.68

B 0.50

0.35

--

0.15 --

-0.03

-0.20 0

I 0.t3

I 0.25

I 0.38

I 0.50 ,4

0.65

Fig. 5. Typical cluster for curve (iii) 2__ 2 0.001, ~J. Cluster center = (0.5,0.5).

I 0.75

I 0.88

I 1.00

136

S . D . SHAPIRO 1.00

--

0.8E

0.7~ --

0,59 --

8

t

0.45 --

J 0.31

--

0.18

--

0.0~

--

I

-0.I0

-0.10

0.04

I

I 0.18

0.:31

0.45 A

0.59

I 0.73

I 0.86

I 1.00

Fig. 6. C l u s t e r f o r y = 0 . 4 x 2 + 0.4 ~ra2 = ~'~ = 0 , 1.00

O'~2 = O . O O l .

--

0.86

0.73

0.59

koBTI

0.45

0.31

-

-

-

-

i v 0.18

p,..kcrA

0.04

"~

I I

--

I I

I -0. I0 i -0.10

I

t

i

0.04

0.18

0.:31

I

i

t

I

0.45 ,4

0.59

0.7:3

I 0.86

Fig. 7. C l u s t e r f o r y = 0.4x 2 + 0.4

~,~ = ,~

= 0,

~

= o.ol.

Comparing with Fig. 6 we see effect of noise level on cluster shape.

I 1.00

F e a t u r e s p a c e t r a n s f o r m s for c u r v e d e t e c t i o n 1.58

137

- -

1.12 -a

^

A

0 . 9 5 --

....

A

a

~.-~-

~

"

~-'

0 . 7 8 --

@ 8

0.60

3

--

~a

e,

0,43

--

0.25

--

(108

--

N

k I

o.,o

I 0

0.15

I

I

0.50

0,45

I

0.60

I

0.75

0.90

I

]

~.05

1.20

A

Fig. 8. C l u s t e r s for y 1.30

=

0.4x 2

0.~2 = 0.~

~

+ 0.4 a n d y = 0.8x 2 + 0.8

O.2

= 0.01.

- -

1.12

t,

0.95 % ~:" 2 "%

'

0.78

0.60

0.43

0.25

P

0.08

-O.IC

I 0,15

I 0.30

I

I 0.60 ,4

0.45

0.75

Fig. 9. C l u s t e r s for y = 0 . 4 x 2 + 0.4 a n d y O'~2 ~

O'~ ~

0.72 - -

0.001.

0.90

=

0.8x 2

-J- 0.8

I I.O5

I 1.20

138

S . D . SHAPIRO

First we take the expected value of the variances, which have already been noise averaged, as a b o v e for Example 1, over the values for the particular curvethus achieving a spatial averaging. W e get for Example 1: [ h e r e Z~, represents all points o r i g i n a t i n g from curve (iii)] 2

E [ V a r ( ~ ) ] = a~

(19)

Zii i N

Since this prediction technique appears to be rea s o n a b l y accurate, a m e t h o d is implied for controlling cluster interference. A level of c o n t a i n m e n t , say 90%, can first be selected; then a box like metric, of area K2tr~ab is formed as indicated above. The cluster size is then predicted as a function of the underlying noise estimates giving rise to explicit range for a~,aa, a~ of feature estimators.

E [ V a r ( $ ) ] = 0.25a~ + a~ + 6.7a 2. M o r e t h a n one curve f a m i l y

Zii i N

T a b l e 1 shows the results (100 trials each level). As c a n be seen by the entries, the predicted a n d simulated values of the variances agree quite well even for moderately large a2's. Hence for small noise variances the estimates can be used with very good confidence for distance measures. Containment

G i v e n the variance estimates we can n o w look at c o n t a i n m e n t as discussed in a previous section. Centering a rectangle at (a, b) with size K a A x Ktrn - see Fig. 6 - we wish to c o m p a r e the n u m b e r of points within the rectangle to those predicted. U s i n g the a s s u m p t i o n s that the errors of h a n d b are a p p r o ximately n o r m a l l y d i s t r i b u t e d a n d i n d e p e n d e n t we get the following a p p r o x i m a t i o n s : Prob. Prob. Prob. Prob.

[(~,/~) falls [(~,/~) falls [(d,/~) falls [(a,/~) falls

within within within within

rectangle rectangle rectangle rectangle

of of of of

size size size size

tr,~. ab] ~ 0.15 2a,i * 2a/;] ~ 0.47 3a,i * 3aC,] -~ 0.75 4tr,i * 4a/~] ~ 0.91.

Here we look at the case where the t r a n s f o r m applied to the feature points differs from t h a t of the underlying curve. Say for example that the t r a n s f o r m for y = a x + b is applied to points s t e m m i n g from y = a x ~ + b. It is easily seen that the points in this case t r a n s f o r m into a curve. Figures 10 a n d 11 show the correct cluster a n d incorrect t r a n s f o r m e d curve resulting from a p p l y i n g the transforms for curve (iii) to curve (iii) a n d curve (ii). T h e " t r a n s f o r m scattering p r o p e r t y " indicates: Points in the image space g e n e r a t e d by t r a n s f o r m s should tend to cluster if a n d only if the c o r r e s p o n d i n g points in the d o m a i n stem from the same underlying curve. As above, variance is to evaluate it. Variance estimates for the case w h e n the incorrect t r a n s f o r m is applied are given in. 12s~ U s i n g these results, averaging over noise a n d position we h a v e : [here Zii represents all points originating from curve (ii)] V a r ~ = a,2t + 0.1885 N,Z.

In T a b l e 1 we see the p e r f o r m a n c e of the transform a t i o n is at least as good as predicted (100 samples per a level).

V a r / ~ = 3.69a 2 + tr~ + 5.77a 2 + 1.04,

(20)

N,Zii

Table 1. Variance estimates and containment 2 tT~

2

(simulated) ' (expected) 0.001 0.001 0.001 0.00t 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.005 0.01 0.1 0.1 0.05 0.2 0.5 0.7 1.0

0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.005 0.0l 0.05 0.5 1.0 10.0 0.001 0.001 0.001 0.1 0.05 0.2 0.5 0.7 1.0

0.001 0.005 0.01 0.05 0.1 0.5 1.0 5 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.1 0.05 0.2 0.5 0.7 1.0

0.00103 0.00520 0.01012 0.04973 0.10177 0.50141 1.0495 4.6982 0.00098 0.00095 0.00094 0.00099 0.00098 0.00105 0.00103 0.00096 0.00100 0.10950 0.04915 0.17638 0.5229 0.6916 0.9922

0.001 0.005 0.01 0.05 0.1 0.5 1.0 5 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.1 0.05 0.2 0.5 0.7 1.0

(simulated)

(expected)

0.00811 0.03739 0.068 0.3402 0.6746 3.4111 6.9195 31.82 0.0119 0.1599 0.0564 0.52085 1.005 10.022 0.00923 0.00967 0.33681 0.822 0.38767 1.5151 4.3155 5.8748 8.4968

0.00795 0.03475 0.06825 0.3362 0.6712 3.3512 6.7012 33.5012 0.01195 0.01695 0.05695 0.50695 1.0069 10.007 0.00895 0.0102 0.327 0.795 0.3975 1.59 3.975 5.565 7.95

Number of points falling within rectangle K=I K=2 K=3 K=4 27 32 34 34 36 33 37 36 19 17 15 13 15 16 25 21 16 26 28 27 26 26 26

60 64 63 63 64 65 63 63 53 50 49 47 48 46 58 55 51 60 59 61 59 59 59

82 83 83 83 83 85 83 83 80 78 77 75 75 75 82 83 76 81 82 82 81 81 81

93 94 93 94 93 94 93 93 94 93 92 92 93 92 95 93 93 93 93 94 93 94 94

139

Feature space transforms for curve detection 1,00 --

0.35

- 0.30

--

0.95

--

B -I,60 u~ -2.25

--

-2.90

--

-3.55

--

-q.20 -0.10

0.29

0.68

1.06

1.45

1.84

2.23

2.61

3,00

A

Fig. 10. Correct cluster and incorrect curve resulting from applying t r a n s f o r m a t i o n s of curve diit to curve (iiit and curve (ii) respectively. ,ff = ,J = ,~-' = o.ool. I , 2 I()

0.49

-0.2?

--

e

%

¢ e

-D

-

0.9,:;

aA ~

~

--

A

1.6'5 - -

¢,

-2.36

--

-3.08

--

-

--

3 , 7 9

I

-4.5(3 0,2,

0.21

I 0.63

l

L

I

1.04

1.45

1.86

I 2.28

A PR 10/3

-B

Fig. 11. S a m e as Fig. 10 with a~2 = aJ

=

O'2"

= 0.01.

I 2.69

I 310

140

S. D. SHAPIRO Table 2. Multiple curve families 2

2

0.0 0.001 0.01 0.05 0.1 0.2 0.5 0.7 0.8 1.0 1.5 0.9

0.0 0.001 0.01 0.05 0.1 0.2 0.5 0.7 0.8 1.0 1.5 0.9

0.0 0.001 0.01 0.05 0.1 0.2 0.5 0.7 0.8 1.0 1.5 0.9

2

a!

(expected)

(simulated)

0.19419 0.1963 0.204 0.23400 0.31714 0.3902 0.7165 0.8594 0.9363 1.239 1.7183 1.2277

0.1885 0.1895 0.19885 0.2385 0.2885 0.3885 0.6885 0.8885 0.9885 1.1885 1.6885 1.088

1.07499 1.0897 l. 1951 1.54489 2.25 3.29011 6.4292 8.7891 9.630 12.6129 18.57027 12.03168

for the case where transform of curve (iii) is applied to curve (ii). The last term in each equation represents the contribution due to position alone. Using the same procedure as above, Table 2 is obtained. We see that variance estimates are in good agreement with simulated results even for moderately large tr2's and can be used as an aid to estimate packing and separating power of the transforms.

Textured

~

(simulated)

(expected) 1.04 1.0504 1.1446 1.563 2.086 3.132 6.27 8.352 9.408 11.5 16.73 10.454

grams. A comparison of predicted and simulated variance is given. The curve 3' = 0.75 - 0.09/x ; 0.1 < x < 1.0, is used in the following experiment. The curve is represented by 100 uniformly distributed points in the given interval. The transforms for this parametric family are found as indicated in the previous section/3°~ The following figures show a typical result. Figure 12 shows the original picture consisting of the curve and texture points. Figure 13 is the transform space resulting after application of the usual transform-T to the texture. Figure 14 shows the transformed space after the application of T t. As can be seen the texture points are

image data

Results concerning the transform method for textured i m a g e d a t a a r e s h o w n in s e v e r a l scatter dia1.00 - -

a ,s

0.88



,s

a

a

a

a

--

k,

a a a

A•

a

~

a



,~

0.75 a

0.63 --

a

y

a

~

'~

a

a

0.50--

0.58

0.25

0.13

I 0./3

O. 2 5

0.38

0.50

0.63

0.75

0.88

X

Fig. 12. Picture showing curve, y = 0.75 - 0.09/x, and texture points.

I,OO

Feature space transforms for curve detection

141

¢

-0,13

o

-0.25

° °

e

o

e

-0.58

¢ e

o ¢

-0.50

0

-0.63

0.75 --

09

-088

-o

I

t

-I,00

0.25

1

I

0.50

1.00

0.75

1.25

i.¸75

1 .5 0

2,00

A

Fig. 13. Application of T to texture points only. 1.00

-t,

t~

~

t,

t,

L

0.88 A

C).75

0,63

,s ,s

U2

0.50

A



A 0.38

t

~

A

I

0.25

A

0.13 A

I 0. 13

I 0.25

I 0.38

I 0.50

O.6Z

0.75

0.88

UE Fig. 14. Resulting cluster and spread of texture points after application of T,

1.00

142

S.D. SHAPIRO

uniformly distributed in Fig. 14 and hence filtering techniques can be used to remove them easily and clustering is facilitated. N o t e that the clustering due to texture only near b = 0 has been eliminated. (Note also that u 1 and u 2 are correlated.) To predict the transformed variances after application T , an approximate formula is given in Shapiro. °°~ Using this formula and averaging over noise and position we have for our case: Var(u 11H0) ~ 1.65a~ + 0.93a~ + 0.35a 2 Var(u2tHo) ~ 1.47a 2 + 1.25a~.

(21)

Using the above procedure we get the results shown in Table 3. Here it appears that the variances in the feature space have to be much smaller than those in the previous sections to achieve a reasonable degree of accuracy. CONCLUSION Elements of Hough-like transforms have been presented along with a survey of applications. Quantitive results based on simulations have been used to illustrate transform behavior. Several areas for future transform work are indicated in Shapiro. 1291 These include adaptive or learning techniques for transforms. Acknowledgements - The simulations of the fifth section were carried out by A. Iannino, whose comments are also acknowledged. R. M. Haralick helped initiate the notions dealing with texture processing.

REFERENCES

1. M. L. Baird, An application of computer vision to automated IC chip manufacture, Proc. 3rd Int. Jnt Conf. on Pattern Recognition, Coronado, p. 3, November (1977). 2. R. Bajcsy, Computer identification of visual surfaces, Comput. Graphics Image Processing 2, 118 (1973). 3. P. Bastian and L. Dunn, Global transformations in pattern recognition of bubble chamber photographs, 1EEE Trans Comput. 20, 995, September (1971). 4. M.J. Bazin and J. W. Benoit, Off-line global approach to pattern recognition for bubble chamber pictures, IEEE Trans. Nucl. Sci. 12, 291, August (1965). 5. L. S. Davis, A survey of edge detection techniques, Comput. Graphics Image Processing 4, 248 (1975). 6. R. O. Duda and P. E. Hart, Use of the Hough transformation to detect lines and curves in pictures, Comm. ACM 15, 11, January (1972).

7. R.O. Duda and P. E. Hart, Pattern Recognition and Scene Analysis. Wiley, New York (1973). 8. S. A. Dudani and A. Luk, Locating straight-line edge segments on outdoor scenes, Proc. Conf. on Pattern Recognition and Image Processin9, Troy, New York, p. 367, June (1977). 9. R. W. Ehrich, Detection of global linear features in remote sensing data, Workshop on Pattern Recognition and Artificial Intelligence, Hyannis, p. 51, June (1976). 10. H. Freeman, Shape description via the use of critical points, Proc. Conf, on Pattern Recognition and Image ProcessinO, Troy, New York, p. 168, June (1977). 11. A. K. Griffith, Edge detection in simple scenes using a priori information, IEEE Trans. Comput. 22, 371, April (1973). 12. R. M. Haralick, K. Shanmugam and I. Dinstein, Textural features for image classification, IEEE Trans. Systems, Man, Cybern. 3, 610, November (1973). 13. P. V. C. Hough, Method and means for recognizing complex patterns, U.S. Patent 3,069,654 (1962). 14. M. H. Hueckel, An operator which locates edges in digitized pictures, J. ACM 18, 113 (1971). 15. C. Kimme, D. Ballard and J. Sklansky, Finding circles by an array of accumulators, Comm. ACM 18, 120, February (1975). 16. B. S. Lipkin and A. Rosenfeld, Picture Processing and Psychopictorics. Academic Press, New York (1970). 17. P. M. Merlin and D. J. Farber, A parallel mechanism for detecting curves in pictures, IEEE Trans. Comput. 24, 96, January (1975). 18. R. Nevatia, Locating object boundaries in textured environments, IEEE Trans. Comput. 25, 1170, November (1976). 19. D. Nitzan, A. E. Brain and R. O. Duda, The measurement and use of registered reflectance and range data in scene analysis, SRI Artificial Intelligence Center Technical Note 128, April (1976). 20. F. O'Gorman and M. B. Clowes, Finding picture edges through collinearity of feature points, Proc. 3rd Int. Conf. on Artificial Intelligence, p. 543 (1973). 21. T. Pavlidis, A review of algorithms for shape analysis, Tech. Report 218, Computer Science Laboratory, Princeton Univ., September (1976). 22. W. A. Perkins and T. O. Binford, A corner finder for visual feedback, d. Comput. Graphics Image Processing 2, 355, December (1973). 23. W. A. Perkins, Multilevel recognition system, General Motors Research Publication, GMR-2125, April (1976). 24. E. Riseman and M. A. Arbib, Computational techniques in the visual segmentation of static scenes, Comput. Graphics Image Processin9 6, 221, June (1977). 25. A. Rosenfeld, Picture Processing by Computer. Academic Press, New York (1969). 26. A. Rosenfeld and A. C. Kak, Digital Picture Processing. Academic Press, New York (1976). 27. S. D. Shapiro, Detection of curves in noisy pictures using clustering, Proc. 2nd Int. Jnt Conf. on Pattern Recognition, Copenhagen, p. 317, August (1974). 28. S. D. Shapiro, Transformations for the computer de-

Table 3. Texture transformation O'2~

O'~

2 0"~,

0.001 0.005 0.01 0.05 0.1 1.0

0.001 0.005 0.01 0.05 0.1 1.0

0.001 0.005 0.01 0.05 0.1 1.0

0.2Ul

0.2Ul

0.2u2

0.~2

(simulated)

(expected)

(simulated)

(expected)

0.00277 0.0128 0.02336 0.07165 0.100412 0.1971882

0.00293 0.01465 0.0293 0.1465 0.29 2.93

0.00288 0.01688 0.03269 0.08393 0.108188 0.19004

0.00272 0.0136 0.0272 0.136 0.27 2.7

Feature space transforms for curve detection tection of curves in noisy pictures, Comput. Graphics Image Processing 4, 328 (1975). 29. S. D. Shapiro, Aspects of transform method for curve detection, Proc. of the Jnt Workshop on Pattern Recognition and Artificial Intelligence, Hyannis, p. 90, June (1976). 30. S. D. Shapiro, An extension of the transform method of

143

curve detection for textured image data, Proc. 3rd Int. Conf. on Pattern Recognition, Coronado, p. 205, Novenaber, 1976 (a modified version to appear in IEEE Trans. Cornput.) (1978). 31. H. Wechsler and J. Sklansky, Automatic detection of ribs in chest radiographs, Univ. of California at lrvine, Tech. Rep. TP-75-1, February (1975).

About the Author STEPHEND. SHAPIROreceived the Ph.D. degree in Electrical Engineering from Columbia University, New York, N.Y. in 1967 under an NDEA fellowship in digital systems. He was a member of the technical staff at Bell Labs since 1967 engaged in computer algorithm development for image processing. He is currently an Associate Professor in the Electrical Engineering Department at Stevens Institute, Hoboken, N.J., specializing in the software aspects of Computer Science. He is consulting Director of a major in-house Computer Science education program for senior technical staff at Bell Labs. He is co-editor of the Newsletter and member of the Executive Committee of the Machine Intelligence and Pattern Analysis Technical Committee of the IEEE Computer Society. His research interests are image processing and software engineering.