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

📄 backsamp.m

📁 PDTDFB toolbox The filter bank is described in: The Shiftable Complex Directional Pyramid—Pa
💻 M
字号:
function y = backsamp(y)
% BACKSAMP    Backsampling the subband images of the directional filter bank
%
%   y = backsamp(y)
%
% Input and output are cell vector of dyadic length
%
% This function is called at the end of the DFBDEC to obtain subband images 
% with overall sampling as diagonal matrices
%
% See also: DFBDEC

% Number of decomposition tree levels
n = log2(length(y));

if (n ~= round(n)) | (n < 1)
    error('Input must be a cell vector of dyadic length');
end

if n == 1
    % One level, the decomposition filterbank shoud be Q1r
    % Undo the last resampling (Q1r = R2 * D1 * R3)
    for k = 1:2
	y{k} = resamp(y{k}, 4);
	y{k}(:, 1:2:end) = resamp(y{k}(:, 1:2:end), 1);
	y{k}(:, 2:2:end) = resamp(y{k}(:, 2:2:end), 1);	
    end    
    
elseif n > 2    
    N = 2^(n-1);
    
    for k = 1:2^(n-2)
	shift = 2*k - (2^(n-2) + 1);
	
	% The first half channels
	y{2*k-1} = resamp(y{2*k-1}, 3, shift);
	y{2*k} = resamp(y{2*k}, 3, shift);
	
	% The second half channels
	y{2*k-1+N} = resamp(y{2*k-1+N}, 1, shift);
	y{2*k+N} = resamp(y{2*k+N}, 1, shift);	
    end
end

⌨️ 快捷键说明

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