⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aconv2.m

📁 斯坦福大学的小波的工具箱 比matlab自带的工具箱更完善
💻 M
字号:
function out = aconv2(img,f1,f2,s1,s2)
% aconv2 -- 2-D seperable convolution
%  Usage
%    out = aconv2(img,f1,f2,s1,s2);
%  Inputs
%    img    m x n image, 
%    f1     column filter
%    f2     row filter
%    s1     column shift, default 0
%    s2     row shift, default 0
%  Output
%    out    convolved image with column filter f1 and row filter f2
%  Examples
%     Test_aconv2.m
%  See Also
%     FWT2_Dyad
% 
if nargin < 5,
	s2 = 0;
end;
if nargin < 4,
	s1 = 0;
end;
f1=f1(:)'; f2=f2(:)'; 
[m, n] = size(img);
out = img;

% column convolution
for col = 1:n,
	out(:,col) = aconv(f1,out(:,col)')';
end;
for times = 1:s1,
	out = DownShift(out);
end;

% row convolution
for row = 1:m,
	out(row,:) = aconv(f2,out(row,:));
end;
for times = 1:s2,
	out = RightShift(out);
end;
%for times = 1:s1,
%	out = DownShift(out);
%end;
%
% Copyright (c) 1996. Xiaoming Huo
% 
    
    
%   
% Part of WaveLab Version 802
% Built Sunday, October 3, 1999 8:52:27 AM
% This is Copyrighted Material
% For Copying permissions see COPYING.m
% Comments? e-mail wavelab@stat.stanford.edu
%   
    

⌨️ 快捷键说明

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