资源简介
数字全息衍射再现不同方法数值比较,不同方法的比较
代码片段和文件信息
%%%%%%%%%
%%%
clear;
%close all;
l=0.6328; % The wavelengh of the light wave
k=2*pi/l; % The wavelvector of the light wave
a=3;
F0=ones(1024);
F0(:512-a:513+a)=0; % The wavelengh of the light wave
F0=F0/max(max(F0));
figure;imshow(F0);
title(‘输入图像‘);
[MN]=size(F0);
dx0=10;dy0=10;
DX0=M*dx0;DY0=N*dy0;
x0=-DX0/2:dx0:(DX0/2-dx0);y0=-DY0/2:dy0:(DY0/2-dy0);
[X0Y0]=meshgrid(x0y0);
Z0=1.00*M*dx0*dx0/l;
dx1=(l*Z0)./(DX0);dy1=(l*Z0)./(DY0);
DX1=M*dx1;DY1=N*dy1;
x1=-DX1/2:dx1:(DX1/2-dx1);
y1=-DY1/2:dy1:(DY1/2-dy1);
[X1Y1]=meshgrid(x1y1);
FresnelA=(1/i*l*Z0).*exp(i*k*Z0).*exp((i*k/(2*Z0)).*(X1.^2+Y1.^2));
G1=FresnelA.*fft2(F0.*exp((i*k/(2*Z0)).*(X0.^2+Y0.^2)));
G1=fftshift(G1);
G1A=abs(G1);
G1I=G1.*conj(G1);
G1A=G1A/max(max
评论
共有 条评论