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

📄 medlift2.m

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

% 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)) = medlift(medlift(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)) = medlift(medlift(X(1:N(1),1:N(2)),-1,2),-1,1);
   end
end

⌨️ 快捷键说明

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