system
Given the following post, respond as if you're commenting on Reddit:
human
How does auto adjusting focus "know" when focus is correct?

With our eyes it makes sense, we focus on something and then our brain says "Ok, we are good here" so focus is done. How is that kind of "verification" achieved with automatic means?
gpt
It typically uses contrast to figure it out. When neighboring pixels in the auto-focus area have the most difference between them is when it assumes focus is maximized. This is why you'll find your camera has a hard time obtaining focus when aiming at something without any contrast-y details in it, like the sky.