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

📄 buildspyr.m

📁 matlab的steel金字塔小波分解源代码
💻 M
字号:
% [PYR, INDICES, STEERMTX, HARMONICS] = buildSpyr(IM, HEIGHT, FILTFILE, EDGES)%% Construct a steerable pyramid on matrix IM.%% HEIGHT (optional) specifies the number of pyramid levels to build. Default% is maxPyrHt(size(IM),size(FILT)). % You can also specify 'auto' to use this value.%% FILTFILE (optional) should be a string referring to an m-file that% returns the rfilters.  (examples: 'sp0Filters', 'sp1Filters',% 'sp3Filters','sp5Filters'.  default = 'sp1Filters'). EDGES specifies% edge-handling, and defaults to 'reflect1' (see corrDn).%% 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.% See the function STEER for a description of STEERMTX and HARMONICS.% Eero Simoncelli, 6/96.% See http://www.cis.upenn.edu/~eero/steerpyr.html for more% information about the Steerable Pyramid image decomposition.function [pyr,pind,steermtx,harmonics] = buildSpyr(im, ht, filtfile, edges)%-----------------------------------------------------------------%% DEFAULTS:if (exist('filtfile') ~= 1)  filtfile = 'sp1Filters';endif (exist('edges') ~= 1)  edges= 'reflect1';endif (isstr(filtfile) & (exist(filtfile) == 2))   [lo0filt,hi0filt,lofilt,bfilts,steermtx,harmonics] = eval(filtfile);else  fprintf(1,'\nUse buildSFpyr for pyramids with arbitrary numbers of orientation bands.\n');  error('FILTFILE argument must be the name of an M-file containing SPYR filters.');endmax_ht = maxPyrHt(size(im), size(lofilt,1));if ( (exist('ht') ~= 1) | (ht == 'auto') )  ht = max_ht;else  if (ht > max_ht)    error(sprintf('Cannot build pyramid higher than %d levels.',max_ht));  endend%-----------------------------------------------------------------hi0 = corrDn(im, hi0filt, edges);lo0 = corrDn(im, lo0filt, edges);[pyr,pind] = buildSpyrLevs(lo0, ht, lofilt, bfilts, edges);pyr = [hi0(:) ; pyr];pind = [size(hi0); pind];  

⌨️ 快捷键说明

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