drdrawfig05.m

来自「beamlet变化的工具箱」· M 代码 · 共 94 行

M
94
字号
function dRDrawFig05(OpenNewWindow,HaveTitle,LoadData)
% DrawFig5.  Ridgelet Transform on HalfDome
% 
% Figure 5a and 5b. The ridgelet coefficients of HalfDome.
% 
% 1. Make an image

% if you don't want to process it, set LoadData=1

if nargin<3
    LoadData=0;
end

if nargin<2
    HaveTitle=1;
end

if nargin<1
    OpenNewWindow=1;
end

if OpenNewWindow
    figure
end


n=128;
if LoadData
    load 'dRDrawFig24.mat' ansel 
else
ansel = MakeHalfDomeImage(n,pi/8,1.3,3);
end


% 2. Take FRT
theta = FastRidgeletTransform(ansel);

% Show surface
subplot(1,2,1)
imagesc(abs(theta)); colormap(1-gray);
title(' Ridgelet Transform of HalfDome')
hold on

% 3. DrawRidgeGrid: Depict subband layout of ridgelet coefficients

plot([0 (2*n) (2*n) 0 0],[0 0 (2*n) (2*n) 0], '-k');% hold
plot([n n],[0 (2*n)],'-k');

J = round(log2(n));

%horizontal lines
for js=3:(J-1),
	plot([0 n],[(2^(js+1)) (2^(js+1))],'-k')
	plot([n (2*n)],[(2^(js+1)) (2^(js+1))],'-k')
end
axis ij;  axis square;axis off
hold off

subplot(1,2,2)

imagesc(sqrt(abs(theta))); colormap(1-gray);
title('sqrt|Ridgelet Transform| of HalfDome')
hold on

% 3. DrawRidgeGrid: Depict subband layout of ridgelet coefficients

plot([0 (2*n) (2*n) 0 0],[0 0 (2*n) (2*n) 0], '-k');% hold
plot([n n],[0 (2*n)],'-k');

J = round(log2(n));

%horizontal lines
for js=3:(J-1),
	plot([0 n],[(2^(js+1)) (2^(js+1))],'-k')
	plot([n (2*n)],[(2^(js+1)) (2^(js+1))],'-k')
end
axis ij;  axis square;axis off
hold off

%% Part of BeamLab Version:200% Built:Friday,23-Aug-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%%% Part of BeamLab Version:200% Built:Saturday,14-Sep-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%

⌨️ 快捷键说明

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