?? shili71.m
字號:
h0=figure('toolbar','none',...
'position',[198 56 350 468],...
'name','實例71');
h1=axes('parent',h0,...
'position',[0.3 0.45 0.5 0.5],...
'visible','off');
P=phantom(256);
imshow(P)
b1=uicontrol('parent',h0,...
'units','points',...
'tag','b1',...
'style','pushbutton',...
'string','變換一',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[30 100 50 20],...
'callback',[...
'cla,',...
'k=1;,',...
'theta1=0:10:170;,',...
'R1=radon(P,theta1);,',...
'imagesc(R1),',...
'colormap(hot),',...
'colorbar']);
b2=uicontrol('parent',h0,...
'units','points',...
'tag','b2',...
'style','pushbutton',...
'string','變換二',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[100 100 50 20],...
'callback',[...
'cla,',...
'k=2;,',...
'theta2=0:5:175;,',...
'R2=radon(P,theta2);,',...
'imagesc(R2),',...
'colormap(hot),',...
'colorbar']);
b3=uicontrol('parent',h0,...
'units','points',...
'tag','b3',...
'style','pushbutton',...
'string','變換三',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[170 100 50 20],...
'callback',[...
'cla,',...
'k=3;,',...
'theta3=0:2:178;,',...
'R3=radon(P,theta3);,',...
'imagesc(R3),',...
'colormap(hot),',...
'colorbar']);
b4=uicontrol('parent',h0,...
'units','points',...
'tag','b4',...
'style','pushbutton',...
'string','原始圖像',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[50 50 70 30],...
'callback',[...
'cla,',...
'if k==1,',...
'I1=iradon(R1,10);,',...
'imshow(I1),',...
'end,',...
'if k==2,',...
'I2=iradon(R2,5);,',...
'imshow(I2),',...
'end,',...
'if k==3,',...
'I3=iradon(R3,2);,',...
'imshow(I3),',...
'end']);
b5=uicontrol('parent',h0,...
'units','points',...
'tag','b5',...
'style','pushbutton',...
'string','關閉',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[150 50 70 30],...
'callback','close');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -