gaussianMask.m
资源名称:Snakes.rar [点击查看]
上传用户:zlding2008
上传日期:2013-05-13
资源大小:1914k
文件大小:0k
源码类别:
2D图形编程
开发平台:
Matlab
- function M = gaussianMask(k,s)
- % k: the scaling factor
- % s: standard variance
- R = ceil(3*s); % cutoff radius of the gaussian kernal
- for i = -R:R,
- for j = -R:R,
- M(i+ R+1,j+R+1) = k * exp(-(i*i+j*j)/2/s/s)/(2*pi*s*s);
- end
- end