% IM = blurGauss(Im, sigma)
% returns Im convolved with a 2D gaussian with stdev sigma

function IM = blurGauss(Im, sigma)

stdev_cutoff = 4.0; %% cutoff for # of standard deviations

% debug-------------------------------------------------
% sigma = sigma;
% kernel_size = stdev_cutoff*2.0*sigma
% end debug---------------------------------------------

g = mkGaussian(ceil(stdev_cutoff*2.0*sigma - 1), sigma.^2);

IM = rconv2(g,Im); % original


