Image Algebra Formulation Let ÔÕ^Ö
where 0 denotes the zero image on the point set 9;:
Alternate Image Algebra Formulation
The above image algebra formulation gives rise to a massively parallel process operating at each point in the pyramid. One can restrict the operator to only those points in levels<>=? where the boundary threshold is satisfied as described below.
Let @BA,CD*EGFHJILKMC*DNEF#HE)CODQPSRBEFMHE)CDUTVR#EGF#HE)COD*EGFWPXR,H)ECD*EGFYTVR,H[Z . This maps a
pointCDNEF#H into its von Neumann neighborhood. Let@\
A^]`_Mabdce_ab be defined by \ @ AfCOghHiI j k5l5mnpo5qBr @ AC%spE5t#H)EvuOw#xyg z _ a b{
Note that in contrast to the functions@ and@\,@ A and@\ A are functions defined on the same
pyramid level. We now compute |} by
| } ]I~[B%8O } N k k#oo T & A*T&MUB } [ k k#oo T &, f kMo5 {
118 CHAPTER 3. EDGE DETECTION AND BOUNDARY FINDING TECHNIQUES
Comments and Observations
This technique ignores edges that appear at high-resolution levels which do not appear at lower resolutions.
The method of obtaining intermediate-resolution images could easily blur, or wipe out edges at high resolutions.
3.17.
Edge Detection Using K-Forms
The K-forms technique encodes the local intensity difference information of an image. The codes are numbers expressed either in ternary or decimal form. Local intensity differences are calculated and are labeled f , or depending on the value of the difference.
The K-form is a linear function of these labels, where denotes the neighborhood size.
The specific formulation, first described in Kaced [26], is as follows.
Let be a pixel value and let( f f p¡ be the pixel values of the 8-neighbors
of represented pictorially as
a
¢ 1a
¢ 2a
¢ 3a
¢ 4a
¢ 6a
8 ¢a
¢ 5a
¢ 7a
¢ 0 Set £f¤¦¥V§ ¤U¨©§ ªfor all«v¬J¯®B°±±.°N² ³ and for some positive threshold number´ defineµ·¶¹¸©º»,¼U°f®#°%½B³ as
µ¿¾%À(Á ¥Ã ¼ÅÄÆ¹À¹Ç ¨;È ®ÉÄÊÆWËÀUËBÌ È ½ÅÄÊÆÀ¹Í È ±
3. 17 Edge Detection Using K-Forms 119
verticalÎ horizontal horizontal vertical
Î normalÏ obliqueÐ 1-forms 2-forms 4-formsÑ neighboring pixel reference pixel Ò
Figure 3.17.1. Common K-forms in a ÓÕÔÖÓ window.
ר¯Ù
Ú to denote the K-form with representation in base
Û , having a neighborhood containing
Ü
pixel neighbors of the reference pixel, and having orientation characterized by the roman letterÝ . Thus the horizontal decimal 2-form shown inFigure 3.17.1is denoted
צÞ)ß
à*á , having
base 10, 2 neighbors, and horizontal shape. Its value is given by
â Þ%ã à*á3äå á,æ3ç Óè äé,ê æë è äé àæì The value of â¦Þ%ã
à*á is a single-digit decimal number encoding the topographical characteristics
of the point in question. Figure 3.17.2 graphically represents each of the possible values for the horizontal 2-form showing a pixel and the orientation of the surface to left and right of that pixel. (The pixel is represented by a large dot, and the surface orientation on either side is shown by the orientation of the line segments to the left and right of the dot.)
120 CHAPTER 3. EDGE DETECTION AND BOUNDARY FINDING TECHNIQUES
2-formí
horizontal
00 0 north-south ridge
î
01 1 west plateau edge
î
02 2 western slope
î
10 3 east plateau edge 11 4 plain or plateau 12 5 foot of western slope 20 6 eastern slope 21 7 foot of eastern slope
ï 22 8 north-south valley topographicalð analogy f 10ñ f ò 3 ó
Figure 3.17.2. The nine horizontal 2-forms and their meaning. The vertical decimal 2-form is defined to be
ôõö ÷GøQùú øfû3üý)þ ùÿ û^þ ùÿ û
The ternary K-forms assign a ternary number to each topographical configuration. The ternary horizontal 2-form is given by
ô õ ùú ø ûyü þ ùOÿ û þ ùÿ ÷ û
and the ternary normal 4-form is
ô ü þ ùOÿ û þ ùOÿ û þ ùÿ û þ ùÿ ÷ ûyü ô õNö ô õ
Note that the multiplicative constants are represented base 3, thus these expressions form the ternary number yielded by concatenating the results of application ofþ
. The values of other forms are calculated in a similar manner.
Three different ways of using the decimal 2-forms to construct a binary edge image are the following:
(a) An edge in relief is associated with any pixel whose K-form value is 0, 1, or 3.
(b) An edge in depth is associated with any pixel whose K-form value is 5, 7, or 8.
(c) An edge by gradient threshold is associated with a pixel whose K-form is not 0, 4, or 8.
3. 17 Edge Detection Using K-Forms 121
Image Algebra Formulation
Let be the source image. We can compute images !#"$%& for
'
)(*+,-,-,-+/.0 , representing the fundamental edge images from which the K-forms are
computed, as follows: ! " 132 54 687:9 '<; + where the 79'=; ?>/&A@
are defined as shown in Figure 3.17.3.
t
B(1) =
-1
1
t
B(5) =
1
-1
t
B(2) =
1
-1
t
B(6) =
1
-1
t
B(3) =
1
-1
t
B(7) =
1
-1
t
B(4) =
1
-1
t
B(8) =
1
-1
Figure 3.17.3. K-form fundamental edge templates. Thus, for example, CDEF is defined by
CDEFHGJIK3LMND/ONPRQFTS U$V EXW3YZDN[\P]FTS^D/ONP_Q:F E W`YaDRbPNcdFeSDHOHP_QafEF g hiNj#klm Won kdp
Let the function q be defined as in the mathematical formulation above. The
decimal horizontal 2-form is defined by
r:sut vHw Sxzy{ D}|#~Ff{ D}| v F p
Other K-forms are computed in a similar manner. Edge in relief is computed as
S? w K v K rdst vHw p
Edge in depth is computed as
S ~ KKu r st v_w p
Edge in threshold is computed as
S v KsKK ~ KKH r st v_w p
Comments and Observations
The K-forms technique captures the qualitative notion of topographical changes in an image surface.
The use of K-forms requires more computation than gradient formation to yield the same information as multiple forms must be computed to extract edge directions.
122 CHAPTER 3. EDGE DETECTION AND BOUNDARY FINDING TECHNIQUES
3.18.
Hueckel Edge Operator
The Hueckel edge detection method is based on fitting image data to an ideal two-dimensional edge model [1, 27, 28]. In the one-dimensional case, the image is fitted
to a step function :H&$ o
¢¡ o £
¤
If the fit is sufficiently accurate at a given location, an edge is assumed to exist with the same parameters as the ideal edge model. (See Figure 3.18.1.) An edge is assumed if
b
x
¥ 0x +l
¥ 0x -l
¥ 0h
a
s
x
¥y
¦Figure 3.18.1. One-dimensional edge fitting.
the mean-square error
§¨ª©«H¬
®
© «¯ ±°²³H´µ ¶¸·:³/´µ<¹}º»¼´
is below some threshold value.
In the two-dimensional formulation the ideal step edge is defined as
¨¿ÁÀ ÂoÃ
´ÄÅÆÇAÈ8¾ÆÉRÊÇ¢ËÍÌ
3. 18 Hueckel Edge Operator 123 whereÑ represents the distance from the center of a test diskÒ of radiusÓ to the ideal step
edgeÔRÑÁÕ?Ó×Ö, andØ denotes the angle of the normal to the edge as shown inFigure 3.18.2.
b+h
Ùθ
Úρ
b
ÙFigure 3.18.2. Two-dimensional edge fitting. The edge fitting error is
ÛÜÞÝßÝ
àªáâäãHåæç¼è é8êãNå\æçè<ë}ìíîå:í:çï
(3.18.1)
In Hueckel’s method, both image data and the ideal edge model are ex- pressed as vectors in the vector space of continuous functions over the unit disk ð
Ü ñ ã/ò æHó¼èAôò ì&õ ó ìzöø÷ù
. A basis for this vector space — also known as a Hilbert space — is any complete sequence of orthonormalized continuous functionsúû#ü
ô×ý Üþ æ ÷ æÿÿÿ with domainð . For such a basis,
â
and
ê
have vector form
â Ü ã æ ì æÿÿÿè and ê Ü ã æ ì æÿÿÿè , where Ü Ý Ý ãHåæçè_âãå\æçèíåäíçæ &ÜÞþ æ ÷ æÿÿÿ and Ü Ý Ý ãåæçèHê:ãHåæç¼èíåíçæ &Üþ æ ÷ æÿÿHÿÁï
For application purposes, only a finite number of basis functions can be used. Hueckel truncates the infinite Hilbert basis to only eight functions,û
æ
û
æÿÿÿæ
û . This provides for
increased computational efficiency. Furthermore, his sub-basis was chosen so as to have a lowpass filtering effect for inherent noise smoothing. Although Hueckel provides an explicit formulation for his eight basis functions, their actual derivation has never been published!
Having expressed the signal
â
and edge model
ê
in terms of Hilbert vectors, minimization of the mean-square error of Equation 3.18.1 can be shown to be equivalent to minimization of ã é è ì
. Hueckel has performed this minimization by using some simplifying approximations. Also, although
â
is expressed in terms of vector components
æÿÿÿæ , ê:ã/ò æóè
is defined parametrically in terms of the parameters
ã æ û æ æ è . The exact discrete formulation is given below.
124 CHAPTER 3. EDGE DETECTION AND BOUNDARY FINDING TECHNIQUES
Definition of the eight basis functions. Let !"$# be a disk with center %"!"&# and
radius ' . For each ()!*#,+-
! #, define .0/21 ' 3 4,56 #798:4!;5<! #=7 > . # /@? 1 5 . 7A*BC 7 and D =EF$GH# /JIKMLON QP"#SR ? 1 8:TP 7 A D B =EF$GH# /VUXW T Y L[Z BC 7 R N P"# ? I P 7 5\T A ] 7 E[$G^# /_Ua` L Z BC 7 R N P# Eb5:E # c ?ed P 7 5 1 A Dgf =EF$GH# / U ` L Z BC 7 R N QP"# QGh5:G # c ?id P 7 5 1 A Dgj =EF$GH# / U ` L Z BC 7 R N QP"# Eb5:E # c ? ` 5 d P 7&A ]lk E[$G^# / U ` L Z BC 7 R N P# &Gh5mG # c ? ` 5 d P 7 A Don =EF$GH# /VUa` T ` L Z BC 7 R N P"#)p U E,5<E # c Z 7 5 U QG;5qG # c Z 7sr Dot =EF$GH# / U ` T ` L Z BC 7 R N P"#9R&T E,5<E&$# c QGu5mG&$# c v Then w / U T dHL T I Z B(C 7 D w B / Uyx T Z BC 7 D B w 7 / D 7 8 D j w f / Dgf 8 D k w j / ` T D n w k / ` T Dot w n / U I d Z BC 7 D 7 5 Dgj # w t / U I d Z BC 7 Dgf 5 D k # v
Note that when
3 4,5<%&# 7 8-z!h56!"{# 7 / ' , then > QP"# /}|
. Thus, on the boundary of
each of the functions ~ is
|
3. 18 Hueckel Edge Operator 125 in the following figure:
h
0h
1h
2h
3h
4h
5h
6h
7R
Figure 3.18.3. The intersection S* "[={.
In his algorithm, however, Hueckel uses the functions aQSH$*&$$Q* in-
stead of X}$*$$&" in order to increase computation efficiency. This is allowable
since the’s are also linearly independent and span the same eight-dimensional subspace.
As a final remark, we note that the reason for normalizing — i.e.,
l
4 ,¡< ¢$£y¤¥z¦h¡\¦"¢$£ instead of §
4 ¨¡\ %¢{=£y¤:z¦h¡<¦"¢{=£ forcing ª©«6©¬
— is to scale the disk 4
¢
¦
¢
back to the size of the unit disk, so that restricted to z
¢
Q¦
¢
can be expressed as a vector in the Hilbert space of continuous functions on .
Hueckel’s algorithm. The algorithm proceeds as follows: Choose a digital disk of radius
®
(®
is usually 4, 5, 6, 7, or 8, depending on the application) and a finite number of directions ¯°±;²*´³{³$³&µ — usually ¯h"¶H(·^¸
¶
¹ *¶ {&º ¸*¶ .
Step 1. For »¼{ {³$³$³ , compute ½ ¾¿ À ÁÂ*ÃÄ&ÅeÆ*ÇOÁÈÂÉsÃÄ&ÉÅ
[z M¦*=z4 )Q¦ ;
Step 2. ForÊl-{ {${={Ë , compute Ì ¢ (¯=Í"ÎÐÏ £*ÑÒ"Ó
¯=ÍΤÏÔ
Ó
ÈÕF¯=Í ;
Step 3. ForÊl-{ {${={Ë , compute Ì
(¯Í ÎÐÏsÖ ÑÒ$Ó ¯ Í ¤Ï&× Ó Õ¯ Í ;
Step 4. For Êl-{ {$$$Ë , compute Ì
£ 4¯ Í Ø ½ ¤«½HÙÚ4Û&Ü"Ý £ ¯ Í ¡\Ý$»zÞ £ ¯ Í$ß ¤ ½*à$á Ó Õ¯ Í ÑÒ$Ó ¯ Í ;
Step 5. ForÊb{ {$${Ë , compute âãi¯Í*Oåä ÉÁçæçè4Å é ä É Áçæè Åé$ê Ì £ 4¯=Í"M¤ªÌ £ £ 4¯=Í*zë zì £ ;
Step 6. ForÊb}$*${=&{Ë , compute í04¯ Í ÎîÌ$¢4¯ Í )¤-âã4¯ Í ;
Step 7. Find ï such that ðíaz¯ ñ$ð%òóðí04¯
Í
126 CHAPTER 3. EDGE DETECTION AND BOUNDARY FINDING TECHNIQUES Step 8. Calculateõlö@÷øù4úûü=ýSþ{ÿ ù4úû*ü ÷ ù4úûü ö0ù4ú û ü=ýçù ü ø õ ø ø "õ ø ö ! õù" õù" õüü ù õü ø ý# $ Step 9. Set % ö'& & & & & aùzú û ü ( ø Hù ø ø ø ) ø * ø + ü Hù ø ø , ü " ø & & & & & and define - ù . 0/ üSö21 ù õ ú û ü4365 %87:9 ; <>="?A@!BC 3 D @FE
Remarks. The edge image
-
has either pixel value zero or the parameter
ùHG "IJ õ ú K ü . Thus, with each edge pixel we obtain parameters describing the nature of the edge. These parameters could be useful in further analysis of the edges. If only the existence of an edge pixel is desired, then the algorithm can be shortened by dropping STEP 8 and defining-
ù .L / üyöM1 365 %N7O9 ;P<>="?A@QB"C 3 D @FE
Note that in this case we also need only computeR
STSS
R
,
since R is only used in the
calculation of U .
It can be shown that the constantV in STEP 9 is the cosine of the angle between
the vectors W ö ù Q TSSTS , ü and X ö ù Y" Y SSTS Y , ü
. Thus, if the two vectors match exactly, then the angle is zero and V
ö
; i.e., W is already an ideal edge. If V[Z ;AE\
, then the fit is not a good fit in the mean-square sense. For this reason the threshold] is
usually chosen in the range;^E_\a`
9
Z
. In addition to thresholding with] , a further test
is often made to determine if the edge constant factor
I
is greater than a threshold factor. As a final observation we note that V would have remained the same whether
the basis bdc or
I
c had been used to compute the components R>c.
Image Algebra Formulation
In the algorithm, the user specifies the radiuse of the disk over which the ideal
step edge is to be fitted to the image data, a finite number of directions
ú ú !fTff ú g , and a threshold ] .
Let Wihkjml denote the source image. Define a parameterized template n ù0ozü p q ø r jmsQt , where u ö ; STSvST "w , by n ù0ozü xzy{}|~2 y {}|46!{ >"A" 6 F
Here~y>¡ !| corresponds to the center of the disk¢ y£| of radius¤ and{¥~¦yH§¨§L |.
For© in ª
3. 18 Hueckel Edge Operator 127 The algorithm now proceeds as follows:
½A¾º¿ÁÀmÂ!ÃÅÄFÆÇÆÈaÉF¾F¾Ê ËÍÌÎÏ˥РÑÓÒÔÕÖ × ÃFØÁÉF¾F¾ºÊ ½A¾>¿ÚÙÂTÃÛÄAÆÆÜÝÉF¾F¾ºÊ ÞàßâáãäÎ_ÏåËzæèçêéëìTívãèÐËzîçì Õðï ívã ÞLñ áã Î_ÏåË^òçêéëìTí ã ÐËÍóèçì Õðï í ã Þ æQáã Î_Ïå˨ñ£ÐôËLõèçFö!é0ëì æ í ãø÷ ì Õùï æ íãú ÐôËLûèç!üÚçºì Õðï í ã çêéëìTí ã ý ã ÎÏ Þ ßQáã þ ÞAßQáã þ çFö Þ æ ñ áã ÐÓÞ æ æ!áã úJÿ ã Î_ÏåÞ ß!áã Ðôý ã × ÃAØäÉF¾F¾ºÊ Î_Ï Ô þ æ Ö ãÍß ã Ô ã Ö ÛÎ_Ï éëì Ô î Ô Ö"Ö aÎ_Ï ì Õðï¨Ô î Ô Ö"Ö Þ ß Î_Ï Ë æ ç>ÐË î ç Þ ñ Î_Ï Ë ò ç>ÐË ó ç ÞAæÚÎ_Ï Ë ñ ÐË õ ç ö æ ÷ æ úÐË û çüÚçèç ý Î_Ï ÞAß þ Þ ß þ ç öÞ æ ñ ÐÚÞ æ æ úJÿ ÛÎ_Ï ÞAæ ü Ô ýÐÞ ñ Ö Î_Ïaç ñ Ô Ö ççAö ÷ æ ú æ öÐ üÚç æ ú Î_Ï Ë ßº÷ ç! èÐ" ç Ô Ð#Úç Ô üèÐ" ÖvÖ%$ ç Ô ÷ Ö æ !& ' Î_Ï æ Ô Ö (*)ÚçQË æ ñ ÐÚüÚç öË æ æ ÐË æ î ÐË æ ò ÐË æ ó ú Ð ç öË æ õ ÐË æ û ú+zÿ ÞiÎÏ,.-0/ Ô' Ö ç Ô21 21 1 î Ô Ö0Ö Æ
Remarks. Note thatÞ
is a vector valued image of four values. If we only seek a Boolean