function k = gaussianKernel(sigma) %return the vector ([1 2 1] ./ 4) convolved with itself (2*sigma^2 - 1) times( %to approximate a Gaussian k_base = [1 2 1]/4; k=k_base; for i=1:round(2*sigma^2 - 1) k = conv(k,k_base); end