Units of OughtaFocus FFT

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Units of OughtaFocus FFT

Ben Isaacoff-2
Hello, I'm a little confused what the units are in the OughtaFocus FFT. 

I'm trying to focus by maximizing the brightness of circular features that have a nominal diameter of 7 pixels in a 512x512 image. Therefore if I understand the code correctly, that would give a spatial frequency of 1/(7/(512/2)) = 36.5. But I'm not accounting for what is the meaning of the % sign in the menu? Regardless, this center value for the range doesn't seem to be working very well.

Any clarification would be greatly appreciated. Thank you

-------------------------
Ben Isaacoff

Applied Physics
University of Michigan

sites.google.com/site/bpisaacoff


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Units of OughtaFocus FFT

JonD
Administrator
Ben Isaacoff-2 wrote
Hello, I'm a little confused what the units are in the OughtaFocus FFT.
I'm trying to focus by maximizing the brightness of circular features that have
a nominal diameter of 7 pixels in a 512x512 image. Therefore if I understand the
code correctly, that would give a spatial frequency of 1/(7/(512/2)) = 36.5. But
I'm not accounting for what is the meaning of the % sign in the menu?
Regardless, this center value for the range doesn't seem to be working very
well.
Properties "FFTLowerCutoff(%)" and "FFTUpperCutoff(%)" only apply if you are using algorithm "FFTBandpass" (set via the "Maximize" property).  For all other algorithms these settings do not apply.

The FFTBandpass algorithm seeks to maximize the frequency content between the upper and lower cutoffs, and the cutoffs are specified in terms of the percentage of maximum spatial frequency.  The idea is that higher frequencies are just noise and lower frequencies are "DC-ish" which aren't useful for focusing.

The maximum spatial frequency would be 1/(512/2) = 256 for your example.  So I would expect that setting the cutoffs near 36.5/256 ~ 14% would be about right.

Jon

-------------------------------------------
Jon Daniels
Applied Scientific Instrumentation
29391 West Enid Rd, Eugene, OR 97402
Phone: (541) 461-8181 x118
-------------------------------------------

 
Loading...