-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathshili71.m
More file actions
82 lines (82 loc) · 2.23 KB
/
shili71.m
File metadata and controls
82 lines (82 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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');