How does a camera determine whether an object is in focus or not?

in #photography7 years ago

There are many ways to figure out whether an object is in focus or not. But the most intuitive way is to observe the edges.

Before I go further, have a look at the image below.

Yes, as you've noticed correctly, it is the Eiffel Tower of Paris. The right image is the correctly focused image, while the left one is out of focus. OK, out of focus in a pretty bad way, or artistic. Depends on how someone wants to look at it.

Let us take an easier example, something that is very intuitive. Imagine we're imaging a tiny speck of light, which typically would occupy only one pixel in our sensor. For the sake of ease, let's assume the lighting condition, and all other aspects are perfect for the scenario.

If the speck is focused properly by the lens, then as I've mentioned, the speck occupies only one pixel in the resultant image. However, if it is out of focus, then it could span multiple pixels.

Here's the simulation result of what I explained just now.

As we can observe, the intensity gets blurred and spans across several pixels once the lens is out of focus.

So far so good. How does the camera really figure it out?

Enter frequency domain.

When we set the mode of our camera to Auto Focus mode, once we point a camera towards an object, the camera performs various operations internally to check the two-dimensional frequency of the image. Then, based on mechanical systems, the lens is adjusted such that the frequency is maximized. Please note that sharper an image is i.e., lesser is the blur, higher is the frequency of the image. (You can compute it very easily using softwares like Matlab or Octave.)

The camera may use various methods several ways to perform autofocus. There are plenty of research papers that address this problem. Here is one example of such a paper.

Please give your opinion on steemit here once!! on link it will take a minute but the people who are posting trash may be decrease.
https://steemit.com/steem/@tushargoel/agree-or-not-steemit-is-becoming-a-trash-box-on-the-name-of-making-money-by-blogging-give-your-opinion

Sort:  

Awesome pictures. I need camera like this, stunning images!

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 57774.35
ETH 2339.45
USDT 1.00
SBD 2.44