【正文】
thods whose input and output are images, to methods in which the inputs are images, but the outputs are attributes extracted from those images (in the sense defined is Section ). Segmentation is another major step in that direction. Segmentation subdivides an image into its constituent regions or objects. The level to which the subdivision is carried depends on the problem being solved. That is, segmentation should stop when the objects of interest in an application have been isolated. For example, in the automated inspection of electronic assemblies, interest lies in analyzing images of the products with the objective of determining the presence or absence of specific anomalies, such as missing ponents or broken connection paths. There is no point in carrying segmentation past the level of detail required to identify those elements. Segmentation of nontrivial images is one of the most difficult tasks in image processing. Segmentation accuracy determines the eventual success or failure of puterized analysis procedures. For this reason, considerable care should be taken to improve the probability of rugged segmentation. In some situations , such as industrial inspection applications, at least some measure of control over the environment is possible at times. The experienced image processing system designer invariably pays considerable attention to such opportunities. In other applications, such as autonomous target acquisition, the system designer has no control of the environment. Then the usual approach is to focus on selecting the types of sensors most likely to enhance the objects of interest while diminishing the contribution of irrelevant image detail. A good example is the use of infrared imaging by the military to detect objects with strong heat signatures , such as equipment and troops in motion. Image segmentation algorithms generally are based on one of two basic properties of intensity values: discontinuity and similarity. In the first category, the approach is to partition an image based on abrupt changes in intensity, such as edges in an image. The principal approaches in the second category are based on 2 partitioning an image into regions that are similar according to a set of predefined criteria. Thresholding, region growing, and region splitting and merging are examples of methods in this category. In this chapter we discuss a number of approaches in the two categories just mentioned. We begin the development with methods suitable for detecting gray level discontinuities such as points, lines, and edges. Edge detection in particular has been a staple of segmentation algorithms for many years. In addition to edge detection per se, we also discuss methods for connecting edge segments and for assembling edges into region boundaries. The discussion on edge detection is followed by the introduction of various thresholding techniques . Thresholding also is a fundamental approach to segmentation that enjoys a significant degree of popularity, especially in applications where speed is an important factor. The discussion on thresholding is followed by the development of several regionoriented segmentation approaches. We then discuss a morphological approach to segmentation called watershed segmentation. This approach is particularly attractive because it bines several of the positive attributes of segmentation based on the techniques presented in the first part of the chapter. We conclude the chapter with a discussion on the use of motion cues for image segmentation. of Discontinuities In this section we present several techniques for detecting the three basic types of graylevel discontinuities in a digital image: points, lines, and edges. The most mon way to look for discontinuities is to run a mask through the image in the manner described in Section . For the 3 x 3 mask shown in Fig. , this procedure involves puting the sum of products of the coefficients with the gray levels contained in the region enpassed by the mask. That is. with reference to Eq. (). the response of the mask at anv point in the image is given by 3 ???????9199.. .2211iw iz izwzwzwR( ) 1W 2W 3W 4W 5W 6W 7W 8W 9W FIGURE A general 3 x 3 mask. where z。然而,我們?cè)诮酉聛?lái)的討論中將得出同樣的結(jié)論。我們注意到圍繞一條邊緣,二階導(dǎo)數(shù)的兩條附加性質(zhì) (1)對(duì)圖像中的每 條邊緣二階導(dǎo)數(shù)生成兩個(gè)值 (一個(gè) 5 不希望得到的特點(diǎn) )。在圖 106(b)中導(dǎo)數(shù)的符號(hào)在從亮到暗 4 的躍變邊緣處取反。這個(gè)圖形也顯示出灰度級(jí)剖面線的一階和二階導(dǎo)數(shù)。這個(gè)長(zhǎng)度又取決于斜度,斜度又取決于模糊程度。斜坡部分與邊緣的模糊程度成比例。從感覺(jué)上說(shuō),一條理想的邊緣具有如圖 105(a)所示模型的特性。從根本上講,如我們將要看到的,一條邊緣是一個(gè)“ 局部”概念,而由于其定義的方式,一個(gè)區(qū)域的邊界是一個(gè)更具有整體性的概念。本節(jié)中我們更進(jìn)一步地了解數(shù)字化邊緣的概念。在 節(jié)介紹圖像增強(qiáng)的內(nèi)容中介紹過(guò)這些導(dǎo)數(shù)。在原圖中,這些點(diǎn)和與它們緊接著的相鄰點(diǎn),是用模板在這些孤立位置上生成最大響應(yīng)的方法來(lái)定向的。圖 104(c)顯示了在白色區(qū)所有通 過(guò)門(mén)限檢測(cè)的點(diǎn)。( a)二進(jìn)制電路接線模板,( b)使用 45176。注意,圖像中所有水平和垂直的部分都被除去了。假設(shè)我們要找到一個(gè)像素寬度的并且方向?yàn)?45176。留下的點(diǎn)是有最強(qiáng)響應(yīng)的點(diǎn)。例如,如果在圖中的一點(diǎn)有|Ri||Rj| ,j=2,3,4,我們說(shuō)此特定點(diǎn)與水平線有更大的聯(lián)系。 Vertical 45176。方向線有最佳響應(yīng) 。同樣的實(shí)驗(yàn)可以顯示出圖 103 中的第 2個(gè)模板對(duì)于 45176。由于這類檢測(cè)是基于單像素間斷,并且檢測(cè)器模板的區(qū)域有一個(gè)均勻的背景,所以這個(gè)檢測(cè)過(guò)程是相當(dāng)有專用性的當(dāng)這 一條件不能滿足時(shí),本章中計(jì)論的其他方法會(huì)更適合檢測(cè)灰度級(jí)間斷 線檢測(cè) 復(fù)雜程度更高一級(jí)的檢測(cè)是線檢測(cè),考慮圖 103 中顯示的模板。