Image Processing Reference
In-Depth Information
function template=gaussian_template(winsize,sigma)
%Template for Gaussian averaging
%Usage:[template]=gaussian_template(number, number)
%Parameters: winsize-size of template (odd, integer)
%sigma-variance of Gaussian function
%Author: Mark S. Nixon
%centre is half of window size
centre=floor(winsize/2)+1;
%we'll normalise by the total sum
sum=0;
%so work out the coefficients and the running total
for i=1:winsize
for j=1:winsize
template(j,i)=exp(-(((j-centre)*(j-centre))+((i-centre)*
(i-centre)))/(2*sigma*sigma))
sum=sum+template(j,i);
end
end
%and then normalise
template=template/sum;
Code 3.9
Gaussian template specification
3.5
Other statistical operators
3.5.1
More on averaging
The averaging process is actually a statistical operator since it aims to estimate the mean
of a local neighbourhood. The error in the process is naturally high, for a population of N
samples, the statistical error is of the order of:
error = mean
N
(3.23)
Increasing the averaging operator's size improves the error in the estimate of the mean, but
at the expense of fine detail in the image. The average is of course an estimate optimal for
a signal corrupted by additive Gaussian noise (see Appendix 2.1, Section 8.2). The estimate
of the mean maximised the probability that the noise has its mean value, namely zero.
According to the central limit theorem , the result of adding many noise sources together is
a Gaussian distributed noise source. In images, noise arises in sampling, in quantisation, in
transmission and in processing. By the central limit theorem, the result of these (independent)
noise sources is that image noise can be assumed to be Gaussian. In fact, image noise is not
necessarily Gaussian-distributed, giving rise to more statistical operators. One of these is
 
Search WWH ::




Custom Search