?? curveletquzaochonggou.m
字號:
disp(' ');
disp('fdct_usfft_demo_disp.m -- Displays the curvelet coefficients of an image');
disp(' ');
disp('1. The low frequency (coarse scale) coefficients are stored at');
disp(' the center of the display.')
disp(['2. The Cartesian concentric coronae show the coefficients at different']);
disp(' scales; the outer coronae correspond to higher frequencies.');
disp(['3. There are four strips associated to each corona, corresponding to']);
disp(' the four cardinal points; these are further subdivided in angular panels.');
disp(['4. Each panel represent coefficients at a specified scale and along']);
disp(' the orientation suggested by the position of the panel.');
disp(' ');
X=imread('12345.jpg');
colormap gray; imagesc(X);
%forward curvelet transform
disp('Take curvelet transform: fdct_usfft');
tic; C = fdct_usfft(X,0); toc;
%generate curvelet image (a complex array)
img = fdct_usfft_dispcoef(C);
figure;
colormap gray;
imagesc(abs(img));
% Get threshold value
pctg=0.1;
cfs =[];
for s=1:length(C)
for w=1:length(C{s})
cfs = [cfs; abs(C{s}{w}(:))];
end
end
cfs = sort(cfs); cfs = cfs(end:-1:1);
nb = round(pctg*length(cfs));
cutoff = cfs(nb);
% Set small coefficients to zero
for s=1:length(C)
for w=1:length(C{s})
C{s}{w} = C{s}{w} .* (abs(C{s}{w})>cutoff);
end
end
disp('Take inverse curvelet transform: ifdct_usfft');
tic; Y = ifdct_usfft(C,0); toc;
figure;
colormap gray;
imagesc(abs(Y));
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -