convolvegaussianline.m

来自「cell migration resource imaging icsmatla」· M 代码 · 共 12 行

M
12
字号
function convolvedMatrix=convolveGaussianLine(matrix, filterSize, radius)

% The standard deviation is the parameter that defines the Gaussian in
% fspecial. Exp(-x^2/2/s^2).
% The the n_by_n matrix for the filter. Considering the pixel size
% 0.1microns => 5 pixels is the radius of one particle. 20 sounds
% reasonable for n. So, standard dev=2.5

standardDev=radius/2;

filter=fspecial('gaussian',[1 filterSize], standardDev);
convolvedMatrix=imfilter(double(matrix),filter,'circular','conv');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?