1
\$\begingroup\$

I just wanna begin by saying that I have no real knowledge of cameras, so this might be a stupid question. But how do smartphone cameras know they are in focus? I would assume that if you told a camera to focus on a point in space, that it would need to know how far away that point is from the camera. Is this true? And if so, how do smartphones focus? Do they use depth sensors? If im completely wrong in my assumption then what methods do smartphones use to focus?

\$\endgroup\$
4
  • \$\begingroup\$ Smartphones don't really do anything differently from other types of cameras... \$\endgroup\$
    – user29608
    Commented Oct 3, 2017 at 5:48
  • \$\begingroup\$ @fkraiem That's not entirely true. My SLR does something very different to my smartphone. \$\endgroup\$
    – Philip Kendall
    Commented Oct 3, 2017 at 6:34
  • 2
    \$\begingroup\$ Related. almost a duplicate: How does autofocus work?; the only other thing you need to know is that almost(?) every smartphone uses contrast detection rather than phase detection. \$\endgroup\$
    – Philip Kendall
    Commented Oct 3, 2017 at 6:36
  • 2
    \$\begingroup\$ Possible duplicate of How does autofocus work? \$\endgroup\$
    – mattdm
    Commented Oct 3, 2017 at 9:20

1 Answer 1

3
\$\begingroup\$

The vast majority of smartphones that can change the focus distance use contrast detection autofocus.

With contrast detection AF: The focus is moved and the camera compares the amount of contrast on the selected portions of the imaging sensor at the first position to the amount contrast at the second position. It continues to do this until it finds the point at which it moves past greatest contrast and the contrast begins to be reduced by further travel in the same direction. It then returns the focus position to the point of greatest contrast.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ It's not at all the majority, but Google's Pixel phones have both phase-detect pixels on the sensor and a "time-of-flight" laser which does measure subject distance. \$\endgroup\$
    – mattdm
    Commented Oct 3, 2017 at 9:24
  • \$\begingroup\$ What percentage of the phones being used in the world are Google Pixel phones? Not to mention that the opening sentence of the answer is true for such a phone. They can change the focus distance using CDAF, it's just that they can also change it using other methods as well. \$\endgroup\$
    – Michael C
    Commented Oct 3, 2017 at 19:19
  • \$\begingroup\$ A very, very small percentage. One might say "not at all the majority". :) \$\endgroup\$
    – mattdm
    Commented Oct 3, 2017 at 19:54
  • \$\begingroup\$ @mattdm I misread your first comment to be saying that smart phones that use CDAF were "not at all the majority." \$\endgroup\$
    – Michael C
    Commented Oct 3, 2017 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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