Gaussian FIlter in Frequency Domain

by

 

This filter use to create a Gaussian Filter to be used in frequency domain filterin.

gaussian.m
[M N ] = size(img); % Take the size of image
gfilter=zeros(M,N);
sigma=100; % Sigma Values for Gaussian Filter
    for i = 1:M
            for j = 1:N
		    dist= (i-M/2)^2 + (j-N/2)^2;
		    gfilter(i,j) = 255*exp(-(dist)/(2*(sigma)^2));
            end
    end

Contact us