• No results found

5.1.

Introduction

Thick objects in a discrete binary image are often reduced to thinner represen- tations called skeletons, which are similar to stick figures. Most skeletonizing algorithms iteratively erode the contours in a binary image until thin skeletons or single pixels remain. These algorithms typically examine the neighborhood of each contour pixel and identify those pixels that can be deleted and those that can be classified as skeletal pixels.

Thinning and skeletonizing algorithms have been used extensively for processing thresholded images, data reduction, pattern recognition, and counting and labeling of connected regions. Another thinning application is edge thinning which is an essential step in the description of objects where boundary information is vital. Algorithms given in Chapter 3 describe how various transforms and operations applied to digital images yield primitive edge elements. These edge detection operations typically produce a number of undesired artifacts including parallel edge pixels which result in thick edges. The aim of edge thinning is to remove the inherent edge broadening in the gradient image without destroying the edge continuity of the image.

5.2.

Pavlidis Thinning Algorithm

The Pavlidis thinning transform is a simple thinning transform [1]. It provides an excellent illustration for translating set theoretic notation into image algebra formulation.

LetùŒúuûUüSýHþÿ denote the source image and let

denote the support ofù ; i.e.,

ûú jù

þÿ . The inside boundary of

is denoted by . The set

consists of those points of

whose only neighbors are in

or

. The algorithm proceeds by starting with

þ , setting

equal to

, and iterating the statement

"!$#&% '!( ) !*#+# (5.2.1) until , '! .

It is important to note that the algorithm described may result in the thinned region having disconnected components. This situation can be remedied by replacing Eq. 5.2.1 with ! # % !( '! #+# % .- "! ##&/ "! # ý

where - 01 is the outside boundary of region 0 . The trade-off for connectivity is

higher computational cost and the possibility that the thinned image may not be reduced as much. Definitions for the various boundaries of a Boolean image and boundary detection algorithms can be found in Section 3.2.

Figure 5.2.1 below shows the disconnected and connected skeletons of the SR71 superimposed over the original image.

156 CHAPTER 5. THINNING AND SKELETONIZING

Figure 5.2.1. Disconnected and connected Pavlidis skeletons of the SR71.

Image Algebra Formulation

Let 2 be the Moore neighborhood and 243 be the Moore neighborhood with

its center pixel deleted as shown in Figure 5.2.2. The image algebra formulation of the

M =50

Figure 5.2.2. The deleted Moore neighborhood 647 .

Pavlidis thinning algorithm is now as follows:

89;:=< >@?BADC'E 8GF:IH CKJKJ+L 8M9;:4H N 9;:4HO P 6 Q 9;: N R O H S 9;:4TVU 7XWYW H O Q R[Z]\ ^ 6 7 Z O Q H19;: S_N Ea`cbCKJKJXLd

5. 3 Medial Axis Transform (MAT) 157 When the loop terminates the thinned image will be contained in the image variablee . The

correspondences between the images in the code above and the mathematical formulation are

fgih+jk lKhl e"m f n]gporq4f m s gItvu'wtxlKhyzkD{ u|l'}Xj~kX€gI‚ƒ„.€… m s n gporq s m }Xuzl †)gˆ‡„‰€1…[Š

If connected components are desired then the last statement in the loop should be changed to e1‹Œ †fŽ„‰† nV „.†  ‘“’ …  e …+Š

Comments and Observations

There are two approaches to this thinning algorithm. Note that the mathematical formulation of the algorithm is in terms of the underlying set (or domain) of the imagee ,

while the image algebra formulation is written in terms of image operations. Since image algebra also includes the set theoretic operations of union and intersection, the image algebra formulation could just as well have been expressed in terms of set theoretic notation; i.e.,

€ ‹;Œ lckD”1}Xt•uz„ e"–X— … , €˜ ‹;Œ lKkD”1}@t™u'„ e–š …

, and so on. However, deriving the sets ‚ƒ„.€…

and‡„€…

would involve neighborhood or template operations, thus making the algorithm less translucent and more cumbersome. The image-based algorithm is far simpler and more translucent.

5.3.

Medial Axis Transform (MAT)

Let ›œpžVŸ , e¡ i¢¤£'m[¥X¦[§ , and let

€

denote the support of e . The medial axis

is the set, ¨ ©

€

, consisting of those points ª for which there exists a ball of radius «*¬

, centered atª , that is contained in

€

and intersects the boundary of €

in at least two distinct points. The dotted line (center dot for the circle) of Figure 5.3.1 represents the medial axis of some simple regions.

.

Figure 5.3.1. Medial axes.

The medial axis transform ­ is a gray level image defined over® by

­i¯°±]²´³rµa¶ ·¹¸ °¡º» ¼ ½D¾Y¿ À[Á*Â

·•Ã ÀDÄ

The medial axis transform is unique. The original image can be reconstructed from its medial axis transform.

158 CHAPTER 5. THINNING AND SKELETONIZING The medial axis transform evolved through Blum’s work on animal vision systems [1–10]. His interest involved how animal vision systems extract geometric shape informa- tion. There exists a wide range of applications that finds a minimal representation of an image useful [7]. The medial axis transform is especially useful for image compression since reconstruction of an image from its medial axis transform is possible.

Let Å)ÆXÇÉÈÊ denote the closed ball of radius Ë and centered atÈ . The medial axis

of region Ì is the set ÍÏÎÑÐ

È¡ÒÓÌÕÔrÖË[×ÒÓØÚÙ4ÛÅ Æ‰Ü ÇÉÈÊ&ÝGÌÞàßXá|âäã*åXæ$ç'ÇÅéèÜ ÇÉÈÊ"êäë|ÌÊ&ìîíàïKð

The medial axis transform is the functionñÏÔzÌóòôØ

Ù defined by ñiÇÈÊ Î´õ Ë × ö¹÷ È¡Ò Í ø ùDúYû üýYþ övÿ ü ð

The reconstruction of the domain of the original image in terms of the medial axis transform ñ is given by

Ì Î × Å × ÇÈÊ+ð

The original image is then

ÇÉÈÊ Î

ö¹÷ È¡ÒÓÌ

ø

ö¹÷ È¡Ò̏ð

Image Algebra Formulation