Wavelet based corner detection

Wavelet based corner detection

0031 3203/93 $6.00 +.00 Pergamon Press Ltd © 1993 Pattern Recognition Society Pattern Reco~lnition, Vol. 26, No. 6, pp. 853 865, 1993 Printed in Grea...

818KB Sizes 5 Downloads 113 Views

0031 3203/93 $6.00 +.00 Pergamon Press Ltd © 1993 Pattern Recognition Society

Pattern Reco~lnition, Vol. 26, No. 6, pp. 853 865, 1993 Printed in Great Britain

WAVELET BASED CORNER DETECTION JIANN-SHu LEE,t YUNG-NIENSUN,~,§ CHIN-HSINGCHENt and CHING-TSORNGTSAIt t Department of Electrical Engineering,National Cheng Kung University,Tainan, 70101, Taiwan, R.O.C. :~Institute of Information Engineering, National Cheng Kung University, Tainan, 70101, Taiwan, R.O.C. (Received 19 August 1992; received for publication 9 December 1992) Abstract--A non-parametric algorithm for detecting and locating corners of planar curves is proposed. The algorithm is based on the multiscale wavelet transform of the orientation of the curve which can effectively utilize both the information of local extrema positions and magnitudes of the transform results. The corner candidates can then be selected easily based on this information. According to the angle preserving concept, intrinsic ratios of several corner models have been derived and used to evaluate the corner candidates. The corner angles can also be obtained during these processes. To make the evaluation process robust a masking algorithm is proposed. Experiments depict that our detector is more effectivethan the single scale corner detectors, while is more efficientthan the multiscale corner detector by Rattarangsi and Chin (Proc. Int. Conf. Pattern Recognition, pp. 923-930 (1990)).

Wavelet transform Masking algorithm

Corner detection

Multiscale

I. INTRODUCTION Corners are very useful features in scene analysis,(1) shape analysis and pattern recognition.(2'3) In scene analysis, the presence of a corner is usually an indication of man-made features, e.g. a road intersection, a house or a cultivated field. For shape analysis, corners serve to simplify the analysis of shapes by drastically reducing the amount of data to be processed. If the boundary is piecewise linear, the indications of cornerpoints on the boundary are usually sufficient for shape recognition. Corner detection algorithms can be categorized as either gray-level based or boundary based. (4- t 1) Many gray-level based corner detectors have been reported in the literatureJ ~2-1~) However, the boundary based corner detectors are commonly required because they are easy to implement and have been successfully used in many computer vision systems. The main shortcoming of these algorithms is that they work well only when the features of the object are of similar size and the size information is known a priori. The size information is required as the input parameters to these algorithms. However, since the object in question is assumed unknown, the acquisition of the size information usually relies on trial-and-error procedures. In addition, corners on planar curves have their corresponding regions of support that may be quite different in size. Hence, it is not possible to define an optimal resolution in advance for detecting corners. Consequently, traditional single-scale corner detection algorithms tend to detect unwanted corners or miss obvious corners in some situations. It implies that corners should be detected based on the integrated

§Author to whom all correspondence should be addressed. 853

Intrinsic ratios

Extremaline patterns

information at multiple scales instead of the information at a single scale. Asada and Brady proposed the curvature primal sketch to represent the changes in boundary curvature.t 1al The primal sketch consists of various symbolic descriptions at multiple scales, such as corners, knots and ends, and is generated by convolving different size Gaussian windows with the curvature and tracking the locations of curvature discontinuities. Boundary symbolic features are detected at a different scale individually based on the a priori knowledge for extracting features at the corresponding best scales. The resulting representation is a multiple-scale interpretation of the boundary; however, the detection of an individual symbolic feature is still based on the signal at a single scale. As to Rattarangsi and Chin,t191 they proposed a new algorithm that detects corners by integrating information obtained at multiple scales. In their algorithm, the scale spaces of isolated single and double corners are first analyzed to investigate the behavior of the scale space. The so-called scale space consists of the local extrema of the differentiation of the boundary function presented at all scales. Next, the scale space is transformed into a tree. Finally, a multiple-scale corner detection scheme is developed using a coarse-to-fine tree parsing technique. However, since many scales are required in the algorithm, it is time consuming. In addition, some false corners are detected (e.g. corners on a circle). This is because the algorithm detects corners only based on the locations of the local extrema while the other significant clue, i.e. magnitude is neglected. We believe that the above shortcomings will be overcome, if the multiscale information of magnitudes and locations of the local extrema are suitably integrated. This is also the motivation of this paper. In this paper, the magnitude and the position infor-

J.-S. LEE et al.

854

mation is integrated by using the wavelet transform, because the wavelet transform possesses some properties which are very suitable for corner detection. In our algorithm, the local extrema positions are applied to detect corner candidates. The magnitude behaviors of corners at different scales are used to verify the candidates. Since both the properties of locations and magnitudes are employed, our algorithm can detect corners effectively and efficiently. Moreover, the additional information for the corner angle is also given by our algorithm. In Section 2, the relationship between the wavelet transform and corner detection is discussed. Some indicators of corners are derived in Section 3. These indicators are effective for corner detection and efficient in computation. In Section 4, the proposed corner detection procedure is described, Experimental results are presented in Section 5. Finally, Section 6 gives the conclusion of this paper.

function

f(x)

at the scale 2~ is

W~f(x)= f *~il(x) = f * ( 2 i ~ ) ( x ) = 2ikd~(f *Ok)(x) where i = I or 2 and • denotes convolution. In fact, the zero crossings of W~f(x) and the extrema of Wtf(x) are consistent in some measurements. The zero crossings of W2f(x) correspond to the local extrema of W~f(x), thus the detection procedures of zero crossings and local extrema are equivalent in some sense. However, a zero-crossing point of WZf(x) can either be a maximum or a minimum of IW~f(x)l, The maxima of IW~f(x) l indicate sharp variation points of f , 0k(x) whereas the minima correspond to slow variations. These two types of variations can be distinguished by examining whether lW~f(x)l is a maximum or a minimum but it is much harder to distinguish them by using the zero crossings of W2f(x). In order to detect sharp variation points, we choose the wavelet function t//(x) = ~pl(x) in this paper.

2. WAVELET T R A N S F O R M AND C O R N E R DETECTION

Wavelets are families of basis functions generated by dilations and translations of a basic wavelet function if(x). The wavelet transform of a function f(x) at the scale ll is the convolution off(x) with (1/k)¢(x/k). This transform is a linear operation that decomposes a signal into components appearing at different scales. Such a decomposition is very useful and has been studied in signal processing ~2°'2~ and computer vision/22) It has also been reformalized in mathematics recently. For a thorough presentation, the reader is referred to general reviews ~23'24) and the functional analysis book by Meyer. (25) An important issue in multiscale analysis is to relate the local properties of the signal to the evolution of wavelet transform values when the scale varies. The wavelet theory states that this evolution across scales can characterize the local Lipschitz regularity of the input signal. For some particular wavelet functions, the extrema of the wavelet transform correspond to the sharper variation points of the signal. Thus, the wavelet transform cannot only detect the signal's sharper variations but also characterize their local shapes. Corners of a planar curve correspond to the abrupt changes of the tangential orientation of the curve. Hence, it is intuitive that the wavelet transform is a suitable candidate for locating and identifying corners. Let O(x) be a smoothing function, The Gaussian function is an example commonly used in computer vision and is also adopted here. Let ipa(x) be the first-order derivative of O(x) ~X(x)

