function y=gaussmth(x,sigma)
%GAUSSMTH	Smooth an image with a Gaussian lowpass filter
%	y=gaussmth(x) applies a Gaussian filter with sigma=15
%	y=gaussmth(x,sigma) applies a Gaussian filter with the specified sigma

if nargin<2,
  sigma=15;
end

L=50; %7*sqrt(sigma);
k=-L:L;
w=(exp(-1/(2*sigma^2)*(k.^2)));
y=filter2(w,x);
y=filter2(w',y);
