• No results found

In the following list of pertinent recursive image-template products §©¨¦ª« and

¬

¨r­Rªž«W®Qªu¯\°d±

¯>²´³Tµ. As before, for each operation we assume the appropriate value set ª .

recursive generic convolution product

§·¶ ¸ ³ ¬\¹»º¼ ½ ¼¾ ¿3À ®-Á ¿ˆÀ`Â@©à Á ¿*Àu ¹ À ¨©ÄÅ®BÆ Ç@ÈYÉ ¿*ÊÌË@ÍdÂyÎ § ¿RÏ ¸ ¬ÑÐeÒ ¿ÏÂ3Ó ¶ Æ Ç-ÈYÉ ± Ê3Ô Í µ Î Á ¿*Õ" ¸ ¬ ³ Ò ¿*Õ"Â˜Ó Öר × Ù

recursive linear convolution product

ÚÜÛ ÝßÞà\áãâ × × × ä × × ×åæçè-é_æ*çêcêÜëyé_æˆçuê á çíì©îÅè ï ð"ñ(ò æ3ó*ô-õ$ê æ Ú æ*öê÷ àÑøeù æ*öêcê Û ï ú¢ñ$òQû ó-ü õ$ý æ*é_æ3þ(êu÷ à Þ ù æ3þ(êcê ÿ × × ×Ø × × × Ù

recursive morphological max convolution product

Ú Þ à\áãâ × × × ä × × ×å_æ*ç_è@é_æˆç`ê-ê©ë_éBæ3ç`ê á ç]ì îÅè ð"ñ<ò æ*óô@õdê Ú æ3öê Û à.øQù æ3öê úYñ$ò\û ócü õ$ý é_æ*þ(ê Û à Þ ù æ*þ"ê ÿ × × ×Ø × × × Ù

1. 7 Neighborhoods 37

recursive morphological min convolution product

"!#!%$&'"! )(+*) , -.0/1 243#56! 7 48!:9<; >=@? 8!BA , CD./ 1FE 2HGI5J 7 K!:9 ; ? LK!'A M N O

recursive multiplicative max convolution product

%P Q '&# "!!R$F "! S(%*T U -./ 4243#56! 7 48!V D=W? '8!4A P U CD./ E 2 GI5 J 7 KX!YV ? 4KX!'A M N O

right multiplicative min convolution product

Q '&# "!!R$F "! S(%*T , -./ 1 243#56! 7 8!FVZ; =W? 48!'A , CD./ 1 E 2 GI5 J 7 K!FV ; ? 'KX!'A M N O

The definition of the left recursive convolution product \[

Q

is also straight- forward. However, for sake of brevity and since the different left products are not required for the remainder of this text, we dispense with their formulation. Additional facts about recursive convolution products, their properties and applications can be found in [1, 61, 62].

1.7.

Neighborhoods

There are several types of template operations that are more easily implemented in terms of neighborhood operations. Typically, neighborhood operations replace template operations whenever the values in the support of a template consist only of the unit elements of the value set associated with the template. A template ]%^`_4aZbFcDd with the property

that for eacheS^gf , the values in the support of]Dh consist only of the unit ofa is called

a unit template.

For example, the invariant template ]<^jilknmpoHq m o

shown inFigure 1.7.1 is a unit template with respect to the value set rLksuts:vxw since the value 1 is the unit with respect

to multiplication. t y = 1 1 1 1 1 1 1 1 1

38 CHAPTER 1. IMAGE ALGEBRA Similarly, the template ‚%ƒ…„l†n‡pˆ

‰‹Š~Œ ‡ ˆ

shown in Figure 1.7.2 is a unit template with respect to the value set L†

‰:Š%ŽWFŽW<‘ since the value 0 is the unit with respect to

the operation  . 0 0 0 0 r ’ = 0

Figure 1.7.2. The unit von Neumann template for the value set “L”•:–%—W˜F—W™›š .

If œž Ÿ:¡ is an ¢ž£g¤ array of points, ¥§¦T”Z¨ , and©~¦«ª>”n¬l­¯® ¬ ­

is the °±£g°

