Question: Please answer the follwoing question using the provided matlab code Question 4: a) What does the image function look like if you make an object

Please answer the follwoing question using the provided matlab code

Question 4:

a) What does the image function look like if you make an object function that is a long,%straight line? Include the figure. Use both PSFs.

b) What does the image function look like if you change the

%background? How does it change compared to no background? Include the

%figures.

c) PSF1 and PSF2 are different sizes. PSF1, further, has several

%diffraction rings. Find a way to remove the extra diffraction rings beyond

%the 0th order peak. Call this PSF3. Which produces a sharper image, PSF2

%or PSF3?

d) Add another single pixel point object to ObjectFunction. Start

%by placing it at 5,6. Compute the image function, using both PSFs. At what pixel

%separation can you distinguish the two objects in the image function, for the two PSFs? Ignore any

%pixels close to zero (look at the peak).

MATLAB Code:

%Step 1: Define your object function: the coordinates the object occupies

%in real space

ObjectFunction = zeros(40,40);

ObjectFunction(5,5)=1; %an object 1 pixel in size

ObjectFunction1 = zeros(40,40);

ObjectFunction1(5:30,5:30)=1; %a square object 25x25 pixels.

%Step 2: Define your point spread functions.

%From solutions to the wave equation for diffraction, these are bessel

%functions. They can be approximated as 2-D gaussian function.

PSF1 = zeros(40,40);

for i=1:40

for j = 1:40

Inought=1;

Background = 1;

r = sqrt(abs(i-20.5)^2+abs(j-20.5)^2);

PSF1(i,j)=besselj(1,(r)/2)/((r)/2)+Background; %PSF1 has a characteristic length of 2

end

end

PSF2 = zeros(40,40);

for i=1:40

for j = 1:40

Inought=1;

Background = 1;

r = sqrt(abs(i-20.5)^2+abs(j-20.5)^2);

PSF2(i,j)=Inought*besselj(1,(r)/5)/((r)/5)+Background; %PSF2 has a characteristic length of 5

end

end

%Step 3: Calculate the image function, which is how the microscope image of

%the object would look for a system with a given PSF.

ImageFunction1 = conv2(ObjectFunction,PSF1);

ImageFunction2 = conv2(ObjectFunction,PSF2);

ImageFunction3 = conv2(ObjectFunction1,PSF1);

ImageFunction4= conv2(ObjectFunction1,PSF2);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!