📄 conv2sep.m
字号:
function result = conv2sep(im,rowfilt,colfilt,shape)
% CONV2SEP: Separable convolution using conv2.
%
% result=conv2sep(im,rowfilt,colfilt,shape)
%
% im - input image.
% rowfilt - 1d filter applied to the rows
% colfilt - 1d filter applied to the cols
% shape - 'full', 'same', or 'valid' (see doc for conv2).
%
% Example: foo=conv2sep(im,[1 4 6 4 1],[-1 0 1],'valid');
if ~exist('shape')
shape='full';
end
rowfilt=rowfilt(:)';
colfilt=colfilt(:);
tmp = conv2(im,rowfilt,shape);
result = conv2(tmp,colfilt,shape);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -