A Median Filter Method For Image Noise Variance Estimation
A Median Filter Method For Image Noise Variance Estimation
A Median Filter Method For Image Noise Variance Estimation
Abstract—Image noise estimation is of crucial importance for the noisy image is first filtered by a low-pass filter to suppress the
computer vision algorithm, for the algorithm parameter is always image structures. Then the noise variance is computed from the
adjusted to account for the variations in noise level over the difference between the noisy image and the filtered image. The
captured images. A median filter method is provided for the main difficulty of filter-based methods is that the difference
image noise variance estimation in the paper. The image was first image is assumed to be the noise but this assumption is not true
processed with a group of high pass digital filters constructed by for images with structures or details. In blocked-based methods,
several finite difference operators with different orders. For each images are tessellated into a number of blocks. The noise
filtered image data, a variance was estimated. And the noise variance is then computed from a set of homogeneous blocks.
variance is approximated by the median of those estimated
The main issue of block-based methods is how to identify the
variances. In order to avoid outlier issues when there are left
image details in the residue, variances are estimated from each
homogeneous blocks.
filtered image data for several different inter-quartile ranges, There were other different approaches proposed for noise
then a median is taken. The supposed median filter approach to estimation [7]. Basically they are still filter-based, block-based,
image noise estimation is simple and effective, which has been or the combination of both. Filter based methods are found to
verified by the experiments. perform well for high noise levels but they usually require a
high computational load. Block based methods are in general
Keywords- median filter; noise estimation; difference operator;
less complex, but they tend to overestimate when noise levels
inter-quartile range; computer vision
are low.
I. INTRODUCTION In this paper, based on finite difference operators,
combined with inter-quartile ranges, a median filter method is
The computer vision has found a wide set of applications. applied into the image noise variance estimation, which is
However, many computer vision algorithms can work well simple and robust for computer applications.
only if the parameters of the algorithm are hand-tweaked to
account for characteristics of the particular captured images.
One of the most common needs for algorithm parameter II. IMAGE NOISE
adjustment is to account for variations in noise level over the In general, images acquired by digital imaging systems are
input captured images. So in order to work well, many corrupted by a number of noise sources such as photon shot
computer vision algorithms assume that the noise level is noise, dark current noise, readout noise, and quantization noise.
known a priori, and the algorithm are adjusted according to the While some noise sources can be effectively suppressed such
noise level of the captured image instead of using fixed as dark current noise by chip cooling and quantization noise by
parameters. To make the assumption come true, noise using an analogue to digital converter with more bits, other
estimation becomes an important research topic [1]-[3]. And an noise sources are not. The signal dependent photon noise, for
essential step toward achieving reliable, automatic computer example, is unavoidable due to the quantum nature of light.
vision algorithms is the ability to accurately estimate the noise Read out noise increases proportionally with readout rate,
level of images. Examples of computer vision algorithms which cannot be lowered in high-speed systems. Although all
requiring noise level estimates include motion estimation, noise sources possess different characteristics, the total effect
denoising, super-resolution, shape-from-shading and feature of them under normal lighting conditions , i.e. not low light as
extraction [4]. in computer vision applications, is usually modelled by a zero-
mean additive Gaussian noise distribution. It is the variance of
Noise can be estimated from multiple images or a single
this additive Gaussian noise that characterizes the effect.
image. Estimation from multiple images is an over-constrained
problem [5]. Estimation from a single image, however, is an The only true measurement of image noise is to acquire the
under-constrained problem and further assumptions have to be same image twice and subtract the two images from each other.
made for the noise. Olsen gave a complete description and The remaining signal, average value or standard deviation, is
comparison of six earlier estimation algorithms [6]. They are the actual image noise. However, it is not always possible to
classified into two different approaches: filter-based (or acquire the same measurement twice, for the time sensitive
smoothing-based) and block-based. In filter-based methods, the
14
by the finite difference operation, such as Laplacian operator. difference operator fdi, there exists outliers in the filtered image
To exclude structures or details from contributing to the noise gi, which have a significantly influence on the estimated result.
variance estimation, a simple edge detection algorithm using To overcome the influence of the outliers on the estimation
first order gradients can be applied, however which needs result, combined with inter-quartile ranges, the median method
appropriate threshold to decide whether an edge is given at a can be used to the estimation of noise variance.
particular image position. The finite difference operator is a
high pass filer essentially in frequency domain sense. So for a
given input image, there possibly exists an appropriate finite
difference operator to estimate correctly the noise variance in
the image. But the difference operator is unknown and not easy
to choose. If the chosen difference operator is not appropriate
for the image noise variance estimation, the estimated result
may deviate from the reality value randomly, higher or lower,
because of the influence of the outliers, or the residual image
structures. In the other hand, if a set of finite difference
operators with different frequency characteristics is used
separately for the pre-processing, for some finite difference
operators, the estimate noise variance may larger than the Figure 1 Frequency domain characteristics of finite difference operators
expected value, and for other finite difference operators, the
estimated noise variance may less than the expected value. In statistics, an outlier is an observation that is numerically
Because the resulted deviation from the expected noise distant from the rest of the data. Deletion of outlier data is a
variance is randomly, just like impulse noise, median can controversial practice frowned on by many scientists and
considered as the final estimation of the noise variance science instructors. While mathematical criteria provide an
according to the median filter method. objective and quantitative method for data rejection, they do
not make the practice more scientifically or methodologically
We assume that the image is corrupted by additive, zero sound, especially in small sets or where a normal distribution
mean white Gaussian noise with unknown deviation, and the cannot be assumed. Rejection of outliers is more acceptable in
model is given by areas of practice where the underlying model of the process
I n (x, y) = I (x, y) + n(x, y) being measured and the usual distribution of measurement
Where, x and y are the vertical and horizontal coordinates error are confidently known.
of a pixel, In(x, y), I(x, y) and n(x, y) are the noisy image, the
original image and the additive Gaussian noise respectively. Estimators capable of coping with outliers are said to be
Our goal is to estimate the standard deviation of the noise from robust. And the median is a robust statistic. Like the median,
the noisy image. To exclude the image structures, the image is the inter-quartile range, IQR, is insensitive to outliers. In
first processed with different order of finite difference statistics, the inter-quartile range (IQR), also called the mid-
operators, fdi. spread or middle fifty, is a measure of statistical dispersion,
g i ( x, y ) I n ( x, y )
fd i being equal to the difference between the third and first
quartiles.Unlike the total range, the inter-quartile range is a
Here, these finite difference operators with different order robust statistic, having a breakdown point of 25%, and is thus
can construct a group of high pass filters with different often preferred to the total range. We can try to back out the
frequency characteristic. For example, one order difference noise variance. To compute an inter-quartile range, like the
along the row and column can expressed as distance between the 25% and 75% points. This trims off the
I x (m, n) I (m, n 1) I (m, n) trash at each end, potentially corrupted if there are image
I y (m, n) I (m 1, n) I (m, n) structures in the image gi. For a normal distribution, where
IQR | 1.349V
So one order difference operator can be expressed as fd1 =
[1 -1]. Similarly, more high order of finite difference operators To avoid outlier issues when there are left image details in
can be expressed: fd2 = [1 -2 1]; fd3 = [1 -3 3 -1]; fd4 = [1 -4 6 the residue, actually do this for several different inter-quartile
-4 1]; fd5 = [1 -5 10 -10 5 -1]; fd6 = [1 -6 15 -20 15 -6 1]. ranges, and then take a median.
The frequency characteristics of the set of finite operators IV. EXPERIMENT AND DISCUSSION
are shown in Fig.1. Apparently, these finite difference
operators have high pass feature in frequency domain but with To illustrate that the provided median filter method for
different cut-off frequency. From the processed image gi, the image noise estimation, we apply our noise inference to several
different applications images. The resulting method, properly
noise variance V i can be estimated, and the estimated image
2
accounting for image noise, show robust behavior over a wide
noise variance is approximated by the median filter method: range of noise conditions.
Vˆ 2 median{V i2 } In experiments, different application fields of images are
considered as the ideal object images. And Gaussian noise with
Here, how to estimate the noise variance V i from the
2
zero mean and different variance were added to these object
image gi should be pay more attention. For given finite images, as shown in Fig. 2. where (a) is cameraman image, 8
15
bit, the size of 256 × 256 pixels; (b) is lily image, 8 bit, TABLE 1 IMAGE NOISE VARIANCE ESTIMATION
186×230 pixels; (c) is westcordorthophoto image, 8 bit,
366×364. Added V21 0.1 0.05 0.01 0.005 0.001 0.
V. CONCLUSIONS
We present a simple and robust algorithm for image noise
(a ) cameraman (b) lily (c) westcordorthophoto estimation. The input captured image is assumed to be
Figure 2 Noisy images
corrupted by additive zero mean Gaussian noise. To exclude
structures or details from contributing to the noise variance
First, consider the cameraman image as the test image. The estimation, a set of finite difference operator is applied first.
sample image is preprocessed by the finite different operator Then a median filter method provides very accurate noise
separately. For each finite difference operator, the image is variance estimation when the noise level is not high. There is
convolved along each rows of the test image, then along each no parameter needed to adaptive to the image contents.
column of the intermediate result. The resulted images are Simulation results show that the proposed algorithm performs
shown in Fig. 3. Apparently, for more high order finite well for different types of images over a large range of noise
difference operator, more less image details are left in the variances. The proposed noise estimation method is simple
resulted image, due to more high cutoff frequency. To and robust. It only required convolutions and median. The
overcome the influence of the outliers on the noise variance proposed method of image noise estimation can be used to the
estimation, median filter method combined with inter-quartile computer vision applications, and also can be extended to
ranges is used to the estimation, just as discussed above. other image processing applications. In the other hand, when
the noise level is high, the estimation of the supposed
approach is not accurate, which should be improved in the
future work.
ACKNOWLEDGMENT
This work is also partially supported by Research Start
Foundation of Tianjin University of Technology and Education
under Grant No. KYQD08015.
(1) fd1 (2) fd2 (3) fd3
REFERENCES
[1] Ce Liu, Richard Szeliski, Sing Bing Kang, C. Lawrence Zitnick, and
William T. Freeman, “Automatic Estimation and Removal of Noise
from a Single Image”, IEEE TRANSACTIONS ON PATTERN
ANALYSIS AND MACHINE INTELLIGENCE, VOL. 30, NO. 2,
FEBRUARY 2008, pp.299-314.
[2] C. Liu,W.T. Freeman, R. Szeliski, and S.B. Kang, “Noise Estimation
from a Single Image”, in IEEE Conf. on Computer Vision and Pattern
(4) fd4 (5) fd5 (6) fd6 Recognition, 2006.
[3] A. Amer and E. Dubois, “Fast and Reliable Structure-Oriented Video
Figure 3 Resulted images with finite difference operator
Noise Estimation,” IEEE Trans. On Circuits and Systems for Video
Technology, Vol. 15, No. 1, pp. 113-118, Jan. 2005.
For the tested images, the results of the noise variance [4] D. ROBINSON, P. MILANFAR, “Fundamental Performance Limits in
estimation are show in table 1. In the table the estimated result Image Registration”, IEEE Trans. Image Process. 2004, Vol.13,No.9
for the case when the added noise variance is zero is also given, pp.1185–1199.
because there may exists some noise in the ideal object images, [5] D. Lowe, “Object recognition from local scale-invariant features”, In
more or less, which should be subtracted from the estimated Proc. IEEE Int’l Conf. Computer Vision, pages 1150–1157, 1999.
results when consider the estimation error. The estimated [6] S. I. Olsen, “Estimation of noise in images: An evaluation”, Computer
results show that when the noise level is high the difference Vision Graphics Image Process. Graphic Models and Image Process,
between true variance and estimated value is large due to low Vol.55, No. 4, pp. 319-323, 1993.
ration of signal to noise. In contrast, when the added noise level [7] R. C. Bilcu and M. Vehvilainen, “A New Method for Noise Estimation
in Images,” Proc. IEEE EURASIP International Workshop on Nonlinear
is middle level or low level, the estimated is more accurate. In Signal and Image Processing, Sapporo, Japan, May 18-20, 2005.
practical computer vision applications, the noise level in the [8] J. Sijbers, D. Poot, A.J. den Dekker and W. Pintjenst, “Automatic
captured image is always less than the middle noise level case, estimation of the noise variance from the histogram of a magnetic
so the provide method can be used to the noise estimation for resonance image”, Phys Med Biol, 2007; pp. 1335-1 348; vol. 52.
the computer vision applications.
16