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

📄 curveletquzaochonggou.m

📁 使用curvelet变换对一幅图像变换
💻 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 + -