📄 lprec1.m
字号:
function x = lprec1(c, d, h, g, extmod)% LPREC1 One-level Laplacian pyramid reconstruction%% x = lprec1(c, d, h, g)%% Input:% c: coarse signal at half size% d: detail signal at full size% 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: LPDEC1if ~exist('extmod', 'var') extmod = 'per';endnd = ndims(c);% 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -