1
$\begingroup$

I'm trying to make some simply autofocus algorithm for my device and pretty confused with 2D FFT results. As I know for now - number of high-frequency's components in 2D FFT will say me that image is more focused, than other one where 2D FFT got more low-frequency's components. And i do not know how to calculate this parameter.

I'm thinking about applying high-pass filter, but how i should choose cut-off frequency? In 1D FFT it's pretty simple to determine just looking at the picture of 1D FFT..

$\endgroup$
  • $\begingroup$ You will have to do a 3d plot, and based on the plot you can know where most of your energy concentrated. $\endgroup$ – Adel Bibi Jul 7 '14 at 19:43
  • $\begingroup$ If you're using Matlab, have a look at this, based on this paper. $\endgroup$ – Pokey McPokerson Jul 8 '14 at 7:32
  • $\begingroup$ Thanks for answers. But, anyway even with 3d plot how i can get some numbers from 2D FFT for high-frequency and low-frequency? If I'm working with 1D FFT with some signal, there is mathematical equalition which can take me from bins to frequency. If i will switch (and i will) from Matlab to c# i wont be able to plot 3d graphics in my application. $\endgroup$ – Araxnid Jul 9 '14 at 13:21
1
$\begingroup$

What about just integrating the energy in the high frequencies?
You can do that after applying High Pass filter which is equivalent of weighting high frequencies differently.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.