d0(x) =

-

Ok(x)= 2

C = { P i = (xi, y~),i = 1 . . . . , n}

where Pi+, is the successor of Pi. The Freeman chain code of C consists of the n vectors and is given by

Ci=Pi_lPi, i=1,2 .... ,n of which stands for an angle 0: with

each the X-axis; that is

Os=4f,

respect to

for f = 0 . . . . . 7.

Since the resolution of 0s is only rt/4, the quantization error is inevitable. In order to reduce the effect of quantization and smooth out local fluctuation, we define the orientation function 4~(/) as

Yl-q

(1)

Xi+ q -- Xi_q"

O(x)

O2(x) = d20(x) dx 2 Let

In this section, we will consider the isolated Single, Double and Triple models to investigate the properties of multiscale wavelet transform. In principle, a corner is affected by all its neighboring corners during the wavelet transformation. To simplify the analysis, the multiscale behavior of a corner is assumed to be influenced by its immediate neighbors only. Other corners further away from it produce negligible effects. Experiments show that this assumption is reasonable. Here, a planar curve is given in the orientation space representation such that the tangential angle at every point along the curve is given with respect to its arc length. Let a sequence of n integer-coordinate points describe a closed contour C

~b(i) = t a n - 1 Yi+q- -

-

dx

and ~,2(x) the second-order derivative of

3. MULTISCALE WAVELET T R A N S F O R M S O F C O R N E R S

k0(2-kX). The wavelet transform of a

The parameter q is called the smoothing level whose value is generally chosen to be two or three. In our experiments, q was chosen to be three. When a corner is smoothed by equation (1), its variation interval becomes a constant d = 2q + 1 in the orientation space

Wavelet based corner detection

855

/,

and this variation profile can be approximated well by a ramp function.

(m)

3.1. T h e analysis o f the Single, Double and Triple models Case A. T h e Single model. Figure l(a) shows a single corner whose corner angle is 4>. Figures l(b) and (c) show the ideal model and the smoothed model in the orientation space, respectively, where s denotes arc length along the contour. The smoothed model is defined by

4~(s)=

t

c

if - d / 2 > s

c+((p/d)(s+d/2)

if-d/2
I,c + 4~

if

d/2 < s

The wavelet transform of q~(s) is given by

(b)

s+d/2

Wkd~(s)=(1/~/(2rOa)(c~/d)

~

exp(--t2/22k+10.Z)dt.

s-d/2

(2) Differentiating equation (2) with respect to s, we can find a local maximum of Wk4)(s) exists at s = 0 and the maximum position is independent of the corner angle 4~and the scale parameter k. That is, this local maximum will produce a vertical line in the scale space. The corresponding wavelet transform value at the corner position (i.e. s = 0) is d/2

WkO(O)=(1/x/(2~)o.)(4)/d)

~ exp(--t2/22k+10.2)dt.

-d/2

0

d/2

(c)

Fig. 1. (a) A single corner; (b) the ideal model in the orientation space; (c) the smoothed model in the orientation space.

- d/2

(3) The Taylor expansion of exp(-t2/22k+10. 2) about the origin gives exp ( - t2/22k + i o.2) = 1 - t2/22k + 10.2 + R(t) 1 -- t2/22k+lt72.

Substituting this equation into equation (3), we obtain WkC~(O) = (qS/X/(2rc)0.)(1 _ d2/24 . 22k.0.2).

The above equation can be rewritten as dp = x/(2n)aWkd~(O)/(1 - d2/Z4.22k.o.2).

(4)

