【正文】
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。 盡管到此為止我們的注意力被限制在一維水平剖面線范圍內(nèi),但同樣的結(jié) 論可以應(yīng)用于圖像中的任何方向上。然而,我們?cè)诮酉聛?lái)的討論中將得出同樣的結(jié)論。將在本節(jié)后面說(shuō)明,二階導(dǎo)數(shù)的這個(gè)過(guò)零點(diǎn)的性質(zhì)對(duì)于確定粗邊線的中心非常有用。我們注意到圍繞一條邊緣,二階導(dǎo)數(shù)的兩條附加性質(zhì) (1)對(duì)圖像中的每 條邊緣二階導(dǎo)數(shù)生成兩個(gè)值 (一個(gè) 5 不希望得到的特點(diǎn) )。 斜坡部分與邊緣的模糊程度成正比 圖 106 (a)由一條垂直邊緣分開(kāi)的兩個(gè)不同區(qū)域 ,(b)邊界附近的細(xì) 節(jié)顯示了一個(gè)灰度級(jí)剖面圖和一階與二階導(dǎo)數(shù)的剖面圖 由這些現(xiàn)象我們可以得到的結(jié)論是 :一階導(dǎo)數(shù)可以用于檢測(cè)圖像中的一個(gè)點(diǎn)是否是邊緣的點(diǎn) (也就是判斷一個(gè)點(diǎn)是否在斜坡上 )。在圖 106(b)中導(dǎo)數(shù)的符號(hào)在從亮到暗 4 的躍變邊緣處取反。在灰度級(jí)不變的區(qū)域一階導(dǎo)數(shù)為零。這個(gè)圖形也顯示出灰度級(jí)剖面線的一階和二階導(dǎo)數(shù)。 圖 106(a)顯示的圖 像是從圖 105(b)的放大特寫(xiě)中提取出來(lái)的。這個(gè)長(zhǎng)度又取決于斜度,斜度又取決于模糊程度。相反,現(xiàn)在邊緣的點(diǎn)是包含于斜坡中的任意點(diǎn),并且邊緣成為一組彼此相連接的點(diǎn)集。斜坡部分與邊緣的模糊程度成比例。 實(shí)際上,光學(xué)系統(tǒng)、取樣和其他圖像采集的不完善性使得到的 邊緣是模糊的,模糊的程度取決于諸如圖像采集系統(tǒng)的性能、取樣率和獲得圖像的照明條件等因素。從感覺(jué)上說(shuō),一條理想的邊緣具有如圖 105(a)所示模型的特性。 我們先從直觀上對(duì)邊緣建模開(kāi)始。從根本上講,如我們將要看到的,一條邊緣是一個(gè)“ 局部”概念,而由于其定義的方式,一個(gè)區(qū)域的邊界是一個(gè)更具有整體性的概念。這些像素位于兩個(gè)區(qū)域的邊界上。本節(jié)中我們更進(jìn)一步地了解數(shù)字化邊緣的概念。某些前面介紹的概念在這里為了敘述的連續(xù)性將進(jìn)行簡(jiǎn)要的重述。在 節(jié)介紹圖像增強(qiáng)的內(nèi)容中介紹過(guò)這些導(dǎo)數(shù)。 邊緣檢側(cè) 盡管在任何關(guān)于分割的討論中,點(diǎn)和線檢測(cè)都是很重要的,但是邊緣檢測(cè)對(duì) 3 于灰度級(jí)間斷的檢測(cè)是 最為普遍的檢測(cè)方法。在原圖中,這些點(diǎn)和與它們緊接著的相鄰點(diǎn),是用模板在這些孤立位置上生成最大響應(yīng)的方法來(lái)定向的。的線段 (圖像中在左上象限中也有此方向上的圖像部分,但寬度不是一個(gè)像素 )。圖 104(c)顯示了在白色區(qū)所有通 過(guò)門(mén)限檢測(cè)的點(diǎn)。圖 104(c)顯示了使門(mén)限等于圖像中最大值后得到的結(jié)果。( a)二進(jìn)制電路接線模板,( b)使用 45176。方向的部分產(chǎn)生了最強(qiáng)響應(yīng)。注意,圖像中所有水平和垂直的部分都被除去了。基于這個(gè)假設(shè),使用圖 103中最后一個(gè)模板。假設(shè)我們要找到一個(gè)像素寬度的并且方向?yàn)?45176。下列例子說(shuō)明了這一過(guò)程。留下的點(diǎn)是有最強(qiáng)響應(yīng)的點(diǎn)。在這種情況下,我們應(yīng)使用與這一方向有關(guān)的模板,并設(shè)置該模板的輸出門(mén)限,如式 ()所示。例如,如果在圖中的一點(diǎn)有|Ri||Rj| ,j=2,3,4,我們說(shuō)此特定點(diǎn)與水平線有更大的聯(lián)系。從左到右代表圖 103中模板的響應(yīng),這里 R 的值由式()給出。 Vertical 45176。注意每個(gè)模板系數(shù)相加的總和為零,表示在灰度級(jí)恒定的區(qū)域來(lái)自模板的響應(yīng)為零。方向線有最佳響應(yīng) 。第 3個(gè)模板對(duì)于垂直線有最佳響應(yīng) 。同樣的實(shí)驗(yàn)可以顯示出圖 103 中的第 2個(gè)模板對(duì)于 45176。在一個(gè)不變的背景上,當(dāng)線條經(jīng)過(guò)模板的中間一行時(shí)會(huì)產(chǎn)生響應(yīng)的最大值。由于這類(lèi)檢測(cè)是基于單像素間斷,并且檢測(cè)器模板的區(qū)域有一個(gè)均勻的背景,所以這個(gè)檢測(cè)過(guò)程是相當(dāng)有專用性的當(dāng)這 一條件不能滿足時(shí),本章中計(jì)論的其他方法會(huì)更適合檢測(cè)灰度級(jí)間斷 線檢測(cè) 復(fù)雜程度更高一級(jí)的檢測(cè)是線檢測(cè),考慮圖 103 中顯示的模板。圖 102(c)是將點(diǎn)檢測(cè)模板應(yīng)用于 X射線圖像后得到的結(jié)果 .圖 102(d)顯示了當(dāng) T取圖 102(c)中像素最高絕襯值的 90%時(shí),應(yīng)用式 ()所得的結(jié)果 (門(mén)限選擇將在 節(jié)中詳細(xì)討論 )。 1 1 1 1 8 1 1 1 1 ( a) ( b) ( c) ( d) 圖 102 ( a)點(diǎn)檢測(cè)模板,( b)帶有通孔的渦輪葉片的 X 射線,( c)點(diǎn)檢測(cè)的 結(jié)果,( d)使用式( )得到的結(jié)果(原圖由 XTEK 系統(tǒng)公司提供) 例 圖像中孤立點(diǎn)的檢瀏 我們以圖 102(b)功為輔助說(shuō) 明如何從一幅圖中將孤立點(diǎn)分割出來(lái) .這幅 X射線圖顯示了一個(gè)帶有通孔的噴氣發(fā)動(dòng)抓渦槍葉片,通孔位于圈像的右上象限。即我們著重考慮的差別是那些足以識(shí)別為孤立點(diǎn)的差異 (由 T 決定 )。注意,圖 102(a)中的模板同圖 (d)中給出的模板在拉 3 普拉斯操作方而是相同的?;旧?,這個(gè)公式是測(cè)量中心點(diǎn)和它的相鄰點(diǎn)之間加權(quán)的差值。使用如圖 102(a)所示的模板,如果 |R| ≥ T () 我們說(shuō)在模板中心的位置上已經(jīng)檢測(cè)到一個(gè)點(diǎn)。有關(guān)執(zhí)行模板操作的細(xì)節(jié)在 。就是說(shuō),關(guān)于式 (),在圖像中任意點(diǎn)的模板響應(yīng)由下列公式給出: ???????9199.. .2211iw iz izwzwzwR( ) 1W 2W 3W 4W 5W 6W 7W 8W 9W 圖 101 一個(gè)一般的 3*3 模板 這里 Zi 是與模板系數(shù) Wi相聯(lián)系的像素的灰度級(jí)。尋找 間斷最一般的方法是以 一個(gè)模板進(jìn)行檢測(cè)。我們將以圖像分割的應(yīng)用方面進(jìn)行討論來(lái)結(jié)束本章。之后,我們將討論一種稱為分水嶺分割法的形態(tài)學(xué) 2 圖像分割方法。門(mén)限處理也是一種人們普遍關(guān)注的用于分割處理的基