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

-------------------------------------------