1 / 9

EE3190 Optical Sensing and Imaging

EE3190 Optical Sensing and Imaging. Computing PSFs with a digital computer. Sampling the Pupil Function. For square arrays (equal number of samples in both dimensions), select the sample spacing so that the pupil function fills up half of the array:.

oceana
Download Presentation

EE3190 Optical Sensing and Imaging

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EE3190 Optical Sensing and Imaging Computing PSFs with a digital computer

  2. Sampling the Pupil Function For square arrays (equal number of samples in both dimensions), select the sample spacing so that the pupil function fills up half of the array: When using the FFT it is good practice to select N to be even. Better yet, is to selectN to be a power of 2. D is the pupil diameter in meters N is the number of samples across the array

  3. Sampling the Pupil Function • Create a sampling grid

  4. Sampling the Pupil Function • Create a sampling grid d2 = 2*D/N; u = [-N/2:1:N/2-1]*d2; [u1,u2] = meshgrid(u); example: d2 = 1/2; N = 6 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 u -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 -1.5000 -1.5000 -1.5000 -1.5000 -1.5000 -1.5000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -0.5000 -0.5000 -0.5000 -0.5000 -0.5000 -0.5000 0 0 0 0 0 0 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 u1 u2

  5. Sampling the Pupil Function • Example: Square Pupil (DxD meters) • Example: Circular Pupil (diameter: D meters) p = (abs(u1)<=D/2)&(abs(u2)<=D/2); r = sqrt(u1.^2 + u2.^2); p = r<=D/2;

  6. 1 1 2 2 3 3 4 4 Compute the PSF • Using the FFT algorithm P = fftshift(fft2(fftshift(p)); d1 = lambda*d/(N*d2); u = [-N/2:1:N/2-1]*d1; lambda is wavelength d is distance to object or image fftshift

  7. Example: Circular pupil D = 1; lambda = 1e-6; do = 10e3; N = 256; d2 = 2*D/N; u = [-N/2:1:N/2-1]*d2; [u1,u2] = meshgrid(u); r = sqrt(u1.^2+u2.^2); p = abs(r)<=D/2; figure(1); colormap(gray); subplot(2,1,1); imagesc(u,u,p); axis image; P = fftshift(fft2(fftshift(p))); d1 = lambda*do/(N*d2); x = [-N/2:1:N/2-1]*d1; subplot(2,1,2); imagesc(x,x,abs(P)); axis image;

  8. Example: Circular pupil D = 1; lambda = 1e-6; do = 10e3; N = 256; d2 = 2*D/N; u = [-N/2:1:N/2-1]*d2; [u1,u2] = meshgrid(u); r = sqrt(u1.^2+u2.^2); p = abs(r)<=D/2; figure(1); colormap(gray); subplot(2,1,1); imagesc(u,u,p); axis image; P = fftshift(fft2(fftshift(p))); d1 = lambda*do/(N*d2); x = [-N/2:1:N/2-1]*d1; subplot(2,1,2); imagesc(x,x,abs(P)); axis image; axis([-1 1 -1 1]*10*lambda*do/D);

  9. Example: Circular pupil (defocus) D = 1; lambda = 1e-6; do = 10e3; di = 10e-2; f = 1/(1/do + 1/di); ferror = 1/(1/(do*1.06) + 1/di); N = 256; d2 = 2*D/N; u = [-N/2:1:N/2-1]*d2; [u1,u2] = meshgrid(u); r = sqrt(u1.^2+u2.^2); p = (abs(r)<=D/2).*... exp(-j*(pi/(lambda*f))*r.^2).*... exp(j*(pi/(lambda*ferror))*r.^2); figure(1); colormap(gray); subplot(2,1,1); imagesc(u,u,angle(p)); axis image; P = fftshift(fft2(fftshift(p))); d1 = lambda*do/(N*d2); x = [-N/2:1:N/2-1]*d1; subplot(2,1,2); imagesc(x,x,abs(P)); axis image; axis([-1 1 -1 1]*8*lambda*do/D);

More Related