%% 学习目标: radon逆变换实现图像重建
P = phantom(256); %原始图像
theta1 = 0:10:170; [R1,xp] = radon(P,theta1);
theta2 = 0:5:175; [R2,xp] = radon(P,theta2);
theta3 = 0:2:178; [R3,xp] = radon(P,theta3);
%% 显示Radon变换结果
subplot(3,1,1), imagesc(theta1,xp,R1),title('theta1 = 0:10:170')
colormap(hot); colorbar
xlabel('\theta'); ylabel('x\prime');
subplot(3,1,2), imagesc(theta2,xp,R2),title('theta2 = 0:5:175')
colormap(hot); colorbar
xlabel('\theta'); ylabel('x\prime');
subplot(3,1,3), imagesc(theta3,xp,R3),title('theta3 = 0:2:178')
colormap(hot); colorbar
xlabel('\theta'); ylabel('x\prime');
%% Radon逆变换
I1 = iradon(R1,10);
I2 = iradon(R2,5);
I3 = iradon(R3,2);
%% 显示Radon重构图像
figure(2), subplot(2,2,1),imshow(P),title('原始图像')
subplot(2,2,2), imshow(I1),title('theta=10')
subplot(2,2,3), imshow(I2),title('theta=5')
subplot(2,2,4), imshow(I3),title('theta=2')
%% 大仙QQ:1960009019
%% 在线教育微信公众号:大仙一品堂