Originally posted by bdery It's almost assuredly done via a Fourier Transform, which is a mathematical tool which transforms wavelength information into frequency information. Or in other words, it can be used to find edges with a sharp definition. Then the display highlights spots where the transitions are ''sharper''. Since the measurement is made with the lens wide open, it lets the user nail focus on the narrowest DOF possible. When the aperture closes, the DOF increases, while still being centered on the same spot.
Thanks for the detailed explanation. Where things get tricky and perhaps what the earlier comment was referring to is the tendency of live view on Pentax dSLRs to operate stopped down to as narrow as about f/5.6 under even moderately bright conditions. For example, it is a dim rainy morning outside (~LV 10) and I just did a small focus peaking test using my K-3 with FA 35/2.0 and with a day-lit window sill and a few other items as subjects. The indicated exposure was 1/160s for f/2.0 at ISO 100. Despite the fairly dim conditions, live view had the lens stopped down for viewing to about f/5.6. Focus peaking showed a range of "in-focus" edges spanning about
25cm depth at a 45° angle and 70cm distance. Assuming a taking aperture of f/2.0, missed focus is almost assured.
Switching to aperture ring control with the same lens and the span of "in-focus" edges shrank to about
7cm depth. While still not adequate for fine focus, this second view is more useful than the first.
Going back to camera control of aperture, I switched to magnified live view and the camera obliged by opening back up to maximum aperture, allowing much better application of focus peaking, though it still picked up "edges" a full centimeter apart in depth.
To be clear, this was done at an angle, which is problematic for most focus systems. Behavior with a flat target is much different. That being said, using my peepers and surface detail (time to paint the window sill?) performed better for fine focus this dim morning than focus peaking.
Steve