📄 drdrawfig29.m
字号:
function dRDrawFig29(OpenNewWindow,HaveTitle,LoadData)
%Test ORT on BandPassed classical Half Dome with n=256; layout of coeff.,plot of rearrenged coeff. and errors, recons. from 100, 50 and 16 coeff.
% 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
%Test ORT on BandPassed classical Half Dome with n=256; layout of coeff.,plot of rearrenged coeff. and errors, recons. from 100, 50 and 16 coeff.
% 1. Make an image
%Original n=256; takes a lot of time!!
n=128;
if LoadData
load 'dRDrawFig24.mat' ansel
image = ansel;
else
image = MakeHalfDomeImage(n,pi/8,1.3,3);%n,33, .77,3);
end
%n=256;
% 1. Make an image
%image = MakeHalfDomeImage(n,pi/8,1.3,3);
%1.2Bandpass it
domain = (-(n/2)):(n/2-1);
[x,y] = meshgrid(domain,domain);
%
r = sqrt(x.^2 + y.^2);
j=5;
sr = r ./ (2^j);
%
Window=BandWindow(sr,3,'bandpass');
Fimage = fftshift(fft2(image));
NewFimage = Fimage .* Window;
NewImg= abs(ifft2(fftshift(NewFimage)));
% 2. Take FRT
theta = FastOrthoRidgeletTransform(NewImg);
% Show surface of Ortho-Ridgelet coefficients
subplot(1,2,1)
imagesc(abs(theta)); colormap((1-hot).^2);
if HaveTitle
title('Ridgelet Transform');
end
axis off;hold on
J=log2(n);
plot([0 (2*n) (2*n) 0 0],[0 0 (2*n) (2*n) 0], '-k');% hold
plot([n n],[0 (2*n)],'-k');
% vertical lines
for is=3:(J-2),
plot([(2^is) 2^is],[0 (2^(is+3))],'-k')
plot([(n + 2^is) (n + 2^is)],[0 (2^(is+3))],'-k')
end
plot([(2^(J-1)) 2^(J-1)],[0 (2^(J+1))],'-k')
plot([(n + 2^(J-1)) (n + 2^(J-1))],[0 (2^(J+1))],'-k')
%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-hot).^2);
if HaveTitle
title('sqrt_+|Ridgelet Transform|');
end
axis off;hold on
plot([0 (2*n) (2*n) 0 0],[0 0 (2*n) (2*n) 0], '-k');% hold
plot([n n],[0 (2*n)],'-k');
% vertical lines
for is=3:(J-2),
plot([(2^is) 2^is],[0 (2^(is+3))],'-k')
plot([(n + 2^is) (n + 2^is)],[0 (2^(is+3))],'-k')
end
plot([(2^(J-1)) 2^(J-1)],[0 (2^(J+1))],'-k')
plot([(n + 2^(J-1)) (n + 2^(J-1))],[0 (2^(J+1))],'-k')
%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
%print -depsc RawFigHD1.eps
% Copyright (c) 2002 Ana Georgina Flesia
%% 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -