Forget subtle focus tweaks, Canon’s Dual Pixel RAW tech can give you an additional stop in the highlights!
posted Thursday, September 1, 2016 at 6:59 AM EST
A week ago, the Canon 5D Mark IV DSLR launched, and with it a brand-new feature based around the same technology that underlies Canon's Dual Pixel CMOS AF function. Called Dual Pixel RAW, it's explained in great detail by IR founder and publisher Dave Etchells in our Canon 5D Mark IV review. But while the function, which allows subtle tweaks to focus, bokeh and ghosting post-capture, is pretty cool, our good friend Iliah Borg -- he and Alex Tutubalin are the developers of the superb FastRawViewer and RawDigger apps and the related LibRaw library -- has pointed out what strikes us as an even more exciting aspect of the technology. (And as an added bonus, he's also offering discounts of 25% and upwards on his software if you order right now!)
Properly processing a Dual Pixel RAW exposure can provide you with a full stop of additional highlight detail, potentially allowing you to salvage a shot that was accidentally overexposed -- at least, so long as you were willing to put up with the huge file size of a Dual Pixel RAW file, as in the 5D Mark IV each such image weighs in at around a hefty 72MB, twice as large as a standard raw. Without any further ado, we'll let Iliah do the talking, and explain just how he came to the realization that Dual Pixel RAW could be repurposed to work in this manner!
Using Canon's Dual Pixel RAW to gain an additional stop in the highlights
by Iliah Borg
Let's take a close look at a Dual Pixel RAW file from the Canon 5D Mark IV using RawDigger 1.2.13. The raw file can be downloaded here, and contains two raw data sets. We will be calling them the main subframe (frame one in RawDigger, as shown below)...
...and the auxiliary subframe (frame two in RawDigger, shown below).
We will start by inspecting the main subframe. For this shot, it contains specular highlights that are blown out. Below is a screenshot with one such clipped area sampled. (See the grey rectangle marking the area selected on the left brush.) The red overlay over the specular highlight indicates the blown-out pixels. The statistics for this selection is on the top panel of Raw Digger, outlined in purple.
All the channels have reached their maximums. A value of 15872 is equal to 16383 (the maximum for a 14-bit rendition) minus 511, which is the black level for the Red, Green, and Blue channels. (The black levels are indicated in the lower left corner of the screen shot). The second Green channel clips at a value of 15871 instead because its black level is 512, higher than the others by one data number.
The histogram for this selection indicates that there is a peak in the extreme highlights of all four channels, as expected.
This is all business as usual. All four channels having reached their maximum prevents any highlight reconstruction.
Now let's inspect the second, auxiliary subframe. The maximum values for the same selection are now lower and there is no overexposure indication. (This would have been indicated by a red overlay over the highlight, as in the earlier screenshot.) Also, the per channel maximums now differ from one another.
We can see the same on the histogram: There are no sharp peaks hitting the right wall. Thus, the auxiliary subframe is not hard-clipped.
The highlights are preserved in the auxiliary subframe, and they're clipped in the main subframe. The full 14-bit range is used for both the main and auxiliary subframes, and there are no voids in the histogram that would indicate digital manipulation to fill the range.
In other words, effectively, the auxiliary subframe is underexposed by one stop, compared to the main subframe. For example, sampling the gray WhiBal card in the shot, we can see that the values in the main subframe:
...are nearly 2x the values in the auxiliary subframe:
Also, see the histogram for the sampled area of the main frame:
...and the same area of the auxiliary frame:
Channel averages for the selection on the main subframe vs. the auxiliary subframe are as follows:
Channel | Main | Auxiliary |
Red | 2481.7 | 1236.1 |
Green | 4749.6 | 2349.9 |
Blue | 3591.7 | 1781.7 |
Green2 | 4733.3 | 2327.6 |
This confirms that the difference between the main and auxiliary subframes is nearly 2x, or one stop, and that the auxiliary subframe can be used for highlight recovery. (Again, an additional one stop of highlights is preserved in the auxiliary subframe while being clipped in the main subframe. This effectively provides one more stop of headroom in the highlights, and the Dual Pixel RAW file for this camera contains 15 bits of raw data, if you consider the main and auxiliary subframes together.
Here is how you can check that the main subframe of the Dual Pixel RAW is the same as a regular raw file. Compare two shots in Fine mode, taking the main frame from the Dual Pixel RAW file (that's the left part of the picture below, showing the Dual Pixel RAW file and its histogram) and the "regular" Fine raw (the right part of the picture below, showing the "regular" raw and its histogram).
As you can see, they are identical within the margin of error of the experiment. My sincerest thanks to the Imaging Resource team for their continuous hard work, and for making raw samples available to the community.
PS: Low-sensitivity raw files from other recent Canon camera models do not reach the maximum number possible with 14-bit data, which is 16383. The Canon 5D Mark IV, however, does. This indicates that the main subframe may be formed by adding the data numbers from both subpixels and clipping the result to 16383, while the auxiliary subframe contains the data for only one set of subpixels, and at base ISO it seems to be "full-well limited".
(Iliah Borg, alongside Alex Tutubalin, are main developers behind LibRaw, and the creators of two of our favorite imaging applications, FastRawViewer and RawDigger. Imaging Resource staffers use both apps regularly, and we've found them to be exceptionally useful tools -- and if you act quickly, you can purchase one or both right now at a significant discount. Thru September 20, 2016 when the Summer Sale ends, all LibRaw products are available at a 25% discount over standard pricing, with purchase information for FastRawViewer here, and for RawDigger here. And as if that wasn't already enough, even greater volume discounts of close to 50% off are available. Visit the FastRawViewer and RawDigger websites to get your free trials of these excellent apps, and be sure to get your order in by September 20 to lock in your discount!)