convolveairy.m

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

M
16
字号
function convolvedMatrix=convolveAiry(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


[X Y] = meshgrid(linspace(-7.0156,7.0156,filterSize));

filterCoords = sqrt(X.^2+Y.^2);
filter=airy2(filterCoords);
filter(find(filterCoords>7.02)) = 0;

convolvedMatrix=imfilter(double(matrix),filter,'circular','conv');

⌨️ 快捷键说明

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