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..