數字圖像平滑和伽馬濾波

Digital Image Smoothing and the Sigma Filter
數字圖像平滑和伽馬濾波

1.Introduction
引言

Generally,digital image smoothing techniques fall into two categories.In the first category,the noisy image is processed globally in the sense that the whole or a large section of a noisy image is correlated to obtain a smoothed image. Techniques in the transform domain using Wiener or leaset squrares filtering and techniques applying one-dimensional or two-dimensional Kalman filter are in this category. Statistical models for the signal(noise free image)and the noise are requried for the implementation fo these techniques.Unfortunately,the statistical model for most images is either unknown or impossible to describe adequately with a simple random process. The smoothed images display bllurred edges and conceal subtle details.In addition, the techniques are computationally costly. In the second category local operators are applied to noisy images. Only those pixels in a small neighborhood of the concerned pixel are involved in the computation, The immediate advantage of these techniques is their efficiency. They have great potential for real-time or near real-time implementation,because several pixels can be processed in parallel without waiting for their neighboring pixels to be processed. Recent research in image smoothing and segmentation favors the local techniques.
一般說來,數字圖像平滑分爲兩大類別。在第一個類別中,是通過對噪聲圖像的全部或者很大一部分進行分析處理,得到平滑後圖像。在技術實現上,一般採用維納濾波和最小方差值濾波,或者使用一維或二維的卡爾曼濾波。這些方法的實現都需要知道無噪聲圖像信號及噪聲信號的統計模型,但是顯示,對於大多數圖像,統計模型是不可能僅通過一個簡單的隨機函數等進行恰當描述的。使用這些方法得到的圖像模糊,而且把細微細節都隱去了。另外,這些方法也是很耗時的。在第二種類別裏,對噪聲圖像使用局部描述符進行描述。只對落在感興趣像素領域裏的像素進行計算,而不是針對全部。這種方法直接的好處就是很高效。因爲像素之間的計算可以並行,這使得他們有很大的潛在可能性適用於實時或接近實時實現,近來的在圖像平滑以及圖像分割等領域的研究也支持了這種方法。

