MTF for Laplacian of a gaussian
Afficher commentaires plus anciens
am trying to plot a modulation transfer function of a gaussian from -40 to 40 mm in conjunction with a laplacian of gaussian filter, width = 4 mm and sigma = 1. i have a trouble scaling the MTF for the gaussian and i wasnt sure about how to get the ft for the laplacian of a gaussian. am using abs(fft). does anyone have an experience with MTF for filters?
1 commentaire
Star Strider
le 23 Fév 2014
Modifié(e) : Star Strider
le 23 Fév 2014
Please post your code, or attach the file to your original question if your code is too long to post. It will help us understand your problem.
This is out of my area of expertise (I’ll search online to see what I come up with), but there are others here who are probably more familiar with it.
Réponses (2)
Star Strider
le 23 Fév 2014
0 votes
The Image Processing Toolbox has functions that can take you from the point spread function to the optical transfer function and back again. See psf2otf for details.
6 commentaires
Hannah
le 24 Fév 2014
Star Strider
le 24 Fév 2014
I’m having some difficulty understanding what you’re doing.
First, your code has an error (that you’ve probably discovered by now). Your preallocation of g should be:
g = zeros(size(xGaus));
Second, your gn and PSF variables are vectors. Unless I’m completely failing to understand what you’re doing, a vector is probably not the result you intend.
The description and examples in the psf2otf documentation may be what you actually want to do. Run the code in the example on the psf2otf page to see if it is. (I’ve copy-pasted it here, along with a slightly modified version to plot the Laplacian-of-Gaussian.) You will have to make the appropriate changes to get the size matrix you want.
hlog = fspecial('log', 4, 1);
Hlog = psf2otf(hlog,[31 31]);
% Copied From ‘psf2otf’ Documentation Example
PSF = fspecial('gaussian',13,1);
OTF = psf2otf(PSF,[31 31]); % PSF --> OTF
figure(1)
subplot(1,2,1); surf(PSF); title('PSF');
axis square; axis tight
subplot(1,2,2); surf(abs(OTF)); title('Corresponding |OTF|');
axis square; axis tight
% Same Code Displaying Laplacian-of-Gaussian
figure(2)
subplot(1,2,1); surf(hlog); title('PSF');
axis square; axis tight
subplot(1,2,2); surf(abs(Hlog)); title('Corresponding |OTF|');
axis square; axis tight
I admit to being curious as to how this relates to the thermodynamics question you posted earlier.
Hannah
le 25 Fév 2014
Star Strider
le 25 Fév 2014
I don’t understand what you’re doing. I specifically don’t understand the reason you’re dealing with vectors rather than matrices in a 2-D imaging application.
The x- and y-axes of your OTF are the spatial frequencies, and the z-axis is the magnitude of the transfer function. You might want to take the diagonal of the relevant matrices to create your vectors, but that’s the best I can suggest.
Plot your OTF and MTF using the abs() function, but keep it in the complex domain for your actual transfer function calculations with your Fourier-transformed input.
I’ll do some more research on the Internet to see what I can find. If you have links to pages describing what you’re doing, please post them here (preferably in your next comment so I can find them easily).
Hannah
le 27 Fév 2014
Star Strider
le 27 Fév 2014
Modifié(e) : Star Strider
le 1 Mar 2014
I don’t exactly understand what you mean by ‘profile’. I’m hung up on how you project your 3D OTF or MTF to a 2D representation. One paper I found mentions: ‘The spatial-noise amplitude spectrum of the system was independently measured by taking the FFT of the array data (averaged over the rows) when flux was incident on the array at the same average value as for the target image.’ ( ‘Random transparency targets for modulation transfer function measurement in the visible and infrared regions’ ) So it would seem to me that the convention is to take the 3D OTF or MTF, average it over the rows. In MATLAB this would be:
MTF_mean = mean(MTF,2);
if MTF is your 3D representation. You have the result you want.
Is this correct?
Hannah
le 27 Fév 2014
0 votes
Catégories
En savoir plus sur Image Filtering dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!