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

📄 reconlpyr.m

📁 matlab的steel金字塔小波分解源代码
💻 M
字号:
% RES = reconLpyr(PYR, INDICES, LEVS, FILT2, EDGES)%% Reconstruct image from Laplacian pyramid, as created by buildLpyr.%% PYR is a vector containing the N pyramid subbands, ordered from fine% to coarse.  INDICES is an Nx2 matrix containing the sizes of% each subband.  This is compatible with the MatLab Wavelet toolbox.%% LEVS (optional) should be a list of levels to include, or the string% 'all' (default).  The finest scale is number 1.  The lowpass band% corresponds to lpyrHt(INDICES)+1.%% FILT2 (optional) can be a string naming a standard filter (see% namedFilter), or a vector which will be used for (separable)% convolution.  Default = 'binom5'.  EDGES specifies edge-handling,% and defaults to 'reflect1' (see corrDn).% Eero Simoncelli, 6/96function res = reconLpyr(pyr, ind, levs, filt2, edges)if (nargin < 2)  error('First two arguments (PYR, INDICES) are required');end  %%------------------------------------------------------------%% DEFAULTS:if (exist('levs') ~= 1)  levs = 'all';endif (exist('filt2') ~= 1)  filt2 = 'binom5';endif (exist('edges') ~= 1)  edges= 'reflect1';end%%------------------------------------------------------------maxLev =  1+lpyrHt(ind);if strcmp(levs,'all')  levs = [1:maxLev]';else  if (any(levs > maxLev))    error(sprintf('Level numbers must be in the range [1, %d].', maxLev));  end  levs = levs(:);endif isstr(filt2)  filt2 = namedFilter(filt2);endfilt2 = filt2(:);res_sz = ind(1,:);if any(levs > 1)  int_sz = [ind(1,1), ind(2,2)];    nres = reconLpyr( pyr(prod(res_sz)+1:size(pyr,1)), ...      ind(2:size(ind,1),:), levs-1, filt2, edges);    if (res_sz(1) == 1)    res = upConv(nres, filt2', edges, [1 2], [1 1], res_sz);  elseif (res_sz(2) == 1)    res = upConv(nres, filt2, edges, [2 1], [1 1], res_sz);  else    hi = upConv(nres, filt2, edges, [2 1], [1 1], int_sz);    res = upConv(hi, filt2', edges, [1 2], [1 1], res_sz);  endelse    res = zeros(res_sz);endif any(levs == 1)  res = res + pyrBand(pyr,ind,1);end

⌨️ 快捷键说明

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