Radon变换的matlab实现_第1页
Radon变换的matlab实现_第2页
Radon变换的matlab实现_第3页
Radon变换的matlab实现_第4页
Radon变换的matlab实现_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、§ 5.4 Radon变换5.4.4 Matlab 中的实现 4例、对一个正方形黑框进行 Radon 变换。I=zeros(200,200);I(100:170,100:170)=1;% to produce a square black frameFigure,imshow(I) ;title('origine image') ; to do Radon transform of 0 and 25 degreeR,xp=radon(I,0 25);% to calculate the Radon transform of the black frame,% R sh

2、ows the Radon transform values for theta angles: % 0 and 25 degree;% xp矢量表示沿?'轴相应的坐标值subplot(1,3,2),plot(xp,R(:,1);title('R(OS)(xprime)');subplot(1,3,3),plot(xp,R(:,2);title('R(25Ao)(xprime)');origins image-200 0 20080706050403D20100200 0 200% to do Radon tran sform from 0 degree

3、 to 180 degreetheta=0:180;% to define an an gular vector from 0 to 180 degreeR,xp=radon(l,theta); % to calculate Radon Transform from 0 to 180figure, imagesc(theta,xp,R);% IMAGESC(.) is the same as IMAGE(.) except the data is % scaled to use the full colormap 也就是说,imagesc能自动 %调整值域范围title('R_thet

4、a(Xprime)');xlabel('theta(degree)');ylabel('X'prime');set(gca,'Xtick',0:20:180);% to set the properties of axiscolormap(hot);2colorbar; %显示颜色条,将图像中使用的色彩排列在图像旁边-100-5D050100020406080100120140160180©(degree)908070GO4030203#MATLAB中的逆Radon变换函数,是利用滤波后向投影算法来 计算逆变换R=ira

5、do n( R,theta)其中R=radon(l,theta)是图像I的Radon变换:1) 在求逆变换时,利用R各列中的投影来构造图像I的近似值;2) 使用的投影数越多,所获得的图像越接近原始图像;3) theta矢量必须是固定增量的均匀矩阵,即每次角度增加值为常数,若角度增加值已知,可以作为参数取代theta值传入 iradon 函数;4)投影值含有噪声时,可以通过加窗消去高频噪声:IR=iradon(R,theta,'Shepp-Logan');% 采用 Shepp-Logan 窗做滤波: The Shepp-Logan filter multiplies% the R

6、am-Lak filter by a sinc function.IR=iradon(R,theta,' Cosine');% 采用 Cosine 窗做滤波: The cosine filter multiplies the Ram-Lak% filter by a cosine function.IR=iradon(R,theta, 'Hamming');% 采用 Hamming 窗做滤波: The Hamming filter multiplies the% Ram-Lak filter by a Hamming window.IR=iradon(R,the

7、ta,0.90);% iradon 允许指定归一化频率 D ,高于 D 的滤波器响应为零,整 % 个滤波器压缩在 0,D 的范围内。假若系统不含高频信息而存在 % 高频噪声时可用来完全拟制噪声,又不会影响图像重建。例、从一个简单图像的投影重建图像在 Matlab 图像处理工具箱中的 Phantom 函数,可以产生 Shepp Logan 的大脑图, 该图作为一个测试图, 可反映人大脑的许多性质。P=phantom(256);% P = PHANTOM(DEF,N) generates an image of a head phantom that can % be usedto test th

8、e numerical accuracy of RADON and IRADON or other % 2-D reconstruction algorithms. P is a grayscaleintensity image that % consists of one large ellipse (representing the brain) containing % several smaller ellipses (representingfeatures in the brain). figure,imshow(P);title('image of a head phan

9、tom of Shepp-Logg');theta1=0:10:170;R1,xp=radon(P,theta1);% to calculate radon transform of R1 which includes 18 angles theta2=0:5:175;R2,xp=radon(P,theta2);% to calculate radon transform of R2 which includes 36 angles theta3=0:2:178;R3,xp=radon(P,theta3);% to calculate radon transform of R3 whi

10、ch includes 90 angles figure,imagesc(theta1,xp,R1);% IMAGESC(.) is the same as IMAGE(.) except the data is% scaled to usethe full colormap.title('R_theta(Xprime)'); title('radon transform of 18 angles for Shepp-logan head phanto '); xlabel('theta(degree)');ylabel('Xprime&

11、#39;); set(gca,'Xtick',0:20:180); % to set the properties of axis colormap(hot);colorbar;figure, imagesc(theta2,xp,R2); title('radon transform of 36 angles for Shepp-logan head phanto'); xlabel('theta(degree)');ylabel('Xprime');set(gca,'Xtick',0:20:180);% to s

12、et the properties of axiscolormap(hot);colorbar;figure, imagesc(theta3,xp,R3);title('radon transform of 90 angles for Shepp-logan head phanton'); xlabel('theta(degree)');ylabel('Xprime');set(gca,'Xtick',0:20:180);% to set the properties of axiscolormap(hot);colorbar;I

13、R1=iradon(R1,theta1,0.85); % 指定归一化频率为 0。 85 figure,imshow(IR1);title('reconstruction for radon transform of 18 angles');IR2=iradon(R2,theta2,0.85);figure,imshow(IR2);title('reconstruction for radon transform of 36 angles');IR3=iradon(R3,theta3,0.85);figure,imshow(IR3);title('rec on structi on for radon tran sform of 90 an gles');7#image of a head phantom nf Shepp-Logg#radon transform of 18 angles for Shepp-logan head pharito02040 BO 80100120140160©(degree)-60-505这个图的外部椭圆形是头骨,内部的椭圆形是大脑的内部特征或者是肿瘤。150100-50050100150#adon transf

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论