19 320039()JournalofFujianNormalUniversity(NaturalScience)Vol.19 No.3Sept.2003:1000-5277(2003)03-0022-04MATLAB中二元傅里叶变换计算全息图的算法陈家祯,郑子华,陈利永(, 350007) :介绍利用MATLAB语言实现二元傅里叶变换计算全息图的制作.相对于传统的编程语言,该算法实现上更加简单和快捷,并且在算法实现上采用一系列计算全息图的质量提高措施,以减少再现像的失真.实验结果表明MATLAB是研究计算全息的有效工具之一.:计算全息;MATLAB;傅里叶变换:O438.1 :A ,,,CRT,.1965KozmaKelly[1],,、.、、、.,Basic、Fortran、C,.MATLAB,、、,,,,.1 .:(1),01;(2),[2];(3).4:1.1 物面和全息面抽样,,.:f(x,y)=a(x,y)exp[jh(x,y)],f(x,y)=0, (|x|≤ΔX2;|y|≤ΔY2).ΔX×ΔY.a(x,y),h(x,y),ΔXΔYxy.::(1971— ),,,.:(JA99153):2003-03-12F(u,v)=A(u,v)exp[jh(u,v)],F(u,v)=0, (|u|≤ΔU2;|v|≤ΔV2),A(u,v),h(u,v),ΔU,ΔVu,v.f(x,y).xyMN,x0y0,:fmn=f(mx0,ny0),m,n.-M2≤m≤M2-1; -N2≤n≤N2-1.M×N.F(u,v).,(),M×N.Fmn=F(mu0,nv0), -M2≤m≤M2-1; -N2≤n≤N2-1,u0、v0u、v.1.2 离散傅里叶变换(DFT),(DFT),.:Fmn=∑M2-1s=-M2∑N2-1t=-N2fstexp[-j2π(msM+ntN)].DFTFmn,Fmn=Cmn+jDmn,Cmn、Dmn,Amn=C2mn+D2mn, mn=arctanDmnCmn.1.3 编码,,.Ⅲ[2],:,,W,;.MATLAB,::lmn=Amn;:pmn=mn2π;W=12×.1.4 绘图或显示,.2 ,MATLAB:(1),Amn,.23 3 :MATLAB(2)f(x,y),,:B(i,k)=A(i,K)exp(j2πR1),R1[0,1].,,.(3),mnπ2,,,“”,,WW1W2,W=W1+W2.3 ,MATLAB,Ⅲ[2].,16×16,:(1)16×16,A.(2)MATLABrand(1,1)01R1.(3)AA(I,J)ej2πR1,.A(I,J)=A(I,J)×ej2πR1.(4)fft2()A.A=fft2(A).(5)AA1,A1=abs(A).(6)A2πB1.(7)A1C4.(8)x16,y16S.(9)A2S/16,B2.(10)for{I=1to16y0=y16+(I-1)×B2;for{J=1to16 x0=x16+(J-1)×A2;H=A1(I,J)×B2/C4;F1=B1(I,J)×A2;W=A22;if|F1|≤A24{x2=x0-W/2;x3=x0+W/2;y2=y0-H/2;y3=y0+H/2;(x2,y2)(x3,y3)}elseifF1A24{x2=x0+F1-W/2;x3=x0+A2/2;y2=y0-H/2;y3=y0+H/2; (x2,y2)(x3,y3);x2=x0-A2/2;x3=x0+F1+W/2-A2;(x2,y2)(x3,y3)}else{24() 2003 图1 实验用字信息及在MATLAB中绘制的计算全息图 x2=x0-A2/2;x3=x0+F1+W/2;y2=y0-H/2;y3=y0+H/2;(x2,y2)(x3,y3);x2=x0+F1-W/2+A2;x3=x0+A2/2;(x2,y2)(x3,y3)} } }MATLAB,MATLAB1,“E”,1(a),1(b).4 ,MATLAB,.参考文献:[1].[M]..,1996.276-289.[2],.[M]..,1984.31-41.BinaryFourierHologramAlgorithmBasedonMATLABCHENJia-zhen,ZHENGZi-hua,CHENLi-yong(DepartmentofComputerScience,FujianNormalUniversity,Fuzhou350007,China)Abstract:AnewmethodhasbeenproposedfortheimplementationofBinaryComputer-generatedHologram(CGH).SeveralmeasureshavebeentakentoimprovethereconstructionqualityandMAT-LABisprovedtobemoreconvenientandflexiblethanthetraditionalprogramminglanguage.Theex-perimentalresultsdemenstratethatMATLABisoneofthemostefficienttoolsinstudyCGH.Keywords:CGH;MATLAB;Fouriertransform( )25 3 :MATLAB