📄 compare_nla.m
字号:
% Compare NLA between FRIT and WAVE2% Object image of size 257x257im = imread('obj.png'); im = double(im) / 256;% Parameterswname = 'sym4';nlevs = 8;ncoefs = 2.^[5:8];% FRIT frit_im = frit_nla(im, wname, ncoefs); % WAVE2wave_im = wave2_nla(im(1:end-1,1:end-1), wname, nlevs, ncoefs);% range = [0, 1];range = [-0.5, 1];for k = 1:length(ncoefs) % WAVE2 figure(1), clf; set(gcf, 'Name', 'DWT2') colormap('gray'); imagesc(wave_im{k}, range); axis image, axis off, title(sprintf('%d coefficients (SNR = %0.2f dB)', ... ncoefs(k), SNR(im(1:end-1,1:end-1), wave_im{k}))); % FRIT figure(2), clf; set(gcf, 'Name', 'FRIT') colormap('gray'); imagesc(frit_im{k}, range); axis image, axis off, title(sprintf('%d coefficients (SNR = %0.2f dB)', ... ncoefs(k), SNR(im, frit_im{k}))); disp('Hit any key to continue'); pauseend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -