First things first

Armed with the mainstream PDAF, our star item Sony IMX519 16MP Auto-Focus Camera Module has made a big leap forward. Perfectly integrated with its original CDAF method, now it’s working in a Dual Mode way, i.e., PDAF + CDAF. Now, the bestseller is undoubtedly got further enhanced.


So, what are PDAF and CDAF in the use of cameras?

A Very Brief Intro

Before diving deep into these two acronyms, let’s think about how SLR (Single Lens Reflex) cameras work.

For years, SLRs work this way: the light passes through the lens, reflects up from the mirror into a pentaprism and out to your eye in the viewfinder. The simplicity of the design has been celebrated by photographers for years.


CDAF (Contrast Detection Auto Focus) analyzes pixels on the camera sensor using contrast calculations to obtain focus. This works by pushing focus back and forth on the subject to identify the point of highest contrast.

While PDAF (Phase Detection Auto Focus) works by employing a sub-mirror behind the regular mirror. Light is focused into two distinct beams for determining the subject range on an autofocus sensor. Distance is calculated, and a motor drives the lens to bring these beams into ‘phase‘.


In a modern mirrorless system, Phase Detection works much the same way except there are no mirrors inside. The reading is made right off of the image sensor.

mirrorless gif
For Mobile Phone Cameras, the AF sensor is integrated with the image sensor.

Pros and Cons

PDAF: When talking about phase detection we’re talking about speed. It’s the best type of autofocus system for fast-moving subjects, e.g., sports, wildlife, and children at play. One thing to keep in mind, though, is that phase detection systems can fall out of alignment or perform inconsistently with different lenses. This is why it is sometimes essential to fine-tune your focusing system to each specific lens in order to achieve the best performance.

PDAF – Speed

CDAF: As above said, CDAF works by pushing focus back and forth on the subject to identify the point of highest contrast. Your lens focuses on the subject, goes beyond the initial focus and then pulls back. Despite this ‘hunting‘, the system is highly accurate. Mirrorless cameras have employed CDAF for years boasting its high precision, and some DSLRs use contrast-detection focusing when shooting in live view. Compared to PDAF, the process is usually slower and is not the best way to capture a moving subject. However, in portraiture, landscape, still life photography, and any application where the subject isn’t moving very much, CDAF can be valuable because of its accuracy and a potentially larger array of AF points.

CDAF – Accuracy

That’s why we use a hybrid of PDAF and CDAF. To take the best advantage of both! 🙂

How our Dual Mode AF works

As above said, our 16MP camera now uses a dual mode way to focus. To be specific, in front of an object, PDAF always starts working first. If PDAF fails to focus well enough, then CDAF will start its job. Refer to the below description in case you want to know more.

This algorithm implements a hybrid of CDAF and PDAF, favouring PDAF. Whenever PDAF is available, it is used in a continuous feedback loop. When triggered in auto mode, we simply enable AF for a limited number of frames (it may terminate early if the delta becomes small enough). When PDAF confidence is low (due e.g. to low contrast or extreme defocus) or PDAF data are absent, fall back to CDAF with a programmed scan pattern. A coarse and fine scan are performed, using ISP’s CDAF focus FoM to estimate the lens position with peak contrast. This is slower due to extra latency in the ISP, and requires a settling time between steps. Some hysteresis is applied to the switch between PDAF and CDAF, to avoid “nuisance” scans. During each interval where PDAF is not working, only ONE scan will be performed; CAF cannot track objects using CDAF alone. This algorithm is unrelated to “rpi.focus” which merely reports CDAF FoM. (quote from Raspberry Pi algorithm)

See our Demo.

And another good news.

Key Arducam autofocus cameras will soon be armed with a hybrid of PDAF and CDAF. 🙂


For objects that do not have enough texture (e.g., white wall), a failure to focus might occur. This happens to both PDAF and CDAF and is neither a hardware nor software issue.
For other focusing failures (e.g., ambient light insufficient), you can try to move the camera, or move the object a little.

Quick Buy

  • 16MP Autofocus Camera for Raspberry Pi and NVIDIA Jetson Nano/NX and NVIDIA Orin NX/AGX Orin
  • 16MP NoIR Camera Module for Raspberry Pi and Jetson Nano/NX
  • 16MP IMX519 Autofocus Synchronized Quad-Camera Kit for Raspberry Pi, Nvidia Jetson Nano/Xavier NX

V3 Fully Compatible Case in the Demo

Camera Enclosure Case for Raspberry Pi Camera Module 3/V1/V2 and Arducam 16MP/64MP Camera

Your Cart is empty!

It looks like you haven't added any items to your cart yet.

Browse Products