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

📄 func_treemask.m

📁 EZW matlab 源码用于图像压缩试验
💻 M
字号:
function mask = func_treemask(x,y,dim);

%  x, y is the position in the matrix of the node where the EZW tree
%  should start; top left is x=1 y=1
%
%  dim is the dimension of the mask (should be the same dimension as
%  the wavelet data)
%
%  Copyright 2002  Paschalis Tsiaflakis, Jan Vangorp

mask = zeros(dim);

x_min = x;
x_max = x;
y_min = y;
y_max = y;

while(x_max <= dim & y_max <= dim),
   mask(x_min:x_max, y_min:y_max) = 1;
   
   % calculate new subset
   x_min = 2*x_min - 1;
   x_max = 2*x_max;
   y_min = 2*y_min - 1;
   y_max = 2*y_max;
end

⌨️ 快捷键说明

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