lprec1.m

来自「This toolbox contains Matlab files that 」· M 代码 · 共 45 行

M
45
字号
function x = lprec1(c, d, nd, h, g, extmod)% LPREC1   One-level Laplacian pyramid reconstruction%%	x = lprec1(c, d, nd, h, g, extmod)%% Input:%   c:      coarse signal at half size%   d:      detail signal at full size%   nd:     number of dimension of input signals%   h, g:   two biorthogonal 1-D lowpass filters%   extmod: [optional] extension mode (default is 'per')%% Output:%   x:      reconstructed signal%% Note:     This uses a new reconstruction method by Do and Vetterli,%           "Framming pyramids", IEEE Trans. on Sig Proc., Sep. 2003.%% See also:	LPDEC1%% Note:     1-D input signals have to be in column vectorsif ~exist('extmod', 'var')    extmod = 'per';end% First, filter and downsample the detail imager = d;for dim = 1:nd    r = filtdn(r, h, dim, extmod, 0);end% Then subtract the result from the coarse signalp = c - r;% Even size filter needs to be adjusted to obtain perfect reconstructionadjust = mod(length(g) + 1, 2); % Then upsample and filterfor dim = 1:nd    p = upfilt(p, g, dim, extmod, adjust);end% Final combinationx = p + d;

⌨️ 快捷键说明

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