05557339

Upload: nitin-shukla

Post on 09-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 05557339

    1/4

    A Median Filter Method for Image Noise

    Variance Estimation

    Zhijun Pei, Qingqiao Tong, Lina Wang, Jun Zhang

    School of Electronic EngineeringTianjin University of Technology and Education

    Tianjin, [email protected]

    AbstractImage noise estimation is of crucial importance for the

    computer vision algorithm, for the algorithm parameter is always

    adjusted to account for the variations in noise level over the

    captured images. A median filter method is provided for the

    image noise variance estimation in the paper. The image was first

    processed with a group of high pass digital filters constructed by

    several finite difference operators with different orders. For each

    filtered image data, a variance was estimated. And the noise

    variance is approximated by the median of those estimated

    variances. In order to avoid outlier issues when there are left

    image details in the residue, variances are estimated from eachfiltered image data for several different inter-quartile ranges,

    then a median is taken. The supposed median filter approach to

    image noise estimation is simple and effective, which has been

    verified by the experiments.

    Keywords- median filter; noise estimation; difference operator;

    inter-quartile range; computer vision

    I. INTRODUCTIONThe computer vision has found a wide set of applications.

    However, many computer vision algorithms can work wellonly if the parameters of the algorithm are hand-tweaked toaccount for characteristics of the particular captured images.

    One of the most common needs for algorithm parameteradjustment is to account for variations in noise level over theinput captured images. So in order to work well, manycomputer vision algorithms assume that the noise level isknown a priori, and the algorithm are adjusted according to thenoise level of the captured image instead of using fixed

    parameters. To make the assumption come true, noiseestimation becomes an important research topic [1]-[3]. And anessential step toward achieving reliable, automatic computervision algorithms is the ability to accurately estimate the noiselevel of images. Examples of computer vision algorithmsrequiring noise level estimates include motion estimation,denoising, super-resolution, shape-from-shading and featureextraction [4].

    Noise can be estimated from multiple images or a singleimage. Estimation from multiple images is an over-constrained problem [5]. Estimation from a single image, however, is anunder-constrained problem and further assumptions have to bemade for the noise. Olsen gave a complete description andcomparison of six earlier estimation algorithms [6]. They areclassified into two different approaches: filter-based (orsmoothing-based) and block-based. In filter-based methods, the

    noisy image is first filtered by a low-pass filter to suppress theimage structures. Then the noise variance is computed from thedifference between the noisy image and the filtered image. Themain difficulty of filter-based methods is that the differenceimage is assumed to be the noise but this assumption is not truefor images with structures or details. In blocked-based methods,images are tessellated into a number of blocks. The noisevariance is then computed from a set of homogeneous blocks.The main issue of block-based methods is how to identify thehomogeneous blocks.

    There were other different approaches proposed for noiseestimation [7]. Basically they are still filter-based, block-based,or the combination of both. Filter based methods are found to

    perform well for high noise levels but they usually require ahigh computational load. Block based methods are in generalless complex, but they tend to overestimate when noise levelsare low.

    In this paper, based on finite difference operators,combined with inter-quartile ranges, a median filter method isapplied into the image noise variance estimation, which issimple and robust for computer applications.

    II. IMAGE NOISEIn general, images acquired by digital imaging systems are

    corrupted by a number of noise sources such as photon shotnoise, dark current noise, readout noise, and quantization noise.While some noise sources can be effectively suppressed suchas dark current noise by chip cooling and quantization noise byusing an analogue to digital converter with more bits, othernoise sources are not. The signal dependent photon noise, forexample, is unavoidable due to the quantum nature of light.Read out noise increases proportionally with readout rate,which cannot be lowered in high-speed systems. Although allnoise sources possess different characteristics, the total effectof them under normal lighting conditions , i.e. not low light asin computer vision applications, is usually modelled by a zero-mean additive Gaussian noise distribution. It is the variance of

    this additive Gaussian noise that characterizes the effect.

    The only true measurement of image noise is to acquire thesame image twice and subtract the two images from each other.The remaining signal, average value or standard deviation, isthe actual image noise. However, it is not always possible toacquire the same measurement twice, for the time sensitive

    This work is supported by the Natural Science Foundation of Tianjin

    under Grant No.09JCYBJC27300.

    2010 Second International Conference on Information Technology and Computer Science

    978-0-7695-4074-0/10 $26.00 2010 IEEE

    DOI 10.1109/ITCS.2010.11

    13

  • 8/8/2019 05557339

    2/4

    acquisitions cannot be repeated to derive the image noise. Inthese cases, image noise can be estimated with various methods.

    There is a large literature on image denoising. Althoughvery promising denoising results have been achieved using avariety of methods, such as wavelets, anisotropic diffusion and

    bilateral filtering, the noise level is often assumed known andconstant for varying brightness values. And in the image

    denoising literature, noise is often assumed to be additive whiteGaussian noise. In contrast, the literature on noise estimation isvery limited. Noise can be estimated within an image, intra-image estimation, or between two or more successive images,inter-image estimation. Inter-image estimation requires morememory and is, in general, more computationally demanding.Intra-image noise estimation methods can be classified assmoothing based, also called filter based, or block based. Insmoothing-based methods the image is first smoothed, forexample using an averaging filter, and then the difference

    between the noisy and enhanced image is assumed to be thenoise; noise is then estimated at each pixel where the gradientis smaller than a given threshold. In block-based methods, thevariance over a set of blocks of the image is calculated and the

    average of the smallest variances is taken as an estimate.Many noise estimation methods have difficulties estimating

    noise in highly noisy images and in textured images. Notechniques were found to perform best for various noise levelsand images. Some methods use thresholds, for example, todecide whether an edge is given at a particular image position.Smoothing-based methods were found to perform well withhigh-noise levels but they require large computations and finetuning for various images. Smoothing based methods havedifficulties in images with fine texture and they tend tooverestimate the noise variance. Block-based methods are, ingeneral, less complex than smoothing-based methods. Theytend, in general, to overestimate the noise in good qualityimages and underestimate it in highly noisy images. In some

    cases, no estimate is even possible.Given that a variable X comes from a known distribution, it

    is possible to estimate its variance directly from N observedmeasurements x1, x2xN. For example, the sample variance s

    2

    of a normally distributed random variable ),(~ 2VuNX isoften estimated by the Mean Squared Error with respect to the

    sample meanx :

    )(1

    12 xxN

    s i

    ixN

    x1

    The Equation provides an optimal estimate of the expected

    valueu and its variance in a least squares sense. However, aleast squares estimate is also notorious for being unreliable inthe presence of outliers. A single outlier sample could bias thesample mean towards that value and significantly increase thesample variance.

    To reduce the influence of outliers, the sample variance can be estimated by fitting a known distribution model to thelargest peak in the histogram of the available samples [8]. Thishistogram based method is not limited to a single distribution,

    such as the Gaussian distribution, and can be applied to thecase of single frame and two-frame noise estimation. Similarly,image noise is estimated from homogeneous regions in animage or from difference of images after alignment. Differentfrom the above conventional methods, however, this estimateof the noise variance is not computed from the sum of squareddifferences, but from a Gaussian curve fit to the histogram of

    the difference image. Although this curve fit allows robustvariance estimation under the presence of intensity or motionoutliers, the method is computation complex.

    In order to overcome the influence of the outliers on thenoise estimation, based on difference operators, combined withinter-quartile ranges, a median filter method is applied into theimage noise variance estimation.

    III. MEDIAN FILTERMETHOD FORNOISE ESTIMATIONThe median filter is the best known as order statistics filter.

    For the image processing, the median filter, which, as its nameimplies, replaces the value of a pixel by the median of the graylevels in the neighbourhood of that pixel.

    )},({),(,),( tsgmedianyxf yxSts

    The original value of the pixel is included in thecomputation of the median. Median filters are quite popular

    because, for certain types of random noise, they providedexcellent noise reduction capabilities, with considerably less

    blurring than linear smooth filters of similar size. Medianfilters are particularly effective in the presence of both bipolarand unipolar impulse noise, also called salt and pepper noise

    because of its appearance as white and black dotssuperimposed on an image.

    The outliers in the noise estimation can be considered asimpulse noise, so median filter method can be applied into thenoise estimation. Here, the median filter is used to avoid the

    influence of the outlier on the estimation, rather than tosuppress the image noise.

    In most computer vision applications, noise need to beestimated from a single image. Estimating the noise level froma single image seems like an impossible task. We need torecognize whether local image variations are due to colour,texture, or lighting variations from the image itself, or due tothe noise. It might seem that accurate estimation of the noiselevel would require a very sophisticated prior model for images.However, in this work we use a very simple median filtermethod, based on a set of difference operator, to derive a boundon the image noise level. We first processed the image datawith a group of finite difference operator respectively andestimate the noise using median filter method, combined with

    inter-quartile ranges, from the resulted different residuals.In the conventional filter-based methods, the noisy image is

    first filtered by a low-pass filter to suppress the imagestructures. Then the noise variance is computed from thedifference between the noisy image and the filtered image. Themain difficulty of filter-based methods is that the differenceimage is assumed to be the noise but this assumption is not truefor images with structures or details. The processing operationof low pass filter and difference computation can be replaced

    14

  • 8/8/2019 05557339

    3/4

    by the finite difference operation, such as Laplacian operator.To exclude structures or details from contributing to the noisevariance estimation, a simple edge detection algorithm usingfirst order gradients can be applied, however which needsappropriate threshold to decide whether an edge is given at a

    particular image position. The finite difference operator is ahigh pass filer essentially in frequency domain sense. So for a

    given input image, there possibly exists an appropriate finitedifference operator to estimate correctly the noise variance inthe image. But the difference operator is unknown and not easyto choose. If the chosen difference operator is not appropriatefor the image noise variance estimation, the estimated resultmay deviate from the reality value randomly, higher or lower,

    because of the influence of the outliers, or the residual imagestructures. In the other hand, if a set of finite differenceoperators with different frequency characteristics is usedseparately for the pre-processing, for some finite differenceoperators, the estimate noise variance may larger than theexpected value, and for other finite difference operators, theestimated noise variance may less than the expected value.Because the resulted deviation from the expected noisevariance is randomly, just like impulse noise, median can

    considered as the final estimation of the noise varianceaccording to the median filter method.

    We assume that the image is corrupted by additive, zeromean white Gaussian noise with unknown deviation, and themodel is given by

    I n (x, y) = I (x, y) + n(x, y)Where, x and y are the vertical and horizontal coordinates

    of a pixel, In(x, y), I(x, y) and n(x, y) are the noisy image, theoriginal image and the additive Gaussian noise respectively.Our goal is to estimate the standard deviation of the noise fromthe noisy image. To exclude the image structures, the image isfirst processed with different order of finite differenceoperators, fdi.

    inifdyxIyxg ),(),(

    Here, these finite difference operators with different ordercan construct a group of high pass filters with differentfrequency characteristic. For example, one order differencealong the row and column can expressed as

    ),()1,(),(Ix nmInmInm ),(),1(),(I y nmInmInm

    So one order difference operator can be expressed as fd1 =[1 -1]. Similarly, more high order of finite difference operatorscan be expressed: fd2 = [1 -2 1]; fd3 = [1 -3 3 -1]; fd4 = [1 -4 6-4 1]; fd5 = [1 -5 10 -10 5 -1]; fd6 = [1 -6 15 -20 15 -6 1].

    The frequency characteristics of the set of finite operatorsare shown in Fig.1. Apparently, these finite difference

    operators have high pass feature in frequency domain but withdifferent cut-off frequency. From the processed image gi, the

    noise variance2

    iV can be estimated, and the estimated image

    noise variance is approximated by the median filter method:

    }{22

    imedian VV

    Here, how to estimate the noise variance2

    iV from the

    image gi should be pay more attention. For given finite

    difference operator fdi, there exists outliers in the filtered imagegi, which have a significantly influence on the estimated result.To overcome the influence of the outliers on the estimationresult, combined with inter-quartile ranges, the median methodcan be used to the estimation of noise variance.

    Figure 1 Frequency domain characteristics of finite difference operators

    In statistics, an outlier is an observation that is numericallydistant from the rest of the data. Deletion of outlier data is acontroversial practice frowned on by many scientists and

    science instructors. While mathematical criteria provide anobjective and quantitative method for data rejection, they donot make the practice more scientifically or methodologicallysound, especially in small sets or where a normal distributioncannot be assumed. Rejection of outliers is more acceptable inareas of practice where the underlying model of the process

    being measured and the usual distribution of measurementerror are confidently known.

    Estimators capable of coping with outliers are said to berobust. And the median is a robust statistic. Like the median,the inter-quartile range, IQR, is insensitive to outliers. Instatistics, the inter-quartile range (IQR), also called the mid-spread or middle fifty, is a measure of statistical dispersion,

    being equal to the difference between the third and first

    quartiles.Unlike the total range, the inter-quartile range is arobust statistic, having a breakdown point of 25%, and is thusoften preferred to the total range. We can try to back out thenoise variance. To compute an inter-quartile range, like thedistance between the 25% and 75% points. This trims off thetrash at each end, potentially corrupted if there are imagestructures in the image gi. For a normal distribution, where

    V349.1|IQR To avoid outlier issues when there are left image details in

    the residue, actually do this for several different inter-quartileranges, and then take a median.

    IV. EXPERIMENT AND DISCUSSIONTo illustrate that the provided median filter method forimage noise estimation, we apply our noise inference to several

    different applications images. The resulting method, properlyaccounting for image noise, show robust behavior over a widerange of noise conditions.

    In experiments, different application fields of images areconsidered as the ideal object images. And Gaussian noise withzero mean and different variance were added to these objectimages, as shown in Fig. 2. where (a) is cameraman image, 8

    15

  • 8/8/2019 05557339

    4/4

    bit, the size of 256 256 pixels; (b) is lily image, 8 bit,186230 pixels; (c) is westcordorthophoto image, 8 bit,366364.

    (a ) cameraman (b) lily (c) westcordorthophoto

    Figure 2 Noisy images

    First, consider the cameraman image as the test image. Thesample image is preprocessed by the finite different operatorseparately. For each finite difference operator, the image isconvolved along each rows of the test image, then along eachcolumn of the intermediate result. The resulted images areshown in Fig. 3. Apparently, for more high order finitedifference operator, more less image details are left in theresulted image, due to more high cutoff frequency. To

    overcome the influence of the outliers on the noise varianceestimation, median filter method combined with inter-quartileranges is used to the estimation, just as discussed above.

    (1) fd1 (2) fd2 (3) fd3

    (4) fd4 (5) fd5 (6) fd6

    Figure 3 Resulted images with finite difference operator

    For the tested images, the results of the noise varianceestimation are show in table 1. In the table the estimated resultfor the case when the added noise variance is zero is also given,

    because there may exists some noise in the ideal object images,more or less, which should be subtracted from the estimated

    results when consider the estimation error. The estimatedresults show that when the noise level is high the differencebetween true variance and estimated value is large due to lowration of signal to noise. In contrast, when the added noise levelis middle level or low level, the estimated is more accurate. In

    practical computer vision applications, the noise level in thecaptured image is always less than the middle noise level case,so the provide method can be used to the noise estimation forthe computer vision applications.

    TABLE 1 IMAGE NOISE VARIANCE ESTIMATION

    Added2

    V 1 0.1 0.05 0.01 0.005 0.001 0.

    (a)2

    V 0.1935 0.0674 0.0394 0.0097 0.0052 0.0014 9.59e-5

    (b)2

    V 0.1919 0.0648 0.0384 0.0103 0.0056 0.0016 2.7e-4

    (c)2

    V 0.2011 0.0726 0.0432 0.0118 0.0069 0.0027 0.0015

    V. CONCLUSIONSWe present a simple and robust algorithm for image noise

    estimation. The input captured image is assumed to becorrupted by additive zero mean Gaussian noise. To excludestructures or details from contributing to the noise variance

    estimation, a set of finite difference operator is applied first.Then a median filter method provides very accurate noisevariance estimation when the noise level is not high. There is

    no parameter needed to adaptive to the image contents.Simulation results show that the proposed algorithm performswell for different types of images over a large range of noise

    variances. The proposed noise estimation method is simpleand robust. It only required convolutions and median. The

    proposed method of image noise estimation can be used to the

    computer vision applications, and also can be extended toother image processing applications. In the other hand, when

    the noise level is high, the estimation of the supposedapproach is not accurate, which should be improved in thefuture work.

    ACKNOWLEDGMENT

    This work is also partially supported by Research StartFoundation of Tianjin University of Technology and Educationunder Grant No. KYQD08015.

    REFERENCES

    [1] Ce Liu, Richard Szeliski, Sing Bing Kang, C. Lawrence Zitnick, andWilliam T. Freeman, Automatic Estimation and Removal of Noisefrom a Single Image, IEEE TRANSACTIONS ON PATTERNANALYSIS 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 Estimationfrom a Single Image, in IEEE Conf. on Computer Vision and PatternRecognition, 2006.

    [3] A. Amer and E. Dubois, Fast and Reliable Structure-Oriented Video Noise Estimation, IEEE Trans. On Circuits and Systems for VideoTechnology, Vol. 15, No. 1, pp. 113-118, Jan. 2005.

    [4] D. ROBINSON, P. MILANFAR, Fundamental Performance Limits inImage Registration, IEEE Trans. Image Process. 2004, Vol.13,No.9pp.11851199.

    [5] D. Lowe, Object recognition from local scale-invariant features, InProc. IEEE Intl Conf. Computer Vision, pages 11501157, 1999.

    [6]

    S. I. Olsen, Estimation of noise in images: An evaluation, ComputerVision Graphics Image Process. Graphic Models and Image Process,Vol.55, No. 4, pp. 319-323, 1993.

    [7] R. C. Bilcu and M. Vehvilainen, A New Method for Noise Estimationin Images, Proc. IEEE EURASIP International Workshop on NonlinearSignal and Image Processing, Sapporo, Japan, May 18-20, 2005.

    [8] J. Sijbers, D. Poot, A.J. den Dekker and W. Pintjenst, Automaticestimation of the noise variance from the histogram of a magneticresonance image, Phys Med Biol, 2007; pp. 1335-1 348; vol. 52.

    16