ddown.m

来自「PDTDFB toolbox The filter bank is des」· M 代码 · 共 39 行

M
39
字号
function y = ddown(x, step, phase)% DUP   Diagonal Downsampling%%	y = ddown(x, step, [phase])%% Input:%	x:	input image%	step:	upsampling factors for each dimension which should be a%		2-vector%	phase:	[optional] to specify the phase of the input image which%		should be less than step, (default is [0, 0])%		If phase == 'minimum', a minimum size of upsampled image%		is returned%% Output:%	y:	diagonal upsampled image%% See also:	DUP% Note : complement the DUP function in contourlet toolboxif ~exist('phase', 'var')    phase = [0, 0];endsx = size(x);y = zeros(sx./step);y = x(1+phase(1):step(1):end, 1+phase(2):step(2):end);% if lower(phase(1)) == 'm'%     y = zeros((sx - 1) .* step + 1);    %     y(1:step(1):end, 1:step(2):end) = x;%     % else%     y = zeros(sx .* step);%     y(1+phase(1):step(1):end, 1+phase(2):step(2):end) = x;% end

⌨️ 快捷键说明

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