For an isolated real corner, its angular value will preserve for different scales. Hence, we can obtain 4) = x/(2n)0. Wk+ 1/2~b(0)/(1 -- d2/24" 22k+ 1.0.2). (5) It is noted that in this paper, the scales are separated by one octave, i.e. the scale parameter k = 0, 1/2, 1. . . . . Dividing equation (5) by equation (4), we obtain SRk = [ W k + ~/2~(0)(1 - d2/24 .22k.o.2)]/

[Wkq~(0)(1 -- d2/24"22k+l"0.2)] = 1.

(6)

Since the above ratio S R k (k = 0, 1/2, 1,...) is independent of the corner angle, it can be adopted as an indicator for the single corner. Hence, we can verify the existence of a corner based on the invariant unity S R k at different scales. Meanwhile, this concept can also be generalized for the detection of multiple corners. The model properties are summarized in Property 1. P r o p e r t y 1. A single corner has a single straight and persistent extrema line in the scale space which is independent of ~b and k. The multiscale wavelet transform magnitudes at corner position satisfy the unity SRk. Case B. T h e Double model. The Double model consists of two corners. According to the signs of the two corners, it can be classified to End type and Stair type. Case B.1. T h e End type model. The End type model consists of two corners, whose angle changes are with the same signs and separated by a width of a, as shown in Fig. 2(a). The profiles of the End type model in the orientation space are sketched in Figs 2(b) and (c). The corresponding definition of Fig. 2(c) is

C

l

c + (4),/d)[s + (a + d)/2]

4~(s) =

c + 4),

c + 4)x - (4a2/d)[s - (a - d)/2]

c+4~ -

if - ( a + d)/2 > s if - ( a + d)/2 < s < - ( a - d)/2 if - ( a - d)/2 < s < (a - d)/2 if (a - d)/2 < s < (a + d)/2 if (a + d)/2 < s

J.-S. LEE et al.

856

-a+d/2

X

\

~ -a

exp(-t2/22k+1t72)dt+(q~l/d) d/2

× a/2 ~ exp(--t2/22k+ltr2)dt

(8)

1

--d/2

(a)

and

Wkq~(a/2 ) = (1/x/(2rc)cr)I(c)2/d) d/2

× ~ exp(--t2/22k+ltr2)dt+(qSl/d) - d/2

x

ml

a+d/2 ~

exp(--t2/22k+la2)dt

1

.

(9)

a-d~2

v~--s 0

To simplify the mathematical expression, we let

1~2

d/2

(b)

IT~=(1/d)

~ exp(--t2/22k+ltr2)dt d/2

and a+d/2

OTk=(1/d)

S exp( -t2/22k+ltr2)dt. a d/2

Substituting ITk and OTk into equations (8) and (9), we obtain

-(a'*'d)/2

-(a-d)/2

Wk~) (--a/2) = (1/x/(2rOa)(qS,ITk + (920Tk)

(10)

Wk~(a/2 ) = (1/x/(27z)a)(~,OT k + ~2ITk).

(11)

and

0 1a-,¢I)/2 la÷d)/") (c)

Fig. 2. (a) An End type corner; (b) the ideal End model in the orientation space; (c) the smoothed End model in the orientation space.

Equations (10) and (11) are two equations ofq~, and ~b2. Since the determinant value

ITkOTk = I T 2 - O T 2 ~ 0 O T d Tk

we can solve equations (10) and (11) simultaneously by applying the Cramer rule and get a unique solution

The wavelet transform of ~b(s) is given by

