虽然线性图像增强工具在许多应用中经常是足够的,但是如果应用非线性技术,图像增强可以获得显著的优势。
非线性方法有效地保留了图像的边缘和细节,而使用线性往往会使图像模糊和扭曲。此外,非线性图像增强工具对噪声的敏感性较低。
•The principles behind WM smoothers and WM filters have been presented in this article, as well as some of the applications of these nonlinear signal processing structures in image enhancement.
•WM filters are computationally simple and provide significant advantages over traditional image enhancement methods using linear filters in several applications of image enhancement.
介绍了WM平滑器和WM滤波器的原理,以及这些非线性信号处理结构在图像增强中的一些应用。
WM滤波器计算简单,与传统的线性滤波器图像增强方法相比,在图像增强的几个应用中具有显著的优势。
•一、Order-Statistic Filter
Max-Filter:
This filter is useful for finding the brightest points in an image, and replace the center value by the max value of the region.
–Because pepper noise(dark dot) has very low values, it is reduced by this filter as a result of the max selection process.
去pepper noise(暗点)
Min-Filter
Min-filter is useful for finding the darkest points in an image, and replace the center pixel by the min value of the region
–It reduces salt noise(light dot) as a result of the min operation.
去salt noise(亮点)
Median-Filter
–To define the running median smoother, let {x(.)} be a discrete time sequence. The running median passes a window over the sequence { x(.)} that selects, at each instant n, a set of samples to comprise the observation vector x(n).
–where NL and NR may range in value over the nonnegative integers and N = NL + NR + 1 is the window size.
The median smoother operating on the input sequence {x (.)} produces the output sequence {y},
where at time index n
To extent the input sequence, the appended samples are selected so that the points appended at the beginning of the sequence have the same value as the first signal point, and the points appended at the end of the sequence all have the value of the last signal point.
为了扩展输入序列,选择附加的样本,以便在序列开始处附加的点与第一个信号点具有相同的值,并且在序列结束处附加的点都具有最后一个信号点的值。
•Running medians can be extended to a recursive mode by replacing the “causal” input samples in the median smoother by previously derived output samples. The output of the recursive median smoother is given by
•With the same amount of operations, recursive median smoothers have better noise attenuation capabilities than their nonrecursive counterparts
递归中值平滑更好的去噪效果(recursive median smoothers)
ps:In image processing applications, the running median window spans a local two-dimensional (2-D) area.
Typically, an N x N area is included in the observation window.
The processing, however, is identical to the one-dimensional (1-D) case in the sense that the samples in the observation window are sorted and the middle value is taken as the output.
在图像处理应用程序中,运行的中间窗口跨越局部二维(2-D)区域。
通常,观察窗口中包含一个n x n区域。
但是,处理过程与一维(1-D)情况是相同的,因为观察窗口中的样本被排序,中间值作为输出。
•二、Median Smoothers and Filters
上面的median smoother +
Weighted Median Smoothers
•Although the median is a robust estimator that possesses many optimality properties, the performance of running medians is limited by the fact that it is temporally blind. That is, all observation samples are treated equally regardless of their location within the observation window.
尽管中值是一个具有许多最优性的鲁棒估计量,但由于它是暂时盲的(temporally blind),所以运行中值的性能受到限制。也就是说,不管观察窗内的位置如何,所有的观察样品都被同等对待。
•the running weighted median output is computed as
–
•where Wi>0and is the replication operator defined as
•Consider the window size 5 WM smoother defined by the symmetric weight vector W = [1,2,3,2,1]. For the observation x(n) = [ 12,6,4, 1, 9], the weighted median smoother output is found as
•To illustrate the WM smoother operation for positive real valued weights, consider the WM smoother defined by W = [0.1, 0.1,0.2,0.2,0.1]. The output for this smoother operating on x(n) = [ 12, 6,4, 1, 9] is found as follows.
–Summing the weights gives the threshold To = 0.35.
•The Center Weighted Median Smoothers
–The weighting mechanism of WM smoothers allows for great flexibility in emphasizing or deemphasizing specific input samples.
–Because of the symmetric nature of the observation window, the sample most correlated with the desired estimate is, in general, the center observation sample. This observation leads to the center weighted median (CWM) smoother
WM平滑器的加权机制允许在强调或取消(emphasizing or deemphasizing)特定输入样本方面具有很大的灵活性(flexibility)。
由于观测窗口的对称性,一般来说,与期望估计最相关的样本是中心观测样本。这一观测结果使中心加权中值(cwm)更平滑。
–The CWM smoother is realized by allowing only the center observation sample to be weighted. Thus, the output of the CWM smoother is given by
•there is a logical way to generalize the median to an equivalently rich class of weighted median filters that admit both positive and negative weights.
The WM filter output for noninteger weights can be determined as follows
Vector Weighted Median Filters
•The extension of the weighted median for use with color images is straightforward
•The weighted median filtering operation of a color image can be achieved in a number of ways, two of which we summarize below.
–The filtering operation processes all components jointly such that the cross-correlations between components are exploited.
–Vector WM filtering requires the extension of the original WM filter definition as follows.
–Define as a three-dimensional vector, are respectively the red, green, and blue components of the ith pixel in a color image
Marginal WM filter
•The simplest approach to WM filtering a color image is to process each component independently by a scalar WM filter.
–A drawback associated with this method is that different components can be strongly correlated and, if each component is processed separately, this correlation is not exploited.
–In addition, since each component is filtered independently, the filter outputs can combine to produce colors not present in the original image.
–The advantage of marginal processing is the computational simplicity.
对彩色图像进行WM过滤的最简单方法是通过一个标量WM过滤器独立地处理每个组件。
与此方法相关联的一个缺点是,不同的组件可以强相关,并且,如果单独处理每个组件,则不会利用此相关性。
此外,由于每个组件都是独立过滤的,因此过滤器输出可以组合以生成原始图像中不存在的颜色。
边缘处理的优点是计算简单。
•三、Image Analysis and Enhancement
Image Noise Cleaning
Median smoothers are widely used in image processing to clean images corrupted by noise. Median filters are particularly effective at removing outliers. Often referred to as “salt-and-pepper’’ noise
Although a weighted median smoother can be designed to “best” remove the noise, CWM smoothers often provide similar results at a much lower complexity .
By simply tuning the center weight, a user can obtain the desired level of smoothing.
在图像处理中,中值平滑器被广泛应用于对噪声污染图像的清洗。中值滤波器在去除异常值方面特别有效。通常被称为“盐和胡椒”噪音
虽然加权中值平滑器可以“最佳”去除噪声,但CWM平滑器通常以更低的复杂度提供类似的结果。
通过简单地调整中心权重,用户可以获得所需的平滑级别。
Image Zooming
•Zooming an image is an important task used in many applications. When zooming, pixels are inserted into the image in order to expand the size of the image, and the major task is the interpolation of the new pixels from the surrounding original pixels.
•The advantage of using the weighted median in interpolation over traditional linear methods is better edge preservation and less of a “blocky” look to edges.
缩放图像是许多应用程序中使用的一项重要任务。缩放时,为了扩大图像的大小,将像素插入图像中,主要任务是从周围的原始像素中插入新像素。
与传统的线性方法相比,在插值中使用加权中值的优势在于更好地保留边,而不是“块状”看边。
Image Sharpening
•Image sharpening refers to any enhancement technique that highlights edges and fine details in an image
–Human perception is highly sensitive to edges and fine details of an image, and since they are composed primarily by high frequency components, enhancing the high-frequency components of an image leads to an improvement in the visual quality.
图像锐化是指在图像中突出显示边缘和细节的任何增强技术。
人类感知对图像的边缘和细节高度敏感,由于它们主要由高频分量组成,因此增强图像的高频分量可提高视觉质量。
In principle, image sharpening consists of adding to the original image a signal that is proportional to a high-pass filtered version of the original image.
The original image is first filtered by a high-pass filter that extracts the high-frequency components,
then a scaled version of the high-pass filter output is added to the original image, thus producing a sharpened image of the original.
Note that the homogeneous regions of the signal, i.e., where the signal is constant, remain unchanged
原则上,图像锐化包括向原始图像添加与原始图像的高通滤波版本成比例的信号。
原始图像首先由一个高通滤波器过滤,该滤波器提取高频分量,
然后将高通滤波器输出的缩放版本添加到原始图像,从而生成原始图像的锐化图像。
注意,信号的均匀区域,即信号恒定的区域,保持不变。
Linear techniques can lead to unacceptable results if the original image is corrupted with noise.
A tradeoff between noise attenuation and edge highlighting can be obtained if a weighted median filter with appropriated weights is used.
To illustrate this, consider a WM filter applied to a gray-scale image where the following filter mask is used
The output is proportional to the difference between the center pixel and the smallest pixel around the center pixel.
如果原始图像被噪声破坏,线性技术会导致不可接受的结果。
如果使用具有适当权重的加权中值滤波器,则可以在噪声衰减和边缘突出显示之间进行权衡。
为了说明这一点,考虑将WM过滤器应用于使用以下过滤器遮罩的灰度图像。
输出与中心像素和围绕中心像素的最小像素之间的差异成比例。
Thus, the filter output takes relatively large values for positive-slop edges in an image.
But for negative-slope edges, the center pixel takes small values producing small values at the filter output.
In order to highlight the positive-slope edges as well as negative-slope edges, we prefiltering the original image by
Edge Detection
•Edge detection is an important tool in image analysis, and it is necessary for applications of computer vision in which objects have to be recognized by their outlines.
•An edge-detection algorithm should show the locations of major edges in the image while ignoring false edges caused by noise.
边缘检测是图像分析中的一个重要工具,它对于计算机视觉的应用是必不可少的,在计算机视觉中,物体的轮廓必须被识别出来。
边缘检测算法应显示图像中主要边缘的位置,而忽略噪声引起的假边缘。
nA high-pass filter is applied to the image to obtain the amount of change present in the image at every pixel.
nThe output of the filter is thresholded to determine those pixels that have a high enough rate of change to be considered lying on an edge;
•i.e., all pixels with filter output greater than some value T are taken as edge pixels.
•The value of T is a tunable parameter that can be adjusted to give the best visual results.
•High thresholds lose some of the real edges, while low values result in many false edges; thus a tradeoff has to be made to get the best results.
nOther techniques such as edge thinning can be applied to further pinpoint the location of the edges in an image.
将高通滤波器应用于图像,以获得图像中每个像素处的变化量。
滤波器的输出被阈值化,以确定那些具有足够高的变化率的像素,这些像素被视为位于边缘上;
即,滤波器输出大于某个值t的所有像素均被视为边缘像素。
t值是一个可调参数,可以进行调整以获得最佳的视觉效果。
高阈值会丢失一些真正的边缘,而低值会导致许多错误的边缘;因此必须权衡才能获得最佳的结果。
其他技术,如边缘细化,可用于进一步精确定位图像中的边缘位置。
•Sobel operator
•The horizontal and vertical edge indicators of the weighted median filter are
•If there is a true edge present, then both differences should be high in magnitude, while if noise causes one of the differences to be too high, the other difference is not necessarily affected.
如果存在真正的边缘,那么两个差异的大小都应该很高,而如果噪声导致其中一个差异太高,则另一个差异不一定会受到影响。
•the strength of horizontal and vertical edges is
•In order to detect diagonal edges, the following masks are used
•Similar to the horizontal and vertical edges, the diagonal edges of the weighted median filters are
And the strength of the diagonal edges are
•The total amount of strengths to which any edges exists at the pixel: