View Single Post
Posts: 1 | Thanked: 0 times | Joined on Apr 2010
#23
I have never implemented the contrast based autofocusing, but I don't think the overall image contrast level would help here, I would filter out the low frequencies and maybe also some amount of high, to avoid detection of sensor noise.

You would also like not to process the whole image but limit to the smaller area or number of areas.

So the simple version may look like:

total contrast of some area = sum( ( very slightly blurred or denoised image - more blurred image )^2 )