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

📄 maxlift2.m

📁 matlab程序
💻 M
字号:
function X = maxlift2(X, Level)
%MAXLIFT2  2D max-lifting morphological wavelet transform.
%   Y = MAXLIFT2(X,L) computes the L level decomposition of a image
%   X using the tensor-product 2D max-lifting morphological wavelet.
%   The image dimensions must be divisible by 2^L.
%
%   MAXLIFT2(X,-L) is the inverse transform, reversing L levels.
%
%   Example:
%   Y = maxlift2(X,3);   % Perform 3 levels of decomposition on X
%   R = maxlift2(Y,-3);  % Recover X from Y
%
%   See also MAXLIFT.

% Pascal Getreuer 2005

if nargin < 2, error('Not enough input arguments.'); end
if rem(size(X),pow2(abs(Level))), error('Invalid input size.'); end

if Level > 0
   for k = 1:Level
      N = size(X)*pow2(1-k);
      X(1:N(1),1:N(2)) = maxlift(maxlift(X(1:N(1),1:N(2)),1,1),1,2);
   end
elseif Level < 0
   for k = Level:-1
      N = size(X)*pow2(k+1);
      X(1:N(1),1:N(2)) = maxlift(maxlift(X(1:N(1),1:N(2)),-1,2),-1,1);
   end
end

⌨️ 快捷键说明

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