unit Moore template, then the values of the ¢ž£›¤ image b obtained from the statement ²`³´

¥%™

µ

© are computed by using the equation

² “ ¶"š ´ · ¸¹ ¨&º»¼¾½4¿IÀ ¥:“ÁšÃÂl©lÄ:“'Áš ´ · ¸¹ ¨ºX»¼¾½4¿IÀ ¥:“'ÁšÅÂÆZÇ

We need to point out that the difference between the mathematical equality

²›´ ¥+™

µ

© and

the pseudocode statement

²È³x´ ¥%™

µ

© is that in the latter the new image is computed only

for those points y for which œÊɛËÓ4©DÄ@šÍÌ ´ÏÎ

. Observe that since ¥:“4ÁšFÂWÆ

´ ¥:“Áš and Ð “ ¶Zš ´ ËÓ4©>ÄWš, where Ð

“¶Zš denotes the Moore neighborhood of y (see Figure 1.2.2),

it follows that ² “'¶"š ´ · ¸¹ ¨&º@ÑÒ¼ Ä À ¥:“ÁšÓÇ

This observation leads to the notion of neighborhood reduction. In implementation, neighborhood reduction avoids unnecessary multiplication by the unit element and, as we shall shortly demonstrate, neighborhood reduction also avoids some standard boundary problems associated with image-template products.

To precisely define the notion of neighborhood reduction we need a more general notion of the reduce operation Ô

³FÕ ¨×Ö

Õ

, which was defined in terms of a binary operation Ø on

Õ

. The more general form of Ô is a function

Ô ³Õ ¨ÙÚ Ö Õ —

whereÛܦ`Ý4ÞI¨FßDà and

Õ ¨ ÙÚ ´âá ¥ Ù Ú ¼ Ä À ³ ¥%¦ Õ ¨)—Z¶S¦+ãÈä . For example, if Õ ¨ ´

”Z¨ , where œåâŸ:¡ is an ¢æ£)¤ array of points and Ûç¦ Ý Þ ¨Fß6è

­ , then one such function could be defined as é ³ ” ¨ÙÚ Öæ”%— whereê Ý¥ Ù Ú ¼ Ä À ß ´ ê ¸¹ Ú ¼ Ä À

¥:“Áš . Another example would be to define

Ô

³

”

¨ÙÚ Öæ”

1. 7 Neighborhoods 39 asëRìíÅîïðòñó'ôÍõ ÷4øHùHú ö ðûïFð¾ñXó¾óýü þÿ ï ðûñXó í

, thenë implements the averaging function, which

we shall denote by average. Similarly, for integer-valued images, the median reduction

îï is defined as ìíZîïFð¾ñó'ô õ í í "! ###$ í %&(' , where ) *+ õ , ! #-## %.' . Now suppose / 021 , 354

ì7698uô-: is a unit template with respect to the

operation; of the semiring

6 7<= ; , ) &> @?

8 is a neighborhood system defined by

) * õBA 3 ñ , and í4 6

. It then follows that C

