contrastdetection
Contrast detection, or contrast-detection autofocus (CDAF), is an autofocus method that determines the correct lens position by maximizing image contrast in the scene. The camera analyzes the sharpness or high-frequency content of the image as the lens is moved in small steps, evaluating a focus metric such as edge strength and local contrast. It converges on the focus position that yields the highest measured contrast, using the live view image or a captured frame as the reference.
This approach is common in many digital cameras, smartphones, and video cameras, especially when phase-detection sensors
Advantages of contrast detection include broad applicability and robustness in textured scenes, as well as real-time
In many cameras, CDAF is used alone for live view or combined in hybrid autofocus systems that