基于mathematica的菲涅尔衍射的一些问题,求教
mathematica吧
全部回复
仅看楼主
level 3
N=256;r=2;I=zeros(N,N);
[x,y]=meshgrid(linspace(-N/16,N/16-1,N));
D=(x.^2+y.^2).^(1/2);
I(find(D<=r))=1;
su
bp
lot(1,2,1),imshow(I);【请问在mathematica中怎么画一个黑底的白孔的圆】
[X,Y]=meshgrid(linspace(-N/2,N/2,N));
l=512*10^(-6);
k=2*pi/l;
z=1000000;
h=exp(j*k*z)*exp((j*k*(X.^2+Y.^2))/(2*z))/(j*l*z);
H =fftshift(fft2(h)); 【对应的是FourierTransform[h, x, y]吗】
B=fftshift(fft2(I)); 【对应的是Fourier[ImageData[img]]吗(这里img为圆孔图)】
G=fftshift(ifft2(H.*B)); 【在mathematica中,H和B的卷积运算怎么表示呢】
subplot(1,2,2),imshow(log(1+abs(G)));
figure;
meshz(X,Y,abs(G));
向吧友求教,不胜感激!
2017年08月21日 05点08分 1
level 3
第一个问题解决了
Graphics[{Fourier[White, Disk[{0, 0}, 0.0005]]}, PlotRegion -> {{0.4, 0.6}, {0.4, 0.6}}, Background -> Black]
然后生成图保存后
img = Import["/Users/iberty/Desktop/实验.jpg"];
l = 512*10^(-6);
k = 2*pi/l;
z = 1000000;
h = Exp (j*k*z)*Exp ((j*k*(x^2 + y^2))/(2*z))/(j*l*z);
H = FourierTransform[h, x, y];
B = Fourier[ImageData[img]];
c = Convolve[H,B,x,y];%这里出现问题,如何运算其卷积
2017年08月21日 07点08分 3
吧务
level 15
……你需要的是ListConvolve
2017年09月02日 03点09分 6
1