how to get MTF from PSF

190 views (last 30 days)
Dimani4
Dimani4 on 14 May 2020
Commented: Anjan JB on 30 May 2024
Hi guys,
Can you please tell me how can I get MTF from the PSF. PSF is the matrix of 400X400 taken from the camera. Please see attached mat file.
Thank you very much.
  2 Comments
Rik
Rik on 14 May 2020
According to the wiki page it seems those are equivalent. Do you have a formal description of how to convert one to the other?
Dimani4
Dimani4 on 14 May 2020
MTF is the absolute of OTF (MTF = abs(OTF)). OTF=MTF*exp(-PTF).

Sign in to comment.

Answers (4)

Bjorn Gustavsson
Bjorn Gustavsson on 14 May 2020
The MTF is simply the absolute of the Fourier-transform of the PSF. That is:
MTF = abs(fftshift(fft2(psf)));
Just a couple of question. If you have the PSF why do you want the MTF? What are you going to use the MTF for that you couldn't do with the PSF?
HTH
  2 Comments
Rik
Rik on 14 May 2020
Comment posted as answer by Dimani4:
I know that, what about the matlab function of psf2otf (https://www.mathworks.com/help/images/ref/psf2otf.html)? I try to use this function (psf2otf) but what I get is the 2D intensity picture. I dont understand what that function means... MTF should be the graph normalized to 1 and the units should be 1/cm. Should I do profile to this picture? But the profile I get it in pixels units?
I just dont understand how can I approach to such a task...
Just a couple of question. If you have the PSF why do you want the MTF? What are you going to use the MTF for that you couldn't do with the PSF?
I'm just curious about what else I can learn about the point source.
Thank you.
Bjorn Gustavsson
Bjorn Gustavsson on 14 May 2020
Yes, that OTF would be in 1/pixels units, it has to be since the function is goven no information about how large your PSF-image is in the real world. You'll have to convert to wave-numbers in 1/cm yorself, since you know about the image.
In my opinion they are nothing but a Fourier-pair, and I've nver been able to extract additional information from the OTF/MTF than from the PSF. When looking at my PSFs I typically plot row and column-cuts through the centre, I try to look at the PSF at different locations in the image - since the OTF-concept requires a shift-invariant PSF in the first place.
(Since I work with aberration-limited optical systems I cannot use OTF/MTF, and dislike them...)
My pleasure

Sign in to comment.


Dimani4
Dimani4 on 14 May 2020
Bjorn,
According your suggestion I did MTF = abs(fftshift(fft2(PSF1))) and I got this picture:
Now, I know how much my pixel in um, but how do I convert it to 1/m?
  8 Comments
Bjorn Gustavsson
Bjorn Gustavsson on 15 May 2020
Glad to have helped. Hope you pay it on forwards.
Anjan JB
Anjan JB on 30 May 2024
@Dimani4 How do you plot figure 2 and 3. can you help me to explain or provide the code for these figures . this comment : According your suggestion I did MTF = abs(fftshift(fft2(PSF1))) and I got this picture:

Sign in to comment.


adi
adi on 5 Nov 2020
Edited: adi on 5 Nov 2020
Hi all,
i saw all your comments and thought that maybe you can help me too.
i have the 3D MTF as in the attached image.if i understand correctly its in [1/pixel] units .
i want to convert this 3D MTF to the common 2D MTF as in the image attached.
Does anybody knows how to do it?
thanks in advance
  10 Comments
onur cicek
onur cicek on 5 Aug 2021
Could you help me ? I have simple MTF and i want to get PSF from it .My is MTF DiffLim (2,1)= (2/pi)* (acos (FNo CenterWL Freq/1000)-((FNo CenterWL/1000) Freqsqrt (1-((FNo*CenterWL Freq)/1000)^2))) . Okey i need take ifft but i don't understand how can i get it in nanometer.
Anjan JB
Anjan JB on 30 May 2024
@adi did you get the answer of these questions, you asked ? i have the 3D MTF as in the attached image.if i understand correctly its in [1/pixel] units .
i want to convert this 3D MTF to the common 2D MTF as in the image attached.
Does anybody knows how to do it?
If yes please help me, I am also struggling to solve same problem.

Sign in to comment.


Mustela
Mustela on 26 Aug 2021
@Bjorn Gustavsson, you keep going on about favoring PSF analysis over MTF analysis. I'm really curious what your reasoning is. What exactly do you do with your PSFs? You can't get spatial frequency information (i.e. contrast vs freq.) by looking at slices of a PSF for example, hence the need for MTF analysis. You are clearly correct that analyzing the MTF from a single PSF of an optical system is only valid if the PSF is shift invariant (i.e. typically requires diffraction-limited over the FOV), but what's stopping me from analyzing the MTF at various field angles (which is one thing I do in my analyses), thus getting around the shift-invariance assumption?
  1 Comment
Bjorn Gustavsson
Bjorn Gustavsson on 26 Aug 2021
@Mustela, yes I do rant on that. By looking at the PSF (or cuts through it) I can easily judge how small structures my imaging system can resolve and how large separations need to be, typically varying between different parts of my images. The images I analyse I never extract information of interest from certain Fourier-components, therefore it is more natural for me to think about how the PSF in a region blur an ideal image than look at how the contrast varies with spatial frequencies. What you mention as "contrast vs frequency" as something that cannot be achieved from the PSF I would instantly gather from the sum of PSFs from gradually separated pixels except this approach can be rigorously done without worries. When you look at the MTF for sub-regions of the image you would still make the assumption/approximation that the PSF is shift-invariant over that regionn (between you and me, I'd say that you implicitly admitt that it is not, and I'll have to admitt that it still most likely is a good enough assumption).
My main "attitude problem" might be that since I seek the information about object in the spatial domain it is more striahgt-forward to look at the PSF-blurring as a convolution-type operation than a multiplication in the Fourier-domain.

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Tags

Products


Release

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!