how do i simulate a 4f correlator
12 ビュー (過去 30 日間)
古いコメントを表示
im trying to simulate a 4f correlator, and for some reason i cant get it to work. The code that simulates the 4f correlator is this:
[xgrid ygrid]=meshgrid(1:1024);
grid=(xgrid-512).^2 +(ygrid-512).^2;
lens=exp((1i*pi*(pixsize^2)/((-f)*w)).*grid);
move=fft2(exp((1i*pi*(pixsize^2)/(f*w)).*grid));
img=padarray(h1cof,[pf pf]);
bl1=ifftshift(ifft2(fft2(img).*move));
al1=bl1.*lens;
bh2=ifftshift(ifft2(fft2(al1).*move));
ah2=bh2.*padarray(h2ft,[pf pf]);
bl2=ifftshift(ifft2(fft2(ah2).*move));
al2=bl2.*lens;
rescof=ifftshift(ifft2(fft2(al2).*move));
where f is the focal length and w the wavelength
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Optics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!