Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
What is the normalization factor of Gaussian function

Subject: What is the normalization factor of Gaussian function

From: Chandra Shaker Balure

Date: 6 Feb, 2014 04:14:09

Message: 1 of 2

Q: What is the normalization factor of Gaussian function.

Description: In general the equation of gaussian function is written as EXP[-(X^2+Y^2)/2*sig*sig]. and the central pixel is co-ordinated as (0,0), and all the values in diamond locations are same, similarly for the values at diagonal locations. Now since the literature says that the sum of all the pixel values in the gaussian filter should be summed up to '1'. then for this we need to normalize the values of the filter which we have created.

Doubt: In some places (text books) I have seen that the normalization is done using multiplied each filter value by [1/2*pi*sig*sig] for a 2D filter. But to satisfy the summation equal to '1' property we have to multiply each filter value by [sum(all pixel of filter)]. NOW, which is correct to use, as MATLAB 'fspecial' function uses the later one.

I need some concrete justification. Thank you in anticipation.

Subject: What is the normalization factor of Gaussian function

From: Bjorn Gustavsson

Date: 6 Feb, 2014 09:18:08

Message: 2 of 2

"Chandra Shaker Balure" wrote in message <lcv26h$dpm$1@newscl01ah.mathworks.com>...
> Q: What is the normalization factor of Gaussian function.
>
> Description: In general the equation of gaussian function is written as EXP[-(X^2+Y^2)/2*sig*sig]. and the central pixel is co-ordinated as (0,0), and all the values in diamond locations are same, similarly for the values at diagonal locations. Now since the literature says that the sum of all the pixel values in the gaussian filter should be summed up to '1'. then for this we need to normalize the values of the filter which we have created.
>
> Doubt: In some places (text books) I have seen that the normalization is done using multiplied each filter value by [1/2*pi*sig*sig] for a 2D filter. But to satisfy the summation equal to '1' property we have to multiply each filter value by [sum(all pixel of filter)]. NOW, which is correct to use, as MATLAB 'fspecial' function uses the later one.
>
> I need some concrete justification. Thank you in anticipation.
>
The 1/(2*pi*sig^2) normalization is simply the value of the 2-D integral over the whole plane - from -inf to inf in both x and y direction. Your 2-D filter is a 2-D matrix of a chosen size with filter coefficients approximating a Gaussian with some width, the filtering is done with those filter coefficients - so the normalization should be done with the sum of the filter coefficients - otherwise the discrete convolution operation of the filter would not preserve the total intensity of the image.

HTH

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us