Wk~p(s) = ( l/x/(2n)a)[ (~b2/d)

tkl = x/(2n)tr(Wk~b(- a/2)lTk

s - (a - d)/2

×

I

- Wkd?(a/2)OTk)/(IT 2 - OT2)

exp ( - t2/22k + 1 a2) dt + (q51/d)

I

(12)

and

s - (a + d)l 2 s+(a+d)/2

×

Vk a n d a

exp(--t2/2

2k+

1o-2) dt 1.

~P2 = x/(2g)a(WkC~(a/2)ITk

(7)

s + (a - a)/2

Figure 3(a) shows the profiles of equation (7) for ~b, = (~2, a = 10 and k = 0, 1/2, 1 and 3/2. We find the two local extrema gradually move towards each other when k increases and then combine to a single one. The case of ~b, :~ q52 is shown in Fig. 3(b) which is similar to Fig. 3(a) but the extremum of the weak corner disappears after some scale. The above phenomena will occur earlier (i.e. at smaller scales) if a decreases. O n the contrary, if a increases then the above phenomena will occur later (i.e. at larger scales). The general forms of the wavelet transform magnitudes at the corner positions (i.e. s = - a/2 and s = a/2) are

WkC~(--a/2)=(1/x/(2g)~)[(~2/d)

-- WkC~(--a/2)OTk)/(IT 2 -- OT2).

(13)

According to the angle preserving property, we can obtain q51 = x/(2~)~r(Wk + 1/2#b(--a/2)lTk+ 1/2 -- Wk +

,/2c~(a/2)OTk +1/2)/(17"2+ ,/2 -- 0 T2+ 1/2) (14)

and ~b2 = x/(2~)a(Wk + ,/2 #P(a/2)ITk + ,/2 -- W k + 1/2~b(- - a / 2 ) O T k

+ 1/2)/(IT2+

1/2 --

OT2+

1/2). (15)

Dividing equation (14) by equation (12) and dividing equation (15) by equation (13) we can obtain

Wavelet based corner detection

857

[(W,~ + ~/2 ~b(-at2)ITk+ 112- WE+ ,i2(#(af2)OTk+ ,i2)(I T~ -- OT~) ] I [(Wkq~(--a/2)ITk -- Wkdp(a/2)OTk)(IT2+ 1/2 - -

1/2)] =

aT2+

1

and

[ (Wk + li2dP(al2)l Tk + ,i2 -- Wk + xi2dP(--al2)OTk + li2)(t T~ - OT~) ]I

[ (WJ)(al2)lTk -- Wkd~(- aI2)OT,)(IT2+ ,i2 - OT2+ ,/2)] = 1.

Since the above two ratios are both independent of corner angles, they can be adopted as indicators for the End type corner and we call them the End Ratio denoted as ER k (k = 0, 1/2 .... ).

The wavelet transform of ~b(s) is given by

WEq$(S)= (1/\/(27t)0.)[ (4bxld) s+(a+d)12

Property 2. For the End type model, its corresponding two extrema have the same signs and the location of the two extrema get close to each other as the scale increases. If 4~1 = #$2 then the two extrema will merge to a single one after some scale. If ~b~ ~ 4~2 then the extremum of the weak corner will disappear after some scale and the other extremum persists continuously. The multiscale wavelet transform magnitudes at the two corner positions satisfy unity ER k.

Case B.2. The Stair type model. The Stair type model is like the End type model except that the changes in the corner angles are of opposite signs, as shown in Fig. 4(a). Its corresponding profiles in the orientation space are shown in Figs 4(b) and (c). The definition of Fig. 4(c) is

×

exp ( - t2/22k + 1o.2) dt - (~21d)

I s + (a - d)/;2 s

(a-dt/2

exp(-t2122k+10.2)dt 1.

(16)

s - (a + d)/2

Figure 5(a) shows the profiles of equation (16) for ~b1 = ~b2, a = 10 and k = 0, 1/2, 1 and 3/2. We find the two local extrema gradually move away from each other as k increases. The case of ~bx # ~b2 is shown in Fig. 5(b) which is similar to Fig. 5(a) but the extremum of the weak corner moves faster than the stronger one. The above phenomena will occur earlier (i.e. at smaller scales) if a decreases. O n the contrary, if a increases then the above phenomena will occur later (i,e. at larger scales). The general forms of the wavelet transform

if -(a + d)/2 > s if -(a + d)/2 < s < -(a - d)/2 ,#(s) =

f i + (q~xld)Es + (a + d)t2] + ¢~ + dpl + (dP21d)[s - (a - d)/2]

if -(a - d)/2 < s < (a - d)/2

(a - d)/2 < s < (a + d)/2 (a + d)/2 < s

if if

14

%

3o

(a)

12

-

10

-

$

-

°.

:

25

-

20

-

15

-

°

.

: v

%

6

..'/

.:

:'l

~."

10 -

4 --

:1

2. -0 -50

(b)

°- -.

I -40 -30

-20 -10

i" 0 I

10 20

5 -

1

I

I

30

40

50

I I -50 -40 -30

o

.../; l A . - 2 0 -10

;t l

0

1o

20

I

I

I

30

40

50

I

Fig. 3. The profiles of equation (7) for (a) (~2=(~1; (b) q~2=2~1; a=10; - , k = 0 ; - - - , - . - , k = 1; .... , k = 3/2.

k=0.5;

858

J.-S. LEE et al.

5 -~ (a)

I"

3

.

-

2 1

0

%

(a)

-1

/ -

. • ..

-2

."

/



."



¢0) --4

-5

L,

25

I

-11/2

I I I -50-40-30-20-to

0

20

(b)

15

5

I 0

I ]0

I 20

I 30

I 40

1

I

I 50

(b) -

_

10

I

.;/" o"/

' I

S " -""/; ..'/

'*,° .° i ". ~. °°.

!

0 -5

I

I

I

-(a+d)/2 -(a-d)/2

I

I I I I -50 -40 -30 -20 -tO

I ~'"1 0 I0

1

20

30 40

I

50

~"

(1<1)/2 (a+d)/2

Fig. 5. The profiles of equation (16) for (a) q~t = q~2;(b) $2 = 2~bl; a = 10; - - , k = 0; - - , k = 0.5; - . - , k = l; .... , k = 3/2.

{c)

Fig. 4. (a) A Stair type corner; (b) the ideal Stair model in the orientation space; (c) the smoothed Stair model in the orientation space. m a g n i t u d e s at the c o r n e r p o s i t i o n s (i.e. s = - a / 2 a/2) are Wkcp(-a/2 ) = (1/x/(2g)a)(ckllT k - O20Tk)

and

the Stair type m o d e l also. Hence, we c a n t a k e the E R k as i n d i c a t o r s for the d o u b l e corner.

(17)

Property 3. F o r the Stair type model, its c o r r e s p o n d i n g t w o e x t r e m a h a v e o p p o s i t e signs a n d the l o c a t i o n of the t w o e x t r e m a g r a d u a l l y m o v e a w a y f r o m e a c h o t h e r as the scale increases. T h e multiscale wavelet t r a n s f o r m m a g n i t u d e s at the t w o c o r n e r p o s i t i o n s satisfy unity E R k.

and Wkdp(a/2)=(1/~/(2g)a)(ck,OTk--

$21Tk).

(18)

Let ~b~ = - ~P2, t h e n e q u a t i o n s (17) a n d (18) c a n be rew r i t t e n as WkO ( - a / 2 ) = (1/x/(2g)a)(&, I T k + ok'20Tk) and Wup(a/2) = (1/x/(2zr)a)(~, OTk + dP'2lTk) w h o s e f o r m s are the s a m e as e q u a t i o n s (10) a n d (11). T h i s m e a n s the E R k c a n be a d o p t e d as i n d i c a t o r s for

¢(s) =

Case C. T h e Triple model. Let us c o n s i d e r a n o t h e r c o r n e r m o d e l , w h i c h consists of t h r e e corners. F i g u r e 6(a) s h o w s o n e type of this m o d e l a n d the following d e r i v a t i o n is b a s e d o n this type. T h e c o r r e s p o n d i n g profiles in t h e o r i e n t a t i o n space are s h o w n in Figs 6(b) a n d (c). T h e s m o o t h e d o r i e n t a t i o n f u n c t i o n of this type is defined by

¢

if - ( a 1 + d/2) > s

c + (chl/d)(s + al + d/2)

if - ( a I + d/2) < s < - ( a l - d/2)

c + ck~

if - (a 1 - d/2) < s < - d/2

C "~ ~1 "~ (O2/d)( s + d/2)

if - d / 2 < s < d/2

e+Ol+q~2

if

d/2 < s < (a 2 - d/2)

C +dp 1 + alp2 -- (q)3/d)(s -- a2 + d/2)

if

(a2 - d/2) < s < (a2 + d/2)

c-t- ¢ 1 + ~ 2 - ~ ) 3

if

(a 2 + d/2) < s

Wavelet based corner detection the Double model, we can obtain

The wavelet transform of qg(s) is given by

(31k'O~+1/2)/(t$1k+l/2"(~k)

Wk~(s) = (1/x/(2x)0-)[(ga,/d) s+al +d/2

X

S

exp( -t2/22k+ 10-2)d t + ((~2/d)

× ~ exp(-t2/22k+t0-2)dt-(dP3/d) -]

exp(--t2/22k+10-2)dtJ.

~

(22)

(52k'fk+ 1/2)/(32k+1/2"6k) = 1

(23)

(63k'6k + 1/2)/(63k + 1/2" (~k) =

(24)

6k =

s a2-d/2

Since we assume the wavelet transform of a corner is only affected by its immediate neighboring corners, the general forms of the wavelet transform magnitudes at the corner positions (i.e. s = - a l , 0 and a 2 ) a r e approximated to

IT k OWl k 0 OT1 k IT k OT2k 0 OT2 k IT k OTlk

31 k = (x/(En)a)

IT~

w~¢(a~)

OT2k

o

d/2

~ exp ( - t2/2 2k+' a 2) dt + (~a2/d)

and

-d/2 -al ~ +d/2 e x p ( - - t 2 / 2 2 k + l o 2 ) d t -at d/2

1

0

OT2k

0 Wk4~(-aO OT2k w~4~(o) w~ch(a~) tT,

OTlk

Wk~( --a, ) = (1/x/(27r)~)I(~b,/d)

X

Wkq~(O)

IT~ 32 k =(x/(2n)a)

x

1

where k = O, 1/2, 1.... and

s d/2 s a2 +d/2

= 1

and

s+a~ d12 s+d/2

X

859

53k=(X/(2n)o) (19)

IT~ OTlk 0

OTlk ITk OT2k

Wkc~(--a,) WkgP(O) WkC~(a2)

Although the above ratios are derived based on this specific type, they hold for every type of this model.

Wkq~(O) = (1/x/(2rO0-)[(dPl/d) at +d/2

~ exp(-t2/22k+lff2)dt+(¢2/d)

X

al -d/2 d/2

/

~ exp(-t2/22k+tff2)dt-(~3/d)

x

d/2

X -a2+d/2 ~ exp (

-

-

t2/22k + 10.2) dt

1

(20)

(a)

-a2-d/2

and

Wk~(a2) = (1/x/(2u)0-)[ ((o2/d)

1

-a2+d/2

X

~

exp(-t2/22k+lo2)dt-(~3/d)

__l I

I

-a2-d/2 a/2

-al

]

X ~ exp(--tz/22k+10-2)dt.

(21)

a2 (b)

-d/2 al + d/2

Let OT1 k = ( l / d ) -a2+d/2

(l/d)

~

~

exp(--t2/22k+la2)dt, OT2 k =

al -d/2

exp(-t2/22k+10-2)dtand~'3 = - 4~3 then

-a2 d/2

equations (19) (21) can be rewritten as

(~/(2rt)a)Wk~(-a 0 = ITkC~, + OTlkC~2

(~/(2n)a)Wkq~(O) = OTlkc~, + ITkd)2 + OT2kC~'3 and (~/(2~)a) Wkt~(a2) = O T2k O2 + I Tk O'3. By using the same reasoning procedure described in

41-d/2 41 ÷(:1/2

-d/20 d/2

a2-dt2 a2÷d/2

(c)

Fig. 6. (a) A Triple type corner; (b) the ideal model in the orientation space; (c) the smoothed model in the orientation space.

J.-S. LEE et al.

860

Hence, these ratios, equations (22)-(24), can be adopted as indicators for the Triple model and we call them the Triple Ratios denoted as TRy. The higher order models can also be analyzed by applying the same procedure.

candidate, respectively. The definition can eliminate all interference coming from the neighboring corners and enables the corner candidate to be evaluated by using the Single model.

3.2. The Masking Algorithm Although the ERk can serve as indicators for the Double model, its effect is limited. For a double corner candidate, if its ERk are not consistent with the Double model then we can only decide that it is not a double corner and cannot further point out which candidate is a false corner by observing these ratios. This is because the two candidates are evaluated simultaneously not individually.This problem also exists in the evaluation of the Triple and the High Order models. In order to compensate this weakness and deal with the high order models, the Masking Algorithm (MA) is proposed. When a corner has been smoothed by (1) its variation interval is a constant d in the orientation space. Hence, it is possible to design suitable masks to make corner candidates be evaluated independently. In this paper, the masked orientation function q~m(S)is defined by

I~)m(S) =

f ~ ( t 1+d/2) ~(S) ~ t ~ ( t 2 - - d/2)

if t l + d / 2 > s if t l + d/2 < s < t2 - d/2 if t 2 - - d/2 < s

where t 1 and t 2 are the positions of the nearest left and right corner candidates of the presently tested corner

4. C O R N E R

DETECTION

The proposed algorithm that detects corners in a contour is described as follows:

Step 1. Acquiring four scales wavelet transform of orientation The bounding contour of a shape is extracted by using an edge detector and followed by a boundary tracking algorithm. According to the definition in (1) we can acquire the smoothed orientation function of this contour, ~b(s). Convolving ~b(s) with the wavelet function Ok(S) at four different scales (k = 0, 1/2, 1 and 3/2 and a = 2). The results, WkCb(s),are stored in four one-dimensional arrays.

Step 2. Detecting corner candidates Searching the locations of local positive maxima and local negative minima of Wk~b(s). Since the scale is discrete, a matching process is required to determine cross-scale correspondences of extrema. Subsequentially, the cross-scale corresponding extrema are linked to generate extrema lines (e.g. Fig. 7(b)). In the extrema

45

.I'I(_ I

6

(a)

$ 918

11121314

15S17

(b)

3

2

1

5

$

? o

(c)

I 0 [1

14

(d)

Fig. 7. (a) The first test contour; (b) the extrema line patterns; (c) the corner candidates;(d) detected corners.

1819

Wavelet based corner detection lines, part of them correspond to corners and the other correspond to false corners (e.g. arcs) and noise. In the following step, we will explain how we distinguish them in detail. Once the extrema lines generated by corners are detected, the corresponding corner positions can be obtained readily. Here we assume that the roots of the extrema lines stand for the real locations of corners. The assumption is reasonable, because generally the support of the finest scale wavelet function is small compared with the corner distance. For the detection of corners, a stability criterion similar to the one in reference (26) is used to select corners among all the extrema lines. Stability of a corner is defined as the persistence of its corresponding local extremum. This agrees with Marr and Hildreth t27~ in their edge detection theory in which they state that edges that coincide with each other over several scales are physically significant. To detect corners, we define a corner candidate to be an extrema line which persists at least for two consecutive scales (i.e. k = 0 and 1/2). Among the corner candidates some of them are generated by noise. To promote the evaluating efficiency, as many as possible of these noisy candidates should be deleted. In the general case, the wavelet transform magnitude of noise is far smaller than that of a corner at the finest scale. Hence, we can select a threshold value to remove most noisy candidates. It is noted that the threshold value depends on the smallest corner angle we want to detect. According to the arrangement of the corner candidates, we can group the candidates into the Single, Double, Triple and High Order types. In this grouping process, if the distance between two candidates is larger than 3a m then they are viewed as independent candidates, where o"m is the standard deviation of the Gaussian function 03/2(S ).

861

consistent with the Triple model. If the test is successful, it is viewed as a triple corner. Otherwise, the MA is applied to evaluate its three components individually. D. High order corner candidate. A high order corner candidate can be evaluated similar to a triple corner candidate except that the TRk are replaced by its corresponding intrinsic ratios. 5. EXPERIMENTALRESULTS In this section, we show some experimental results using our corner detector. Two contours are used to test the performance of our detector. In order to show that the proposed algorithm is reliable even for a noisy boundary, the boundaries of both contours are made rough on purpose. In addition, a n u m b e r of other corner detectors are selected and applied to the same set of test images for comparison. Figures 7(a) and 9(a) show the two test contours. Figures 7(b) and 9(b) show their corresponding extrema line patterns and the candidates are labeled in order. The contour position of each candidate is marked by a "." in Figs 7(c) and 9(c). Tables 1 and 3 show the evaluation results of the candidates in Figs 7(c) and 9(c), respectively. Since the ratios at the finest scale are sensitive to noise, only the ratios at the two higher scales are adopted. The tolerance value of each ratio is 0.1 at either k = 1/2 or 1. The detected corners are shown in Figs 7(d) and 9(d). Tables 2 and 4 show the

Step 3. Evaluating corner candidates In this step, we will evaluate the candidates sequentially. Each candidate is evaluated by one of the following strategies which depends on its corner type. A. Single corner candidate. For a single corner candidate, two tests are performed. First, we check whether its corresponding extrema line is straight. Next, we check whether its SR k are consistent with the Single model. It is adopted as a single corner, if both tests are successful. Otherwise, it is regarded as a false corner. B. Double corner candidate. A double corner candidate can be further classified to End type or Stair type by observing the signs of its two extrema. After the type being decided, we can evaluate the candidate by checking whether the behaviors of its two extrema lines and the values of its ERk coincide with its corresponding corner model. If the two tests are both successful, the candidate is denoted as a double corner. Otherwise, the MA is applied to evaluate its two components individually. C. Triple corner candidate. To evaluate a triple corner candidate, we only check whether its TRk are

(a)

(b)

A (c)

(d)

Fig. 8. Corners detected by using other algorithms for (a) Rosenfeld-Johnston;(b) Rosenfeld-Weszka; (c) FreemanDavis; (d) Beus-Tiu.

862

J.-S. LEE et al.

t't'ItI 1

~

3

4

5

7

6

(a) 7

5 4

9

le

111~.13

14

1~16

1718

(b) Z

7

5

4

2

17

I

11

15

16

(c)

(d)

Fig. 9. (a) The second test contour; (b) the extrema line patterns; (c) the corner candidates; (d) detected corners.

Table 1. The evaluating results of Fig. 7(c) Candidate

Type

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Ratios (k = 1/2 and 1) 0.69 0.92 0.93 0.93 0.62 0.91 1.05 0.95 1.05 1.03 1.06 1.03 1.02 0.92 1.05 1.09 1.05 0.95 0.98

Stair Single End Single Single Triple

High order

Triple Stair

0.68 0.95 0.98 0.97 0.76 0.94 1.02 0.93 1.05 0.98 1.02 0.99 1.06 0.97 1.04 1.08 1.02 1.00 1.02

Result false corner true corner true corner true corner hlse corner true corner true corner true corner true corner true corner true corner true corner true corner true corner true corner true corner true corner true corner true corner

Table 2. The estimated corner angles

1

Practical angle value 19 Experimental angle value 17 Error (~) 11.0

2

145

Corner No. 8 9 10

3

4

5

6

7

20

90

50

90

85

43

87 3.3

52 4.0

85 5.6

79 7.1

47 9.3

155 18 6.9 10.0

103

72

95 78 7.8 8.3

11

12

13

14

15

16

17

90

90

55

95

85

52

90

89 1.1

89 1.1

58 5.5

99 4.2

82 3.5

59 7.7

91 1.1

Wavelet based corner detection

863

Table 3. The evaluating results of Fig. 9{c) Candidate

Type

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Single Single Single

Ratios (k = 1/2 and 1) 0.92 0.98 0.96 0.98 0.96 0.97 0.97 1.03 0.51 1.t2 0.80 1.18 0.96 0.93 l. 10 1.20 0.85 0.53

End Single Single End Single End Single Single End End

1.02 1.02 0.99 1.0l 1.00 1.01 1.02 1.04 0.39 1.30 1.30 1.21 0.99 0.99 1.25 1.25 0.90 0.60

Result true corner true corner true corner true corner true corner true corner true corner true corner false corner false corner false corner false corner true corner true corner false corner false corner false corner false corner

Table 4. The estimated corner angles Corner No. Practical angle value Experimental angle value Error (~,~)

(a)

(c)

1

2

3

4

5

6

7

8

9

35

110

110

50

60

115

115

32

90

90

32 8.6

120 9.1

120 9.1

55 10.0

65 8.3

125 8.7

120 4.4

30 6.7

91 1.1

89 1.1

(b)

(d)

Fig. 10. Corners detected by using other algorithms for: {a) Rosenfeld-Johnston; (b) Rosenfeld-Weszka; (c) FreemanDavis; (d) Beus-Tiu.

10

corner angles. The corner angle is the angle value derived at the coarsest scale k = 3/2. F o u r other corner detectors, p r o p o s e d by R o s e n f e l d - J o h n s t o n , 17t Rosenfeld-Weszka, 181 F r e e m a n - D a v i s t4~ a n d B e u s - T i u t11~ are also applied to the same test contours. These algorithms all require input p a r a m e t e r s for p r o p e r decision; the best results with optimal h u m a n a d j u s t m e n t s are s h o w n in Figs 8 a n d 10. Since these four corner detectors are single-resolution processing algorithms, therefore either some undesired details are detected or some desired corners are lost. This is because the decision of these algorithms relies only on the information at one single scale. O n the contrary, o u r detecting a l g o r i t h m detects corners by evaluating the intrinsic ratios implied in the multiscale wavelet t r a n s f o r m m a g n i t u d e s of corners, all real corners are correctly detected without any mis- or over-detection. Figure 1 l(a) shows a synthetic c o n t o u r which is used to d e m o n s t r a t e the detection limitation of the D o u b l e corner in o u r algorithm. Figure l l(b) shows its c o r r e s p o n d i n g extrema line patterns a n d the corner candidates are labeled in order. The c o n t o u r position of each candidate is m a r k e d by a "." in Fig. 1 l(c). The detected corners are s h o w n in Fig. 1 l(d). The a b o v e results show t h a t a Stair type

864

J.-S. LEE et al.

II t I 12

(a)

56

9! 8

lZ

13

la

15

(b)

6 8-

11

TT

6 ~5

74

~3

9t10 11

1z~1, 13

t5

9"

141Z

13

11

(c)

(d)

Fig. 11. (a) A synthetic contour; (b) the extrema line patterns; (c) the corner candidates; (d) detected corners.

corner is neglected by our algorithm when the corner distance is less than 5, e.g. the corner candidates 9 and 10. An End type corner is viewed as a single corner in our algorithm when the corner distance is less than 5, e.g. the corner candidate 13. 6. CONCLUSION In this paper, we propose a non-parametric corner detecting algorithm based on the multiscale wavelet transform. F o u r scales wavelet transform of the orientation of the contour was first obtained. Next, the extrema line patterns were constructed. Those extrema lines persisting for more than two scales are regarded as corner candidates. Most of the false corner candidates caused by noise were filtered out by using a thresholding process. The models for Single, Double and Triple corners were defined; some intrinsic ratios of these models have been derived and used to evaluate these corner candidates. The proposed evaluation processes are simple and efficient in computation, and the corner angles can also be obtained during these processes. Experiments on two test patterns are conducted. The experimental results have shown that our detector is more effective than those single scale corner detectors because our detector is multiscale based. Meanwhile, our detector is also more efficient than the multiscale corner detector proposed by Rattarangsi and Chin (19) because our detector requires only four scales wavelet transform and the evaluating process is also simpler. The above-mentioned advantages mainly resulted from the combination of both information of the local ex-

trema positions and the wavelet transform magnitudes. It is quite consistent with our anticipation.

REFERENCES

1. A. Huertas, Corner detection for finding buildings in aerial images, USCIPI Report 1050, University of South California, pp. 61-68 (1981). 2. P. G. Gottschalk, J. L. Turney and T. N. Mudge, Twodimensional partially visible object recognition using efficient multidimensional range queries, Proc. Int. Conf. Robotics Automation, pp. 1582-1589 (1987). 3. K. Prazdny, Position-, rotation-, and scale-invariant pattern recognition using parallel distributed processing, Proc. IEEE 1st Conf. Comput. Vision, pp. 636-640 (1987). 4. H. Freeman and L. S. Davis, A corner finding algorithm for chain-coded curves, IEEE Trans. Comput. 26, 297-303 (1977). 5. F. Cheng and W. Hsu, Parallel algorithm for corner finding on digital curves, Pattern Recognition Lett. 8, 47-53 (1988). 6. I. M. Anderson and J. C. Bezdek, Curvature and tangential deflection of discrete arcs: a theory based on the commutator of scatter matrix pairs and its application to vertex detection in planar shapes, IEEE Trans. Pattern Analysis Mach. Intell. PAMI-6, 27-40 (1984). 7. A. Rosenfeld and E. Johnston, Angle detection on digital curves, IEEE Trans. Comput. C-22, 875-878 (1973). 8. A. Rosenfeld and J. S. Weszka, An improved method of angle detection on digital curves, IEEE Trans. Comput. C-24, 940-941 (1975). 9. P.S. Mare and G. Medioni, Adaptive smoothing for feature extraction, Proc. Image Understanding Workshop, Vol. 11, pp. 1100-1113 (1988). 10. P. V. Sankar and C. V. Sharma, A parallel procedure for the detection of dominant points on a digital curve, Comput. Vision Graphics Image Process. 403-412 (1978). 11. H. L. Beus and S. S. H. Tiu, An improved corner detection

Wavelet based corner detection

algorithm based on chain-coded plane curves, Pattern Recognition 20, 291-296 (1987). 12. P.R. Beaudet, Rotational invariant image operators, Proc. Int. J. Conf. Pattern Recognition, pp. 579-583 (1986). 13. L. Kitchen and A. Rosenfeld, Gray-level corner detection, Pattern Recognition Lett. 1, 95-102 (1982). 14. L. Dreschler and H. Nagel, Volumetric model and 3-D trajectory of a moving car derived from monocular TVframe sequence of a street scene, Proe. IJCAI, pp. 692-697 (1981). 15. J. Q. Fang and T. S. Huang, A corner finding algorithm for image analysis and registration, Proc. AAAI Conf., pp. 46-49 (1982). 16. K. Rangarajan, M. Shah and D.V. Brackle, Optimal corner detector, Proc. 2nd Int. Conf. Comput. Vision, pp. 90 94 (1988). 17. O. A. Zuniga and R. Haralick, Corner detection using the facet model, Proc. IEEE CVPR, pp. 30-37 (1983). 18. H. Asada and M. Brady, The curvature primal sketch, IEEE Trans. Pattern Analysis Mach. Intell. PAMI-8, 2-14 (1986). 19. A. Rattarangsi and R. T. Chin, Scale-based detection of

20. 21. 22. 23. 24. 25. 26. 27.

865

corners of planar curves, Proc. Int. Conf. Pattern Recognition, pp. 923-930 (1990). S. G. Mallat, A theory for multiresolution signal decomposition: the wavelet representation, IEEE Trans. Pattern Analysis Mach. lntell. PAMI-II, 674-693 (1989). M. J. T. Smith and T. P. Barnwell, Exact reconstruction techniques for tree-structured subband coders, IEEE Trans. Acoust. Speech Signal Process. 34, 434-441 (1986). A. P. Witkin, Scale space filtering, Proc. Int. Joint Conf. Artificial lntell., pp. 1019-1022 (1983). I. Daubechies, The wavelet transform: a method of timefrequency localization, Advance in Spectral Analysis. Prentice-Hall, New York (1990). S. Mallat, Multifrequency channel decompositions of images and wavelet models, I EEE Trans. Acoust. Speech Signal Process. 37, 2091-2110 (1989). Y. Meyer, OMelettes et Operateurs. Hermann, Paris (1988). A. P. Witkin, Scale-space filtering, Proc. 8th Int. Joint Conf. Artificial lntell., pp. 1019-1021 (1983). D. Marr and E. C. Hildreth, Theory of edge detection, Proc. R. Soc. London B270, 187-217 (1980).

About the Author--JIANN-SHu LEE was born in Tainan, Taiwan, Republic of China, on 4 May 1966. He received the B.S. and M.S. degrees in electrical engineering from National Cheng Kung University, Tainan, Taiwan, in 1988 and 1990, respectively. He is now a Ph.D. candidate at the Institute of Electrical Engineering, National Cheng Kung University. His current research interests are image processing, pattern recognition, data communication and digital signal processing.

About the Author--YUNG-NIEN SUN is an associate professor at the Institute of Information Engineering, National Cheng Kung University, Taiwan, which he joined in February 1989. From 1987 to 1989, he was an assistant scientist at the Brookhaven National Laboratory, Long Island, New York. He received the B.E. degree in controlling engineering from National Chiao Tung University, Taiwan, in 1978, and the M.S. and Ph.D. degrees both in electrical engineering from the University of Pittsburgh, Pennsylvania, in 1983 and 1987, respectively. His current research interests are computer vision, medical image processing and pattern recognition. Dr Stin is a member of IEEE, Sigma-Xi, the Chinese Association of Image Processing and Pattern Recognition, and the Chinese Association of Biomedical Engineering.

About the Author--Cmrq-HSING CHEN was born in Tainan, Taiwan, Republic of China, on 5 May 1958. He received the B.S. degree in electrical engineering from National Taiwan University in 1980, and the M.S. and Ph.D. degrees in electrical and computer engineering from the University of California at Santa Barbara in 1983 and 1987, respectively. Since 1988 he has been with the Department of Electrical Engineering at National Cheng Kung University in Taiwan where he is now an associate professor. His current research interests include image processing, pattern recognition and VLSI array design. He has published over 55 papers and given more than 45 presentations in public in more than ten countries.

About the Author--CHING-TSORNG TSAI was born in Chiay, Taiwan, on 14 March 1966. He received the B.S. degree in information science from Tunghai University, Taiwan, and M.S. degree in information engineering from National Cheng Kung University, Taiwan, in 1988 and 1990, respectively. Currently he is working for his Ph.D. degree at the Institute of Electrical Engineering, National Cheng Kung University. His research interests include computer vision and medical image processing. He is a student member of the Chinese Association of Image Processing and Pattern Recognition.