õjí < ;D3 is given by C * õ ë EF(G$H&I ð"JLKIó í 7= ;M3 ñ =( õ ë EFG$H&NPORQSUTPVWXPY

This observation leads to the following definition of an image-neighborhood

convolution product. Given Z\[^] ,

T`_ba+c

, a neighborhood system dfehg\ikjl

(i.e.,d _nm

jl,o-p ), and a reduction function qre a+ctsu

i

a

, then the image-neighborhood

convolution product v5ew Tyx z d is defined by v V{+X w q mTs c}| u~€‚ o for each {y_

g . Note that the product

x

z

is similar to the image template product ƒ

z in that x z is a function x z e a cy„ m j l o p i a p Y In particular, if T…_‡†+c

, ˆ eЉ=‹Œi jŽ is the Moore neighborhood, and

‘ _“’-† (”   is the • „

• unit Moore template defined earlier, then T—– z ‘ w T– z ˆ . Likewise,T™˜ šœ› w T˜ š d , where › _ ’ †   ž Ÿ ” 

denotes the von Neumann unit template (Figure 1.7.2) and N denotes the von Neumann neighborhood (1.2.2). The latter equality stems from the fact that if v eRw

T ˜ š › and ¡ŒeRw T ˜ š d , then since › € VW=X w¢ for all Wr_ Z5£¥¤ ž¦Ÿ V › €§X and ¤ ž¦Ÿ V › €§X w`d V{+X

for all points

{¨_ ‰ ‹ , we have that v V{X w © ª« c}|§¬.­®°¯±7²&³ ´ µ7¶=· ¸¨¹-ºPµ¶=·9» ¼ ½¾.¿}À.Á ¯ º ³ ´ µ¶=·Â»ÄÃŵƷPÇ

Unit templates act like characteristic functions in that they do not weigh a pixel, but simply note which pixels are in their support and which are not. When employed in the image-template operations of their semiring, they only serve to collect a number of values that need to be reduced by the gamma operation. For this reason, unit templates are also referred to as characteristic templates. Now suppose that we wish to describe a translation invariant unit template with a specific support such as theÈ™É¥È support of the

Moore template t shown inFigure 1.7.1. Suppose further that we would like this template to be used with a variety of reduction operations, for instance, summation and maximum. In fact, we cannot describe such an operand without regard of the image-template operation

Ê

Ë

by which it will be used. For us to derive the expected results, the template must map all points in its support to the unitary value with respect to the combining operation

Ë

. Thus, for the reduce operation of summation Ì , the unit values in the support must be

1, while for the maximum reduce operation Í , the values in the support must all be 0.

40 CHAPTER 1. IMAGE ALGEBRA reduction without regard to the image-template operation to be used to reduce the values within the neighborhood. However, we can capture exactly the information of interest in unit templates with the simple notion of neighborhood function. Thus, for example, the Moore neighborhood M can be used to add the values in everyÎ+ÏÐÎ neighborhood as well as

to find the maximum or minimum in such a neighborhood by using the statementsÑÒ ÓŒÔ , ÑtÕ Ö Ô , andÑ™× Ö Ô

, respectively. This is one advantage for replacing unit templates with neighborhoods.

Another advantage of using neighborhoods instead of templates can be seen by considering the simple example of image smoothing by local averaging. SupposeÑÙØ¥ÚÛ ,

whereÜMÝßÞ=à is anáŒÏâ array of points, andãäØÄå-Ú9æ(çè æç

is theÎ+ÏÐÎ unit Moore template

with unit values 1. The image b obtained from the statementé¨ê ëíìî§ï

їÒ

Ó

ã-ð represents the

image obtained from a by local averaging since the new pixel valueé ïñ ð is given by é ïñ ð9ëòó ô õö Û}÷§øùúûü Ñ ï7ý ð+þãÿ ïý ð9ë òó ô õö Û}÷øù"ú7ûŽü Ñ ïý ð

Of course, there will be a boundary effect. In particular, if , then ! "# $ &%' ( )#+*,%- ! .*/%-0.1 "#-*,%-0.2 .0#

which is not the average of four points. One may either ignore this boundary effect (the most common choice), or one may use one of several schemes to prevent it [1]. However, each of these schemes adds to the computational burden. A simpler and more elegant way is to use the Moore neighborhood function M combined with the averaging reduction

3546387(9:3<;9

. The simple statement

%>=?A@

provides for the desired locally averaged image without boundary effect.

Neighborhood composition plays an important role in algorithm optimization and simplification of algebraic expressions. Given two neighborhood functionsBDC B5E

(FGIH .KJL

, then the dilation of BDC by B5E , denoted by BDC *?

B5E , is a neighborhood function

B MFGNHO.<J L which is defined as B PQ R S2TUQVWYX(Z B C PQ-*[&\^]_P0- where B &PM*>` 4 "a*b`>caed B &PQf

. Just as for template composition, algorithm optimization can be achieved by use of the equation

%g*? BDC *? B5E &%g*? BDC h*? BiE for

appropriate neighborhood functions and neighborhood reduction functions j . For k d/l

, the kth iterate of a neighborhoodB

!FGHm.(J<L is defined inductively asBn B^n)o C * ? B , where Bp &PQ #PM6qrPsdtFG .

Most neighborhood functions used in image processing are translation invariant subsets of

FG

(in particular, subsets ofu Ev F E ). A neighborhood functionB (FGDHm.<J L

is said to be translation invariant if B

&P*\M

B

PQM*w\

for every point

\xdyFG

. Given a translation invariant neighborhood N, we define its reflection or conjugate Bz by Bz {P B^z |r*bP , where Bz |r !]a}aed B |rf and | ~2 2~2 -))- 2~(cdFG

denotes the origin. Conjugate neighborhoods play an important role in morphological image processing.

Note also that for a translation invariant neighborhood N, the kth iterate of N can be expressed in terms of the sum of sets

B n PQ B n<o C &P+* B {|€#

1. 7 Neighborhoods 41 Furthermore, since ‚^ƒ)„+…#†‡+ˆŠ‰ ‚e†{‹€ˆ Œ 

Ž8(‘Y’K“€” ‚ƒ<„+…†‡Qˆ-‰•€– and  Ž8‘Y’K“€” ‚ƒ<„+…#†‡Qˆ-‰•-–—Œ  ˜2™‘›š“1”

‚ƒ„…#†{‹€ˆ-‰œ+– , we have the symmetric relation

‚

ƒ

†‡QˆŒ‚ ƒ<„+…

†‹rˆž‰>‚e†&‡ˆ .