【正文】
素圓形遮罩被安放在圖像中的每個點(diǎn)上,對每個點(diǎn)來說,遮罩上的每個像素的亮度被拿來 與內(nèi)核進(jìn)行比較。對比是遮罩上每個像素之間的比較,而該遮罩上所有輸出 (C)的 n如下所示 n??0r? =?r?C? ?0rr ??, (2) Sobel 濾波器設(shè)計 大多數(shù)的邊緣檢測方法只能在假設(shè)邊緣存在時使用,即在強(qiáng)度函數(shù)里有一個不連續(xù)段或圖像中有一個非常陡峭的強(qiáng)度梯度。梯度是一個向量,其組成部分測量在 X 和 Y 方向距離變化時如何快速地測出像素值。在離散圖像中, 像素兩點(diǎn)之間的成員組可以用 dx 和 dy 來代替。這可以通過尋找以下幅度測量來完成, M= 22 yx ??? (7) 梯度方向可以通過下式得出: ????????? ? xy1tan? (8) 濾波器的設(shè)計方法 有許多方法可以檢測邊緣;多數(shù)的不同方法可以被分為這兩類: 梯度 :梯度方法通過尋找圖像的一階導(dǎo)數(shù)的最大值和最小值來檢測邊緣。 拉普拉斯算子 :拉普拉斯方法通過搜索圖像的二階導(dǎo)數(shù)上的零交叉點(diǎn)來尋找邊緣。一個邊緣有一個坡道的一維形狀并且計算圖像導(dǎo)數(shù)可以突出其位置 (見圖 2)。相反的一個典型邊緣也許是介于紅色塊和黃色塊的邊界。 輸入圖像 輸出邊 圖 1 梯度方法 輸入圖像 輸出邊緣 圖 2 拉普拉斯方法 Sobel 算子是梯度算法的一個 例子。式 (5)和 (6)上的不同算子對應(yīng)于用下列標(biāo)志纏繞圖像。 2. 通過使用像素值 (i, j)的加權(quán)總 和及他鄰居上的遮掩系數(shù)來得到 xd 和 yd 3. 這些遮掩被稱作卷積遮掩或有時也稱卷積內(nèi)核。這種情況下 ? ? ? ?jifjifx ,1,1 ????? (9) ? ? ? ?jifjify ,11, ????? (10) 算子的這種形式被稱為 Roberts 邊緣算子并且是被用來檢測圖像邊緣的第一個集的其中一個 (Robert, 1965)。使用奇數(shù)大 小的面具的優(yōu)勢是算子是集中的,并且可以因此提供一個基于中心像素 (i, j)的近似值。 Sobel邊緣算子的面具已給出: ???????????????001202101x ???????????????121000121y 該算子在每個點(diǎn)計算圖像強(qiáng)度的梯度,給出了從明到暗最可能增加的方向和在這方向上變化的速度。在實(shí)踐中,規(guī)模 (可能性邊緣 )計算更可 靠而且比方向計算更容易解釋。在每個圖像點(diǎn)上,梯度向量指向最可能增大強(qiáng)度的方向,在那個方向上梯度向量對應(yīng)的變化速度的長度。該邊緣檢測的 Sobel 模型發(fā)展的算法如下所示。為了得到水平和垂直的邊,我們期待在 x及 y方向上的二階導(dǎo)數(shù)。因此,如果圖像上的一個零交叉的搜索是高斯模型的第一平滑,那么可以用二階導(dǎo)數(shù)來計算出;或可以將圖像用高斯的拉普拉斯卷起。數(shù)據(jù)通過求適合圖像窗口的參數(shù)化模型的最小平方誤差來匹配,但這樣的做法是普遍的并且計算代價很大。在這種情況下,優(yōu)化降低到一個變量:邊緣的方向。通常情況下,它被用來尋找輸入的灰度圖上每個點(diǎn)的近似絕對梯度幅 度 。卷積通常遠(yuǎn)小于實(shí)際圖像。模板是輸入圖像 的像素值的改變區(qū)域的滑塊,然后轉(zhuǎn)移一個像素一直向右知道它到達(dá)一行的末尾,到下一行的開 始時又自動開始。 這是因為把模板的中心用第一行的像素來替代,例如,模板會出到圖像邊界。取得兩者的幅度之后,產(chǎn)生的輸出在兩個方向上檢測邊緣。算子可以被優(yōu)化來找水平,垂直或?qū)蔷€邊緣。企圖減少噪音會產(chǎn)生模糊和扭曲的邊緣。這能導(dǎo)致檢測邊緣上的不夠準(zhǔn)確的定位。比如折射或焦距不良的影響可能導(dǎo)致對象邊界通過 強(qiáng)度上的逐步改變而被確定。更新的基于小波變換的技術(shù)實(shí)際上是為了區(qū)分每個邊緣的過度性質(zhì)的特征,例如,頭發(fā)的邊緣和臉的邊緣。檢測一幅圖片的邊緣大大減少了數(shù)據(jù)量并且可以過濾掉無用的信息,同時保留了圖像中的重要結(jié)構(gòu)性質(zhì)。 結(jié)論 Sobel 算子更能處理圖像上的二維空間梯度檢測。 Sobel 邊緣檢測器使用一對 3*3 卷積模板,一個在 X 方向上的估計梯度,另一個在 Y 方向上的估計梯度。將一個二維像素陣列轉(zhuǎn)移成統(tǒng)計的不相關(guān)數(shù)據(jù)集可以增強(qiáng)去除冗余數(shù)據(jù)的能力,因此,數(shù)字圖像可以通過減少所需的數(shù)據(jù)量來表示。 邊緣檢測有助于優(yōu)化網(wǎng)絡(luò)寬帶,并且它還是跟蹤網(wǎng)絡(luò)流動的數(shù)據(jù)是所需要的。即使 Sobel 算子比計算機(jī)更慢,但它的更大的卷積核使輸入圖像更大程度的平滑,并 且可以因此使算子對噪聲減少敏感度。即使是在現(xiàn)實(shí)世界圖片的邊上, Sobel 算子有效地突出了噪音,檢測到的邊可以很厚。這可能是一個很慢的過程,因此, Sobel 算子在圖像數(shù)據(jù)傳輸中發(fā)現(xiàn)海量數(shù)據(jù)通信時被強(qiáng)烈建議。另一方面,梯度近似產(chǎn)生相對粗陋,特 別是圖像上的高頻率變化。 Nayar, 1996). Many of the techniques of digital image processing were developed in the 196039。s, digital image processing became the most mon form of image processing and is general used because it is not only the most versatile method but also the cheapest. The process allows the use of much more plex algorithms for image processing and hence can offer both more sophisticated performance at simple tasks, and the implementation of methods which would be impossible by analog means (Micheal, 2021). Thus, images are stored on the puters as collection of bits representing pixel or points forming the picture elements (Vincent, 2021). Firstly, images are a measure of parameter over space, while most signals are measures of parameter over time. Secondly, they contain a great deal of information (Guthe amp。 image processing is any form of i nformation processing for which the input is an image, such as frames of video。 representing an image by its edges has the fundamental advantage that the amount of data is reduced significantly while retaining most of image’s vital information with high frequencies (Keren, Osadchy, amp。 Maltoni, 1997) performs a 2D spatial gradient convolution on the image. The main idea is to bring out the horizontal and vertical edges individually and then to put them together for the resulting edge detection. The two filters highlight areas of high special frequency, which tend to define the edge of an object in an image. The two filters are designed with the intention of bringing out the diagonal edges within the image. The Gx image will enunciate diagonals that run from thee topleft to the bottomright where as the Gy image will bring out edges that run topright to bottomleft. The two individual imagesGx andGy are bined using the approximation equation GyGxG ?? The Canny edge detection operator was developed by John F. Canny in 1986 and uses a multistage algorithm to detect a wide range of edges in images. In addition, canny edge detector is a plex optimal edge detector which takes significantly longer time in result putations. The image is firstly run through a Gaussian blur to get rid of the noise. When the algorithm is applied, the angle and magnitude is obtained which is used to determine portions of the edges to retain. There are two threshold cutoff points where any value in the image below the first threshold is dropped to zero and values above the second threshold is raised to one. Canny (1986) considered the mathematical problem of deriving an optimal smoothing filter given the criteria of detection, localization and minimizing multiple responses to a single edge. He showed that the optimal filter given these assumptions is a sum of four exponential terms. He also showed that this filter can be well approximated by firstorder derivatives of Gaussians. Canny also introduced the notion of nonmaximum suppression, which means that given the presmoothing filters, edge points are defined as points where the gradient magnitude assumes a local maximum in the gradient direction. Another algorithm used is the Susan edge detector. This edge detection algorithm follows the usual method of taking an image and using a predetermined window centered on each pixel in the image applying a locally acting set of rules to give an edge response (Vincent, 2021). The response is then processed to give the output as a set of edges. The Susan edge filter has been implemented using circular masks (kernel) to give isotopic responses with a