资源简介
基于小波分析的小波熵源代码
用于图像处理及特征识别
代码片段和文件信息
n = 128;
n0 = [];
name = ‘lena‘;
if strcmp(name ‘polygons_blurred‘)
n0 = n;
end
M = load_image(name n0);
M = rescale( crop(Mn) );
options.w = 8; % size of the square
options.T = 10/256; % threshold for lagrangian computation
options.n = n;
options.geometry_weight = 0; % price to pay for the geometry
% set to 0 or 1
options.ti = 1;
options.use_dct = 1; % to take care of regular squares
if options.ti==1
options.use_dct = 0;
end
%% compute the best geometry in each square
[GL] = compute_geometry( M options );
clf;
plot_geometry(G M options);
%% perform the transform
options.Jhaar = log2(options.w^2); % number of scale for the bandletization
options.dir = 1; % fwd transform
评论
共有 条评论