📄 drpdrawfig12.m
字号:
function dRPDrawFig12(OpenNewWindow,HaveTitle,LoadData)
%DrawFig 12: show the rp domain with the different bases + entropy Measure
if nargin<3
LoadData=0;
end
if nargin<2
HaveTitle=1;
end
if nargin<1
OpenNewWindow=1;
end
if OpenNewWindow
figure
end
LoadData=0;
% build several types of Bases
D = [3,3];
btree1 = BuildRPBasisTree2(D,'Diadic1',[3]);
btree2 = BuildRPBasisTree2(D,'Vertical',3);
btree3 = BuildRPBasisTree2(D,'FIO',[1]);
btree4 = BuildRPBasisTree2(D,'Congruent',D);
noBases = 4;
plotDim = [2 2];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% IMAGE 1: concentrated in angular (oriented texture)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%im1 = readImage
im1 = imread('linesTexture.tif');
im=double(im1(1:64,190:190+63));
im = im ./max(im(:));
img0 = im - mean(mean(im));
RPFTGlobal= fft2_rp(img0);
RPFTGlobalShow = RPFTGlobal([2:size(RPFTGlobal,1)/2+1,size(RPFTGlobal,1)/2+1:size(RPFTGlobal,1)],:);
% show the rp domain with the different bases + entropy Measure
Entropy = 'N(eps)';
par = 1.5;
subplot(plotDim(1),plotDim(2),1);
for (i = 1:noBases)
subplot(plotDim(1),plotDim(2),i);
AutoImageInv(abs(RPFTGlobalShow));
Polrax = axis; hold on;
eval(['btree = btree' int2str(i) ';']);
PlotRPPartition(btree,'y',Polrax,D);
% calculate statistics
coef = FPT2_RPkt(btree,img0,D);
e = CalcEntropy(coef,Entropy,par);
if HaveTitle
title(['Entropy = ' num2str(e)]);
end
set(gca,'XTick',[]);
set(gca,'YTick',[]);
eval(['coef' int2str(i) '=coef;']);
eval(['e' int2str(i) '=e;']);
end;
colormap(jet)%% 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 + -