There are many local smoothing methods. The well-known median filter in one or two dimensions has attracted much attention. The edge preserving smoothing of Nagao and Masuyama, the gradient inverse weighting scheme of Wang et al., the box filtering algorithm, and the local statistics method of Lee are just a few other altorithms in this category. Obviously, it is nearly impossible to rank them, because an algorithm may be effective for a class of images, but ineffective for others. In this paper a new class of local smoothing schemes is introduced. It is motivated by the sigma probability of the Gaussian distribution. The basic idea is to replace the pixel to be processed by the average of only those neighboring pixels having their intensity within a fixed sigma range of the center pixel. Replacing the center pixel by the average of selected neighboring pixels has been explored by many algorithms. Nagao's filter replaces the center pixel by the average of a subregion which has minimum variance. Lee in his refined local statistics method selected the region by using gradient information. Graham and Prewitt replace a pixel by the average of the surrounding area if the absolute value of their difference is smaller than some threshold. Rosenfeld in his region growing and tracking algorithm excludes high contrast edges, lines,and points from the average by judging extended box-filtering algorithm restricts the average to only neighbouring pixels with a fixed intensity range. The main differencis between the box filter and the sigma filter of this paper is that the former has the intensity range fixed throughout the center pixel. The advantages are numerous:(1)noise near edge areas will be smoothed without blurring the edge because only pixels on one side of the edge are included in the average;(2)subtle details of several pixel clusters and linear features of one to three pixels in width will be preserved since only those pixels and not the background are included in the average; (3)it will not create artifacts and will retain shapes, because no directional masks are used, unlike the algorithms of Nagao and Lee; it is computationally efficient, since only simple compare and fixed point add instructions are involved.
有很多種局部平滑的方法,最爲大家熟知的當屬一維或二維的中值濾波,還有Ngao和Masuyama的邊界保留平滑,Wang et al的灰度反轉權重模式,箱式濾波算法(http://tech-algorithm.com/articles/boxfiltering/),以及Lee的局部統計方法。顯然,我們無法對這幾種方法分個三六九等,因爲一種算法可能對某一類的圖像處理效果較好,但對某些圖像效果不好,在這篇文章中,我們提出一種新的局部平滑算法,它是基於高斯分佈的伽馬概率。基本的思想是把待處理的像素用與中心像素相距固定伽馬參數值的像素的平均值來代替(翻譯的不是很好,這句),用選中區域像素的均值來代替待處理像素,這種方法在很多算法都可以見到。Nagao的濾波器是具用最小變動值的像素的平均值來代替,Lee在其改進的算法中使用灰度信息來選取像素區域,Graham和Prewitt定義了一個閥值,如果選中像素與鄰邊像素值的差的絕對值在閥值內,就取這些滿足要求的像素值的均值,來代替選中像素。Rosenfeld在他的算法把高亮度的邊界,線以及點排除使用。。。方法。箱濾波與本文的伽馬濾波方法的主要區別在於箱濾波將圍繞中心像素的像素灰度值固定,伽馬濾波的優點有幾點:(1)在不平滑邊界的同時,邊界區域附近的噪聲將被平滑,因爲只有邊界一邊的像素將在取均值的時候包含,而另一邊對均值沒有貢獻;(2)一些像素分類的細節及寬度在一到三個像素的線性特徵將被保留,因爲在對均值的計算過程中,只有這些像素而不包括背景將會包括;(3)不會產生虛假的信息,不會對圖像進行改動,因爲沒有用到掩碼,不像Nagao和Lee的算法;另外,它計算起來比較高效,因爲只涉及簡單的比較和固定點數的增加操作。

A comparison of the sigma filter,the gradient inverse filter,Nagao's filter,and the median filter are conducted in this paper. Comparisons are based on the following criteria:(1)effectiveness in smoothing noise;(2)preservation of suble details and linear features;(3)immunity from shape distortion;(4)retention of step edges and sharpening of ramp edges;(5)removal of high-contrast spot noise;(6)computational efficiency. For the smoothing algorithms to be effective they are applied iteratively three times to test images of dimension 128*128. In many respects the sigma filter performs better than other algorithms except as regards the ability to remove sharp spot noise. Some methods of reducing this deficiency are presented.
對於伽馬濾波,灰度反轉濾波,Nagao濾波,還有中值濾波的比較,在本篇論文中均有涉及。對這些方法的比較主要基於以下幾點:(1)在噪聲平滑上的高效性;(2)對局部細節及線性特徵的保留;(3)形狀不變形;(4)保留step邊界,銳化ramp邊界;(5)能夠去除高亮度噪聲;(6)運算快速;爲使算法更高效,我們選取128*128的圖像進行測試,並且迭代3次。結果顯示在很多方法伽馬濾波表現性能更優異,除了在去除某些尖銳的噪聲外。彌補這一不足,有一些方法,在本文中也有所展現。

2.The Sigma Filter
伽馬濾波器

The noise in an image is generally considered as spatially uncorrelated and with continuous intensity spectrum. White Gaussian noise is an example. We shall regard as noise any random clutter of the size of three or fewer pixels. It is well known that that the "straight" averaging filter will smooth noise at the expense of blurring edges and smearing subtle details. An indiscriminate average of pixels in a window is the cause of the problem. As mentioned in Section 1 many schemes have been developed to overcome this problem. The merits of these algorithms will be explored in more detail in the next section. In this section, a conceptually simple algorithm is developed which easily excludes significantly different pixels from the average.
普遍認爲一幅圖像裏的噪聲在空間上是不相干的,並且在灰度範圍上是連續的。白色高斯噪聲就是一個例子。我們將把任意的分成三個或更小的尺寸的分類認爲是噪聲,我們大家都知道,如果直接地運用中值濾波將不光會平滑噪聲,還會模糊邊緣,並且丟失細節,爲什麼會這樣呢,對像素不加區別地進行中值濾波是這一現象的直接原因。就像第1節中提到了很多算法都想法克服這種問題。在下一節裏我們將對這些算法進行詳述。在本節中,我們提出一種很簡單的算法,可以很容易地將那些與中值差別的像素剔除。

Most image noise is Gaussian in distribution. The two-sigma probability is defined as the probability of a random variabe being within two standard deviations of its mean. The two-sigma probability for a one-dimensional Gaussian distribution is 0.955. This can be interpreted as meaning that 95.5% of random samples lie within the range of two standard deviations. In image smoothing, any pixel outside the two-sigma range most likely comes from a different population and, therefore, should be excluded from the average. If we assume that the a priori mean is the gray level of the pixel to be smoothed, we can establish a two-sigma range from the gray level and include in the average only those pixels within the two-sigma intensity. Let x(i,j) be the intensity or gray level of pixel(i,j), and x'(i,j)be the smoothed pixel(i,j). Also we assume that the noise is additive with zero mean and standard deviation theta. The sigma filter procedure is then described as follows:
大多數的噪聲都是依照高斯分佈的。2伽馬概率被定義爲中值的兩個標準偏差的隨機概率,對於一維的高斯分佈,2伽馬概率值是0.955,這也就是說有百分之95.5%的隨機噪聲存在於兩個標準偏差之間。在圖像平滑的過程中,那些不在2伽馬概率值之間的像素,都可被去除。假定我們是對像素的灰度進行平滑處理,我們可以建立一個2值的伽馬灰度區間,而只將在灰度區間裏的像素進行求均值。用x(i,j)來代表像素(i,j)的亮度或灰度值,x'(i,j)代表是平滑後的像素(i,j)值。同時我們假定噪聲對零均值及標準偏差theta是壘加的。伽馬濾波過程描述如下:

(1)Establish an intensity range (x(i,j)+p,x(i,j)-p),where p=2*delta;
(2)Sum all pixels wich lie within the intensity range in a (2n+1,2m+1) window.
(3)Compute average by dividing the sum by the number of pixels in the sum.
(4)Then x'(x,j)=the average. (To reduce sharp spot noise, step(4) will be modified later in this section.)
Or, mathematically, let
if((x(i,j)-p)<=x(k,l)&&(x(i,j)+p)>=x(k,l)) s(k,l)=1 else s(k,l)=0;
Then
temp1(i,j)=0;
temp2(i,j)=0;
for k=i-n:n+i
    for l=j-m:m+j
        temp1(i,j)+=s(k,l)*x(k,l);
for k=i-n:n+i
    for l=j-m:m+j
        temp2(i,j)+=s(k,l);
x'(i,j)=temp1(i,j)/temp2(i,j);
(1)第一步,先建立一個灰度區間(x(i,j)+p,x(i,j)-p),其中p=2*delta;
(2)將所有在此灰度區間裏的像素值加起來;
(3)將總和除以總像素數,得到一個均值
(4)將均值賦給x'(i,j);

The two-sigma range is generally large enough to include 95.5% of the pixels from the same distribution in the window, yet in most cases it is small enough to exclude pixels representing high-contrast edges and subtle details. Linear features such as roads one or two pixels wide are retained, because only those pixels with intensity near that of the feature are included in the average. The main drawback is that sharp spot noise represented by clusters of one or two pixels not be smoothed. This could be very annoying especially for a fairly noisy image. To remedy this, we shall replace the two-sigma average with the center pixel's immediate neighbor average, if M, the number of pixels within the intensity range, is less than a prespecified value K, In other words, step(4) is replaced by
if(M>K) x'(i,j)=two-sigma average else x'(i,j)=immediate neighbour average
雖然2伽馬區間囊括窗口中同種分佈的大多數像素,但對於大多數情況下,還是太小不足以將高亮度邊緣及細節排除。像道路類型的只有一兩個像素的線性特徵需要保留,因爲在計算均值的時候只有與該特徵相近的像素被包括。這樣導致那樣只有一兩個像素組成的聚類不會得到平滑處理。這對那些被噪聲污染比較嚴重的圖像,處理效果會很差。爲了修正這種缺陷,我們應該將中心像素的直接領域像素均值來代替2伽馬均值,如果M,在灰度區間的像素總數,小於一個指定的值K,換句話說,上述的第4步可以用如下來代替:
if(M>K) x'(i,j)=2伽馬均值 else x'(i,j)=直接鄰域均值

The value of K should be carefully chosen to remove isolated spot noise without destroying thin features and subtile details. For a 7*7 window, K should be less than 4, and it should be less than 3 for a 5*5 window. It should be noted that subtle textures within the two-sigma range will be wiped out after a few iterations. If conservation of texture information is required, a small p range and one or two iterations should be used.
爲了在不破壞細微的特徵和細節的情況下,K值需慎重選取。需要注意在幾次迭代之後,在伽馬區間裏細微的紋理特徵可能會被丟棄。如果需要保留紋理特徵,那麼,要將p值選擇小一些,並且只要用到一到2次迭代就可以了。

For images with unknown noise characteristics, the intensity range p can be determined either from a rough estimation of the noise standard deviation in a flat area, or from the desirability of retaining the gray level difference between the desirable features and its background. The sigma filter can be applied repeatedly with reduced p after each iteration. Two or three iterations are generally sufficient to reduce the noise level significantly.
在不清楚圖像的噪聲特點的情況下,灰度區間p可以通過在一個較爲平坦區域的噪聲標準偏差的粗略估計,或者從保留待選取特徵及背景的灰度差別來選取。在每次迭代後,可以適當地減小p值,一般情況下,兩到三次迭代,便能很明顯的削減噪聲了。

As an illustration, Fig.1(A) shows a medical image of cell structure. The results of applying the 7*7 sigma filter once, twice and three times are shown in Fig.1(B),(C),and (D), respectively. The result of applying the median filter twice is shown in (F). It should be noted that (E) is the result of applying a derivative version of the sigma filter, to be discussed in Section 4
作爲一個例子,A圖像顯示了一個細胞的醫學圖像,使用7*7的伽馬濾波作爲一次,兩次及三次的結果分別顯示在B,C,D圖中。與此相對照的,使用均值濾波後圖像結果顯示於F圖中。需要注意的是,E圖是對圖像使用了衍生後的伽馬濾波後的結果,這將要在第4部分詳細闡述。

3.A Comparison of locally smoothing algorithms
局部平滑算法性能比較

Numerous local image smoothing algorithms have been developed recently. It is impractial to compare all of them in detail. The straight local average method is known to blur edges and details. Lev et al. applied a template matching technique to detect edges and lines and then replaced the pixel by a weighted average corresponding to the particular pattern detected. Twelve 3*3 masks are created and relatively complicated weighting schemes are proposed. This algorithm is not computationally efficient, nor is it very effective in smoothing noise, since the window size is small. Lee using a local statistics method , produced good results for images corrupted by both additive and multiplicative noise. However, artifacts are observed in some cases, and the computation of the local variance makes this algorithm somewhat inefficient. These two filtering algorithms are excluded in the present comparision. The recently published gradient inverse method , the edge preserving smoothing scheme of Nagao and Matsuyama, and the well-known median filter are chosen instead.
近來出現了很多局部平滑算法,如果想去細細地比較它們的優劣實在是不可取的。直接的局部平滑會模糊邊緣和細節。Lev et al採用一種模板匹配的技術來檢測邊緣和線,然後用針對相應的模式,採用相應的加權值來代替像素值。這種算法採用了12個3*3的掩模,並且使用了相對複雜的權重模式。因爲使用的窗口尺寸太小,這種算法計算起來不高效,而且也在平滑噪聲上也不是很有效。Lee採用一種局部統計方法,對於累加噪聲以及乘法噪聲污染後的圖像產生很好的結果,然後,在某些情況下,會出現虛假的信息,並且不是很高效。基於以上原因,在本部分的算法比較中不涉及這兩種算法。我們只對最近發表的灰度反轉算法,Nagao和Matsuyama的邊緣保留平滑模式算法,還有衆周所知的均值濾波算法進行比較。

For completeness, brief descriptions of these three algorithms are given in this section. The gradient inverse weighting scheme employs a 3*3 window and computes for each pixel its inverse gradient weighted average with its neighboring pixels. The idea is to weight less those pixels having greater absolute differences with their center pixel. The procedure for processing x(i,j) in a 3*3 window is given as follows:
(1)Compute the inverse gradients of the eight neiboring pixels:
for k=-1:1
    for l=-1:1
        if x(i+k,j+l)!=x(i,j)  g(k,l)=1/abs(x(i+k,j+l)-x(i,j)); else g(k,l)=1/2
(2)Compute weights for the eight neighbors:
sum=0;
for k=-1:1
    for l=-1:1
        sum+=g(k,l);
w(k,l)=1/2*g(k,l)/sum, w(i,j)=1/2;
(3)
for k=-1:1
        for l=-1:1
            x'(i,j)+=w(k,l)*x(i+k,j+l);
在這一節裏,我們將對這三種算法一一簡短敘述。灰度反轉權重模式使用3*3的窗口,並且使用鄰域像素求解每個像素的反轉灰度權重。算法的主要思想是計算鄰域像素與中心像素灰度值的差值的絕對值。對像素x(i,j)的計算過程如下:
(1)計算鄰域8個像素的反轉灰度值
for k=-1:1
    for l=-1:1
        if x(i+k,j+l)!=x(i,j)  g(k,l)=1/abs(x(i+k,j+l)-x(i,j)); else g(k,l)=1/2
(2)計算8個像素的權重
sum=0;
for k=-1:1
    for l=-1:1
        sum+=g(k,l);
w(k,l)=1/2*g(k,l)/sum, w(i,j)=1/2;
(3)
for k=-1:1
        for l=-1:1
            x'(i,j)+=w(k,l)*x(i+k,j+l);

Nagao and Matsuyama proposed an algorithm which selects the most homogeneous neighborhood and replaces the pixel by its neighborhood average. They created nine overlapped subregions in a 5*5 window as shown in Fig.2. The means and variances of the nine subregions are computed, and the center pixel is replaced by the mean of the subregion having the minimum variance.
Nagao和Matsuyama提出一種算法,選取最同質的鄰域像素,然後用這些鄰域像素的均值來代替該像素。像在圖2中所示,一共產生了9個重疊的子區域。計算每一個子區域的均值及差異度,取最小差異度的子區域,並用其均值把中心像素值替換。

The median filter is more flexible. It can be applied columnwise,rowwise, and areawise. In our study, a 3*3 window is used, and the median of the nine pixels in the window represents the smoothed pixel. The reason for not using a large window is that a large window will smear details and edges, not to mention the higher computational load.
中值濾波較爲方便,它適用於以列方向,行方向,區域方向。在我們的實驗中,我們採用3*3的窗口,並且用九個像素值的中值來代表平滑像素。之所以不採用更大些的窗口是因爲更大的窗口會抹去細節和邊緣,更不用提更高的計算次數。

Two test images shown in Figs.3 and 4, of dimension 128*128 pixels, are used in our comparison. In Fig.3, a computer generated pattern of bars with increasing width(one pixel, three pixels....15 pixels) is created, and corrupted with noise to test the ability to preserve linear features, the ability to smooth noise along edges,and the effectiveness of noise reduction in general. The average intensity of the bar is 150 and of the background is 50. Figure 4 is a natural aerial scene artificially corrupted with noise. The intensity levels in all images in this paper are between 0 and 255. Each algorithm is applied to the noisy image repeatedly 3 times. The sigma filter is applied in a 7*7 window with the intensity intervals 2p, p, and p/2,and K=2.
爲用於我們的比較,我們選用了兩幅圖像,128*128的,圖3和圖4。在圖3裏,我們使用計算機產生了寬度分別爲1,3,... 15個像素的長條,然後用噪聲腐蝕,傅用這個圖片來測試保留線性特徵、在邊緣處平滑噪聲以及減弱噪聲的能力。條形圖的灰度平均值爲150,背景灰度值是50。圖4顯示了自然場景中一個被噪聲腐蝕的天線的圖片。在這篇論文中所有圖片的灰度值均在0到255間,每個作用於噪聲圖像的算法均迭代使用3次,伽馬濾波使用7*7的窗口,灰度間隔爲2*p,p以及p/2, 且K=2;

(1)Effectiveness in Noise Smoothing
The efficiency of smoothing noise can be measured by the reduction in noise standard deviation or variance. For the images of Fig.3 the standard deviations of each smoothed image are computed from a flat area in the lower left corner. The resluts are listed in Table 1.
對平滑噪聲的有有效性我們可以採用噪聲的標準偏差的減少量來度量。對於圖3,可以通過對左下角的平坦區域,來計算每個平滑圖像的標準偏差,結果如表1

The gradient iverse filter is apparently the least efficient smoothing algorithm due to its small mask and the nature of its weighting scheme. The sigma filter is significantly superior in smoothing noise with a reduction of standard deviation by approximately a factor of ten. The Nagao and median filters are comparable in their ability to reduce noise.
灰度反轉濾波顯然是效果最差的,因爲它選取的掩碼最小,還有它選取的權重模式的限制。伽馬濾波顯著地減少了標準偏差,平滑了噪聲。Nagao濾波和中值濾波在減少噪聲的效果是相似的。

Table 1
Comparison of Reduction in Noise Standard Deviation
噪聲標準差的減少量對比
                                          Noise Standard Deviation
Smoothing Algorithms         Bar pattern(p=10)            Bar pattern(p=30)
Sigma Filter                 0.81                         3.54
Gradient inverse             5.74                         17.84
Nagao's filter               2.48                         10.87
Median filter                2.55                         8.11

(2)Presevation of Subtle Details and of Linear Feature
對微小細節及線性特徵的保留
In some images it is important to retain highly distinguishable subtle details and line features,such as piers and roads. In other applications, such as image segmentation, it may be desirable to remove subtle details. The sigma filter is effective in preserving subtle details and line features as long as the intensity difference between them and their background is greater than the two-sigma intensity range. The background pixels will be excluded from the average when processing a pixel which represents the road or the subtle detail. In fact , it would preserve even a single outlying pixel, if we were not using the threshold K for spot noise reduction. The gradient inverse method theoretically will smear any feature of any size i applied a sufficient number of times, since it includes all pixels in the average and only weights them less if the difference is large. Similarly the Nagao filter will blur and eventually devour any feature with dimensions of three pixels or less in any direction. This can be easily seen in a noise free one-dimensional case in Fig.5, in which the Nagao filter is equivalent to replacing the center pixel with the average of itself and its two neighbours on either side, whichever has the minimum variance. The center pixel of the three-pixel-wide pulse will drop in value after one application. The deterioration will continue slowly in the one-dimensional case, but much faster in the two dimensional case. As seen in Figs.3(D) and (I), the bars of width one and three pixels are almost completely wiped out. The 3*3 median filter will wipe out single pixel lines in one application, since in a 3*3 mask, among the nine pixels, six of them will be background pixels. Thus the median will approach the background pixel value. A bar with two pixels wide is a critical case, It has five to six pixels depending on the orientation of the bar. The median filter will swallow slightly curving or broken two-pixel-wide bars. For a 5*5 median filter, a three-pixel-wide bar will be wiped out in one application. The images in Fig.4 further substantiate the characteristics of these algorithms. Figures 4(C),(D),(E),and (F)are the results of applying the smoothing algorithms three times. The gradient inverse scheme shown in Fig.4(D)did not do much about the noise and slightly reduced the contrast of the image. As shown in Fig.4(E),Nagao's filter smeared bridges and subtle detail and created artifacts. The 3*3 median filter smeared the bridges and generally blurred the image. The sigma filter performed fairly well except for the sharp spot noise problem.
在一些圖像裏,保留那些顯著的細節特徵和線性特徵,比如碼頭和道路。在另外一些工程中,比如圖像分割,可能需要去除細節特徵。伽馬濾波在保留微小細節以及保留線性特徵方面是有效的,只要微小細節及線性特徵與背景的灰度差值大於2伽馬灰度區間。在處理道路或細節時,背景像素將會被計算均值的過程排除在外。實際上,它將會保留甚至是一個孤立的像素,如果我們不使用閥值K。灰度反轉方法在理論上將會抹去任意尺寸的特徵,因爲它在計算均值時,把所有像素都包括進去了,即使在像素值差別過大時,它的權重也很小。同樣地,Nagao濾波器將會模糊,並最終吞噬在任意方向的三個像素或更少的特徵。這可以在圖5中很容易地看出,在圖5中,Nagao濾波就相當於將中心像素及兩邊的鄰居像素的均值來代替中心像素,而不管鄰居像素是否與中心像素的差值最小。在運行程序後,三個像素寬的中心像素值將會下降。在一維的情況下,效果持續惡化,但到了二維的情況下,就快了許多。就像在圖3中D及I所示,只有一個和3個像素的條將幾乎被完全清除。3*3的中值濾波將會清除單個像素行,因爲在3*3的掩模下,9個像素中有6個是背景像素,因此中值更趨近於背景像素。只有兩個像素的長條是關鍵,它有5或6個像素依賴長條的方向。中值濾波將會輕微的曲折或折斷兩像素寬的長條。對於5*5的中值濾波,在一次執行後,三像素寬的長條將會被清除。圖4中近一步表明了這些算法的特徵,4圖中C,D,E,F是使用了算法3次的結果。圖4D採用了灰度反轉模式,但對噪聲並沒有起多大作用,只是輕微地減弱了圖像的對比度。而圖4中E彩了Nagao濾波,它消除了“橋”以細節,併產生了假象。3*3的中值濾波消除了“橋”並且模糊了圖像,而伽馬濾波性能良好,除了一些尖銳的噪聲問題。

(3)Immunity from Shape Distortion
防圖形變形

The gradient inverse method is not effective in smoothing noise, but it is relatively free from artifacts and shape distortion. Nagao's filter, on the other hand, as shown in Fig.4(E), does create significant distortion because of the directional subregion average. It will round off corners of less than 90 degrees. Median filter is known to create artifacts. The 3*3 median filter will round off corners and produce patterns of patches, the same as Nagao's filter. As shown in Fig.4(C),the sigma filter is practically free of shape distortion.
灰度反轉方法對平滑噪聲並不是很有效,但不會產生虛假信息,且不會使圖形形狀發生變形。Nagao濾波,就像在圖4(E)中所示,由於方向性的子區域均值,確實會出現很明顯的變形。它將會繞開角度小於90度的角落。中值濾波會產生虛假信息,3*3的中值濾波會消除邊角,並且會產生塊狀的區域,就像Nagao濾波那樣,這在圖4(c)中展示出來;伽馬濾波可以免於圖形變形

(4)Retention of Step Edges and Sharpening Ramp Edges
保留階梯狀邊緣及銳化屋脊型邊緣
The intensity variations in the direction perpendicular to a sharp edge in th image plane from a step edge. Retaining the sharpness of a step edge is highly desirable in both image smoothing and segmentation.The gradient iverse filter will blur the step edge, as it computes the average on all pixels. The meidan filter will maintain a noise free step edge, but it will smear a noise step edge. Figure 6 shows a 3*3 mask moving through an edge. Assuming the edge is contaminated by noise, the 3*3 median filter replaces the center pixel with the fifth least bright pixel of the six pixels on the left side of the edge, while as the window moves right by one pixel, the center pixel is replaced by the fifth brightest among the six pixels on the dark side of the edge. Consequently the sharpness of the edge is degraded. The sigma filter, however, retains its sharpness by replacing the center pixel by the average of the six pixels.
在垂直於圖像面板上銳利邊緣方向上劇烈的變化形成階梯狀的邊緣。在圖像平滑及分割領域很需要將階梯邊緣保留。灰度反轉濾波會模糊階梯邊緣,因爲它是對所有像素計算中值。而中值濾波會保留無噪聲的階梯邊緣,但它會在塗抹一個階梯邊緣噪聲。圖6展示了一個沿邊緣移動的3*3的掩模。假定邊緣已被噪聲污染,3*3的中值濾波使用邊緣左邊的6個像素中第5個最不亮的像素值來代替中心像素,當窗口向右移動一個像素時,就用邊緣較暗的一邊的6個像素中第5個最亮像素來代替中心像素,結果邊緣的尖銳程度被減弱。然而,伽馬濾波,可以通過採用取6個像素的均值來代替中心像素的方法來保留尖銳程度。

Sharpening a ramp edge is generally of interest in studies of image segmentation by gray level difference. In this application Nagao's filter is excellent due to its directional subregion average. The other three algorithms will not sharpen a ramp edge but all will maintain a ramp edge fairly well. A derivative of the sigma filter which will sharpen a ramp edge will be discussed in the next section.
在使用灰度級差別對圖像進行分割時,一般會對屋脊型邊緣的銳化感興趣。在本實驗裏,Nagao濾波因爲它彩了方向性的子區域均值,效果比較明顯。而其它的三種算法並不會對屋脊型邊緣進行銳化,但對屋脊型邊緣保留的較好。在下一部分裏我們將討論銳化屋脊型邊緣的伽馬濾波的改進版本。

(5)Removing Spot Noise
去除斑點噪聲
The median filter is well known for its effectiveness in removing sparsely positioned sharp spot noise, since the spot noise has intensity at either end of the intensity scale. Nagao's filter is also effective, but requires a few iterations. The gradient inverse filter weights the spot noise much higher than its surrounding pixels. Consequently, it is not effective. The sigma filter with large window size is highly susceptible to spot noise, since no other pixel but the spot noise itself is within the two sigma range. The modified version with threshold K(as shown in Fig.3(G)) discussed in the last section will remove most isolated spot noise. However, sport noise near edges remains because the 7*7 mask contains several edge pixels which will fall into the two-sigma range. Increasing the value of K will further reduce the spot noise, but at the expense of blurring edges and subtle details. The spot noise can be further reduced by applying a 3*3 sigma filter with K=1, or 2. Figure 7 shows the effect of spot noise reduction by applying it to Figs.3(G) and 4(C) for K=1 and K=2. Figures 3(G)and 4(C) are repeated in Figs.7 for comparison. As shown in Fig.7(C), the spot noise is almost completely removed; however, the one-pixel-wide bar is badly broken up. Figures 6(E) and (F) show the effect on the aerial image.
中值濾波在去除空間上的斑點噪聲比較有效,因爲斑點噪聲的灰度值在灰度範圍的兩端。Nagao濾波也很有效,只不過需要多次迭代。灰度反轉濾波對斑點噪聲的權重要大於周邊的噪聲權重,因此,它並不是很有效。具有較大窗口的伽馬濾波對斑點噪聲是比較敏感的,因爲沒有其他像素,除了斑點噪聲在2伽馬區間裏。增加k值會減少斑點噪聲,但會模糊邊緣和細節。斑點噪聲可以進一步地進行削減,通過使用3*3,K=1或K=2的伽馬濾波. 圖7顯示了對圖3中G及圖4中C分別採用K=1,K=2的伽馬濾波後的效果。圖3(G)和圖4(C)是重複的,爲了在圖7中作對照。就像在圖7中(C)中所示,斑點噪聲幾乎被全部去除,然後,一個像素寬的長條被嚴重的折斷了。圖6(E)和(F)顯示了對天線圖像的作用效果。

(6)Computational Efficiency
計算效率
In our comparison, the algorithms were coded in FORTRAN and no special efforts were devoted to accelertate their executions. The computations were carried out on a Data General NOVA 800 with a Comtal 8000 image display. The ratio of computational time required for images of size 128*128 for each filter(per iteration) is listed in increasing order as follows:
(1)The sigma filter(7*7),1 unit of time;
(2)The median filter(3*3),1.5 units of time;
(3)The gradient inverse filter, 4.0 units of time;
(4)Nagao's filter, 11.0 units of time;
The sigma filter is the fastest algorithm in this group even with a 7*7 window, In our simulation, it took no more time than computing a straight 7*7 average. Nagao's filter is extremely slow, since it requires the computation of variance for nine subregions.
在對比中,算法都用FORTRAN編寫,並且沒有用特殊的方法來加快它們的執行速度。計算樣本是Data General Nova 800,一共有8000幅圖像,對128*128圖像的處理,不同的算法,執行時間的比率如下:
(1)伽馬濾波(7*7),1個單位時間
(2)中值濾波(3*3),1.5個單位時間
(3)灰度反轉濾波,4.0個單位時間
(4)Nagao濾波,11。0個單位時間
使用7*7窗口的伽馬濾波是最快的,在我們的仿真中,直接計算7*7的均值是最快的。Nagao濾波極慢,因爲它需要對9個子區域進行計算。

4.The Extended Sigma Filter
改進後的伽馬濾波

The sigma filter can be easily extended to perform image enhancement,segmentation, smoothing of signal-dependent noise, and even 3-D images, Here, only a few of these possibilities will be mentioned.
伽馬濾波可以很容易地進行擴展,進行圖像增強,圖像分割,還有單一噪聲的圖像平滑,甚至用於3-D圖像, 在這裏,我們只提及幾種。

(1)The Biased Sigma Filter
偏差伽馬濾波

This extended sigma filter will sharpen a ramp edge and also enhance the contrast of subtle detail. Tha bias is introducted by separately averaging pixels in the upper intensity range of (x(i,j),x(i,j)+p)and in the lower intensity range of (x(i,j),x(i,j)-p). The absolute difference between the upper average and x(i,j), and also the absolute difference between the lower average and x(i,j),are computed. The center pixel is replaced by the average which has the smaller absolute difference. The function of the biased sigma filter can be easily explained in a one-dimensional case. Figure 8(A) shows the effect of a seven-pixel-wide biased sigma filter with p=3, With one application, the ramp edge becomes much sharper, and it will approach a step edge as the number of applications increase. It should be cautioned that the intensity range p should be chosen to be relatively large. As shown in Fig.8(B) a ramp edge may become a two step edge with p=1. This algorithm is useful in sharpening edges in preprocessing for image segmentation by gray level difference and also in bringing out subtle details in a smoothed image. Figure 1(E)shows the image of Fig.1(D) processed by the biased sigma filter.
擴展後的伽馬濾波可以銳化屋脊型邊緣,並且增強細節的對比度。前提是要將計算均值分爲兩步來計算,一步在區間(x(i,j),x(i,j)+p),一步在區間(x(i,j),x(i,j)-p),分別在兩個區間裏求均值與x(i,j)的差值的絕對值。中心像素然後用較小的絕對值來代替,這種伽馬濾波在一維的情況下很好解釋,圖8 A中顯示了p=3,7個像素寬的濾波效果,執行一次,屋脊型邊緣更尖銳,但當執行次數增多時,它更接近於階梯邊緣。需要注意灰度區間p應該被選得大一些,像圖8 B中所展示的當p=1時,屋脊型邊緣變成了兩個階梯形邊緣。這種算法在爲採用灰度級差別進行圖像分割的預處理時進行邊緣銳化,以及去除平滑圖像的細節上,這種算法較爲有用。圖1 E顯示了對圖1 D進行偏差濾波後的結果。

(2)Signal-Dependent Noise
信號相關噪聲

Signal-dependent noise or speckles occur in coherent optical images as well as in synthetic aperture radar images. To deal with this noise, a reasonably effective method based on local statistics was recently proposed by Lee. In our experiment the sigma filter modified for signal-dependent noise performs better in many cases and requires much less computational time. The intensity range will not only float up and down with x(i,j) but also shrink or grow with x(i,j), since theta is a function of x(i,j), A more detailed discussion will be give in a separate study.
相干光學圖像及合成孔徑雷達影像會出現信號相關噪聲或者是散斑。爲處理這種噪聲,在局部統計的基礎上,Lee最近提出了一種有效的方法。在我們的實驗中,經過修改後的伽馬濾波,在處理信號相關噪聲上多數情況下表現較好,並且需要較少的計算時間。灰度區間不僅圍繞在x(i,j)上下浮動,而且隨着x(i,j)增減,因爲theta是x(i,j)的函數,對此更詳細的討論在另外一份研究中給出。

(3)Extension to 3-D Images
擴展到3D圖像

It is straightforward to extend the sigma filter and its derivatives to 3-D image smoothing. The two-dimensional window will be replaced by a three-dimensional cube. Pixels within the cube are processed by the same procedures established for the two-dimensional case.
將伽馬濾波擴展到3D圖像是很簡單易懂的。二維的窗口將被三維的立方體代替,在立方體內部的像素的處理方法和二維情況下是相同的。

5.Remarks
評論

(a)Most local smoothing algorithms do not require prespecified parameters.Clearly,this is a distinct advantage if the algorithm is to be effective for all image categories. The sigma filter does require specification of the intensity range and the size of the window. However, these parameters permit us to fine-tune the filter to a specific image or class of images. Once the characteristics of the sigma filter with respect to the parameters are understood, It is fairly easy determine the appropriate values. In addition, the computational efficiency of this algorithm permits us to adjust the parameters interactively.
多數局部平滑算法並不需要指明參數。明顯地,如果算法對所有圖像類別都有效的話,這將是一個顯著的優勢。伽馬濾波器需要指明灰度區間以及窗口的尺寸。然而,這些參數允許我們對濾波器進行調整,以使能適應指定的圖像類別。一旦瞭解了具有相應參數的伽馬濾波器的特性,那就很簡單地可以確實合適的值了。另外,算法的計算有效性允許我們交互地調整參數。

(b)The basic principle of the sigma filter can be incorporated into other algorithms to modify the characteristics of these filters. For example, it could be included in Nagao's filter or Lee's local statistics algorithm to obtain the two-sigma average in the directional subregion after it has been chosen by the procedures of these algorithms.
伽馬濾波器的原理可以融合到其他算法裏,來改變濾波器的特性。舉例來說,Nagao濾波器及Lee濾波器在選取了定向的子區域後,可以選用其子區域的2伽馬均值。

6.Conclusion
結論

A simple,effective,and computationally efficient noise smoothing algorithm has been developed. Detailed comparisons with a few local smoothing algorithms are made to substantiate the basic characteristics of this filter.The procedure and strategy of utilizing this filter has been explored.Applications of this filter to image segmention and other problems are currently under investigation. It is hoped that the sigma filter will be accepted as a basic digital image processing technique because of its simplicity and effectiveness.
本文提出一個簡單的、高效的、計算高效的噪聲平滑算法。幾中平滑算法的詳細比較證明了該濾波器的基本特性。展示了實現該濾波器的程序及結構。將該濾波器運用於圖像分割及其它問題上,目前正在研究。基於伽馬濾波的簡單及有效性,希望伽馬濾波能成爲一種基本的數字圖像處理技術。

終於翻譯完了,這篇具有15頁的論文在翻譯了兩天後,終於翻譯完了。終於體會到翻譯的辛苦了,雖然文中的絕大部分單詞我都認識,但對於有些句子還是很難翻譯的。翻譯完了,下一步就是實現伽馬濾波了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章