What is "Phase Detect Autofocus?"

Discussion in 'Beyond the Basics' started by VidThreeNorth, Mar 8, 2018.

  1. VidThreeNorth

    VidThreeNorth TPF Noob!

    Joined:
    Oct 21, 2016
    Messages:
    214
    Likes Received:
    24
    Can others edit my Photos:
    Photos NOT OK to edit
    I have been wondering about this since the first time I ran across the term. I understand Contrast based auto-focus, but I have no idea what they are referring to in the term "Phase Detect". Phase of what -- the moon? Does anyone know of a good description of what is going on?


     
  2. snowbear

    snowbear fuzzy-wuzzy Supporting Member

    Joined:
    Dec 9, 2006
    Messages:
    13,914
    Likes Received:
    5,266
    Location:
    SoMD
    Can others edit my Photos:
    Photos OK to edit
    • Winner Winner x 1
  3. Dave442

    Dave442 No longer a newbie, moving up!

    Joined:
    Feb 1, 2015
    Messages:
    1,837
    Likes Received:
    449
    This seems to cover the topic...
    Understand How Autofocus Works: Part 2

    (I always think about it similar to how I was told years ago how rangefinder cameras show focus - something that you can see happening).
     
    • Informative Informative x 1
  4. jcdeboever

    jcdeboever TPF Supporters Supporting Member

    Joined:
    Sep 5, 2015
    Messages:
    15,800
    Likes Received:
    9,191
    Location:
    Michigan
    Can others edit my Photos:
    Photos OK to edit
    When your a noob, your in the noob phase and your camera is set according, so your in noob phase detection. There are many phase detection algorithms, mine is currently set at bang your head a good against the wall phase detection.

    It's auto focus type. Google it.
     
    • Funny Funny x 3
  5. VidThreeNorth

    VidThreeNorth TPF Noob!

    Joined:
    Oct 21, 2016
    Messages:
    214
    Likes Received:
    24
    Can others edit my Photos:
    Photos NOT OK to edit
    Many thanks to all replies. Actually, I read Wikipaedia's page first, and it just didn't "click" in my brain. This one "worked for me",

    though going through

    helped as well. In fact, I went back to the Wikipaedia article just for fun. It has a lot of other historical info.

    @jcdeboever: I have always found that "bang head against wall" is never worth the cost of the wall repair. :)
     
    • Like Like x 1
  6. smoke665

    smoke665 TPF Supporters Supporting Member

    Joined:
    Mar 29, 2016
    Messages:
    7,430
    Likes Received:
    3,164
    Location:
    Alabama
    Can others edit my Photos:
    Photos OK to edit
    Something you might check with your specific camera. On my current K3II it uses phase detect through the viewfinder, but on Live View (screen) it uses contrast. The phase detection works better in low light.
     
  7. Image Creations

    Image Creations TPF Noob!

    Joined:
    Mar 28, 2018
    Messages:
    3
    Likes Received:
    0
    Can others edit my Photos:
    Photos NOT OK to edit
    Phase detection auto focus splits the image into two 'copies', then adjusts the lens elements until the two images 'merge', ie until they're in phase. Its main advantage is speed.
     
  8. TCampbell

    TCampbell Been spending a lot of time on here!

    Joined:
    Mar 31, 2012
    Messages:
    3,495
    Likes Received:
    1,493
    Location:
    Dearborn, MI
    Can others edit my Photos:
    Photos OK to edit
    The thing about phase-detect systems is that not only can the camera tell if the image is correctly focused or not...

    It's the magic of what it can do when it is NOT in focus. The camera actually knows precisely how much of a focus adjustment is needed. It also knows which direction it needs to shift to correct focus.

    This means the camera can sample the image phase, send one correction to the lens, and quickly move the lens to perfect focus.

    Basically the system gives the camera enough information that it can focus very quickly.

    The alternative system is "contrast detection" auto-focus.

    I typically use an example of taking a photo of a UPC barcode. While background. Black stripes. Straight edges. If the image is in sharp focus, you have "black" pixels (in the stripes) adjacent to "white" pixels in the background. You probably don't have many "gray" pixels.

    If the image is not focused, you have black pixels next to dark gray, next to gray, next to light gray ... eventually next to "white" pixels low contrast because it's a very gradual shift from dark to light instead of a very rapid shift.

    In contrast detection, the camera checks for contrast difference between adjacent pixels. When it maximizes the contrast shift in some area of interest, then it has "focused" the image. That's the basic idea. It works for anything.

    The problem with this system is that has to sample contrast difference, adjust focus, re-sample contrast, compare the latest sample to the earlier sample to decide if focus is getting better or worse... and decide if it should continue to adjust focus in the same direction or reverse the direction... and just keep taking samples until it can't improve the contrast anymore.

    This is a time-consuming process and results in "focus hunt" (it "guesses" it's way to better focus).

    It's one of the reasons why DSLRs are much faster at focus (when using the viewfinder) than other cameras that do not have the phase-detect system.

    Canon is a bit of an exception... they've developed a technology that lets them embed phase-detection-like technology directly onto the sensor. They call it "dual-pixel CMOS AF". Each one pixel is split into two sub-pixels with the ability to detect phase-differences. Not all of their cameras have this. All the current mid-range and high end models have it. The latest Rebel series body also has it. Some of the previous Rebel series bodies have an early (less-evolved) generation of the technology.
     
    • Informative Informative x 1
  9. petrochemist

    petrochemist TPF junkie!

    Joined:
    Mar 9, 2014
    Messages:
    1,210
    Likes Received:
    319
    Location:
    North Essex UK
    Can others edit my Photos:
    Photos OK to edit
    Canon isn't so much of an exception embedded phase detection AF is becoming quite common on mirrorless cameras and even smartphones. Indeed Samsung claim their top smartphone models now have phase AF on every pixel.

    I believe Canons system was Patented in 2013, while Fuji introduced on sensor phase detect AF in 2010.
     
  10. Destin

    Destin Been spending a lot of time on here!

    Joined:
    Sep 11, 2010
    Messages:
    3,404
    Likes Received:
    987
    Location:
    Western New York
    Can others edit my Photos:
    Photos OK to edit
    Actually, you’d think this, but most DSLR (well, Nikon at least, I’m not super familiar with other brands) cameras use contrast detect focus through the viewfinder.

    That’s why it’s easier to focus when you place your focus point over an area of high contrast than it is to focus in the center of a low contrast area.
     
  11. KmH

    KmH Helping photographers learn to fish Supporting Member

    Joined:
    Apr 9, 2009
    Messages:
    41,403
    Likes Received:
    5,691
    Location:
    Iowa
    Can others edit my Photos:
    Photos OK to edit
    Nikon DSLR cameras do indeed use phase detect AF through the viewfinder. It states so in the AF specifications of your D810 on page 478.

    The main mirror has a section that is 50% transparent that lets light from the lens get to a smaller secondary mirror that reflects the light down to the phase detect AF module in the bottom of the camera. Phase detect needs edge contrast to do it's thing.
    The actual AF sensors are in the AF module in the bottom of the camera and squares representing the location of the AF sensors is projected onto the focus screen between the main mirror and the viewfinder.

    Think about the examples Nikon puts, or used to put, in their user manuals demonstrating the imaging situations when phase detect AF will have problems - page 99 D810 manual.

    So far Nikon DSLR cameras have to rely on the sway slower contrast detect AF when Live View is used, because the main and secondary mirrors are up out of the light path and the phase detect AF module in the bottom of the camera can't be used.
     
    Last edited: Mar 31, 2018
    • Informative Informative x 1
  12. TCampbell

    TCampbell Been spending a lot of time on here!

    Joined:
    Mar 31, 2012
    Messages:
    3,495
    Likes Received:
    1,493
    Location:
    Dearborn, MI
    Can others edit my Photos:
    Photos OK to edit


    I'm wondering if we are talking about the same thing. In "contrast detect" auto-focus, an imaging sensor is required. Since the closed shutter and reflex mirror is blocking all light from reaching the imaging sensor, it's not really possible to have "contrast detect" AF in "live view" (your eye is looking through the camera) unless the camera were to be equipped with a second imaging sensor (Sony is an exception because their mirror doesn't move).

    Traditionally it's "phase detect" when using the viewfinder... "contrast detect" when using live-view.
     

Share This Page