Code covered by the BSD License  

Highlights from
Noise variance estimation

4.5
4.5 | 2 ratings Rate this file 44 Downloads (last 30 days) File Size: 2.68 KB File ID: #25645 Version: 1.5
image thumbnail

Noise variance estimation

by

Damien Garcia (view profile)

 

23 Oct 2009 (Updated )

EVAR estimates the noise variance from 1-D to N-D data

| Watch this File

File Information
Description

Suppose that you have a signal Y (Y can be a time series, a parametric surface or a volumetric data series) corrupted by a Gaussian noise with unknown variance. It is often of interest to know more about this variance. EVAR(Y) thus returns an estimated variance of the additive noise.

EVAR provides better results if the original function (i.e. the function without noise) is relatively smooth i.e. has continuous derivatives up to some order. Several tests, however, showed that EVAR works very well even with multiple discontinuities.

Note: EVAR only works with evenly-gridded data in one and higher dimensions.

Here are two examples:

%-- Let us estimate the noise variance from a corrupt signal --
% First create a time signal
t = linspace(0,100,1e6);
y = cos(t/10)+(t/50);
% Make this signal corrupted by a Gaussian noise of variance 0.02
var0 = 0.02; % noise variance
yn = y + sqrt(var0)*randn(size(y));
% Now estimate the variance with EVAR and compare with the "true" value
evar(yn)

%-- Now, let us estimate the noise variance from volumetric data --
% Create a volume array
[x,y,z] = meshgrid(-2:.2:2,-2:.2:2,-2:.2:2);
f = x.*exp(-x.^2-y.^2-z.^2);
% Make these data corrupted by a Gaussian noise of variance 0.5
var0 = 0.5; % noise variance
fn = f + sqrt(var0)*randn(size(f));
% Estimate the variance with EVAR and compare with the "true" value
evar(fn)

------
Several tests are also given in:
http://www.biomecardio.com/matlab/evar.html
-----

Acknowledgements

Estimatenoise inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
12 Mar 2015 Vincent  
12 Mar 2015 Vincent

Hi,
I just downloaded the file and port it to work with Octave.
But noise variance is half the true variance.
Any idea about modifications (not multiply by 2 ;) ) to be closer the true noise variance ?
Thanks

Vincent

Comment only
06 Dec 2009 John D'Errico

John D'Errico (view profile)

 
Updates
29 Oct 2009 1.1

A better description

04 Dec 2009 1.2

optimset options have been modified

17 Mar 2010 1.3

The upper and lower bounds for FMINBND are calculated according to the tensor rank of the input array

10 Jun 2010 1.4

A minor improvement

06 May 2013 1.5

DCTN function is now included in EVAR

Contact us