Dual Pixel RAW and Kuuvik Capture

Dual Pixel RAW is Canon’s new invention that will see its first release with the EOS 5D Mark IV. There’s some vague marketing info floating around, but haven’t seen a concise description of these files yet. So while updating Kuuvik Capture’s (websitemy posts) RAW decoder to support the 5D Mark IV, I had a chance to dig deeper into Dual Pixel RAWs.

To understand the following discussion, you need to know how Canon’s Dual Pixel AF works, especially how these Dual Pixels are divided into two separate photodiodes. This article by Dave Etchells gives you a thorough explanation.

What is a Dual Pixel RAW file?

Normal CR2 files contain the following sections:

  • Metadata
  • Previews
  • RAW data

The DPRAW file is a CR2 file that contains one more additional section:

  • Metadata
  • Previews
  • RAW data
  • DPRAW data

This organization have a very important implication. Any RAW processing software that does support the normal 5D Mark IV files will be able to open DPRAWs. If the app is unable to interpret the DPRAW data part, it will simply ignore it and will work with the file as a normal RAW. There’s no risk or penalty in taking DPRAWs (besides the huge buffer drop from 21 to 7 frames).

The DPRAW file contains the normal RAW data section to make this compatibility possible, plus one side of each pixel in the DPRAW data section.

The RAW data section contains pixel values with the sum left and right sides of the photodiode, while the DPRAW section contains pixel values from just one side of each photodiode.

The RAW data section contains pixel values with the sum of left and right side photodiodes, while the DPRAW section contains pixel values from just one photodiode of the two.

But how do we get the other side of each pixel to let Dual Pixel aware processing apps do their tricks? It’s easy: since the RAW pixel value is the sum of left and right pixel sides, just subtract the DPRAW pixel value from the RAW pixel value.

This is an unusually clever implementation from Canon, where I’m used to see all kinds of inflexible hacks that look like as if they were designed in the 1980s.

Size-wise, DPRAW files are slightly less than double the size of normal RAWs (since metadata and preview images are stored only once).

How will Kuuvik Capture 2.5 handle DPRAWs?

Not being a RAW converter, Kuuvik Capture needs the RAW data for two purposes: the RAW histogram as well as shadow/highlight warnings (the image displayed on the screen comes from the preview embedded in each CR2 file). For these the RAW data section is totally sufficient, and the app will ignore the DPRAW data section if present in a CR2 file.

The app will display normal RAW and DPRAW files equally fast, but downloading DPRAW files from the camera will take almost twice as much time as normal RAW (because of their larger size).

I assume that there will be a possibility to switch the camera into DPRAW mode remotely (I can’t be sure until my rental unit arrives). If that is the case, then a new preference will let you specify whether you’d like to shoot RAWs or DPRAWs.

5D Mark IV File Support Added to Kuuvik Capture

5d4rawisobugThis morning I had finished adding EOS 5D Mark IV file support to Kuuvik Capture (websitemy posts), and would like to share a few observations with you.

In short, all bugs introduced with the latest Canon camera releases are present in the RAW files.

First, just like the 1D X Mark II, ISOs above 51200 recorded in the EXIF incorrectly as 65535 by the camera. The screen shot on the left shows an ISO 102400 file from the 5D Mark IV. This is something that affects users and can’t be corrected in Kuuvik Capture. So if you are running into this: it’s a problem with the camera firmware, not with the app. Update: Version 3.2 fixes this, as we now can decode private Canon metadata from the files.

Second, internal lossless jpeg headers are corrupt exactly the same way the 5DS/R screws these up. Kuuvik Capture works around this bug, so it’s not something you’ll notice, just annoying to witness.

Third, the whole question of ISO 32000. Since 1/3 stop ISO values are digital trickery, the camera’s top ISO is still 25600. But it seems that marketing folks were not satisfied with that. So the fake top ISO was born. I saw this in the 7D Mark II for the first time (ISO 16000), and it seems that they are so fond of this that the 5D Mark IV also got it. The app handles it correctly, it’s just something you need to be aware of as an informed user.

Of course the upcoming version 2.5 will have full 5D Mark IV support, just wanted to share the progress with you. We plan to release version 2.5 later this fall. It will be a free update for all Kuuvik Capture 2 users.

Performance is a Key Kuuvik Capture Feature

Since I took over Kuuvik Capture last year, one of my top priorities is to provide the fastest, highest performance tool possible. While the original company arrangement did not allow for costly, time consuming optimizations required to reach the speed I wanted, now I can spend all my spare time on it. And the results are stunning. Just think the brutal improvements version 2 brought to the table…

These days I’m doing some groundwork that will make exciting new features possible in Kuuvik Capture (and also serve as a base for upcoming products). And improving performance along the way.

Kuuvik Capture 2.5 Beta

Kuuvik Capture 2.5 Beta

No more Windows leftover

Originally Kuuvik Capture was designed to be able to run on both OS X and Windows, and we used a bunch of readily available software components (Canon’s own SDK and libraw for example), which turned out to be a bag of ugly worms. I had spent several long days on wrapping those components to make them usable and reliable.

This “wrapper” was able to run on both operating systems. On top of this, the operating system specific “engine” connected the “wrapper” to the user interface and provided services to the “wrapper” (such as proper asynchronous camera communication – something that Windows completely lacks).

With version 2 I had already replaced these problematic components with my own code, but parts of the “wrapper” and the “engine” were still present. Since we decided to drop any and all Windows plans, there was no need for them – my Digital Camera Library and the user interface could talk directly. So I started to gradually remove them, which task is finished by now.

During the removal I had not just eliminated several thousand lines of code, but since there’s less machinery involved, camera communication became faster and consumes less battery. Image download from the 5DS R is 1% faster compared to version 2.4, and overall communication is up to 5% faster compared to 2.0 (measured on my mid-2012 15″ Retina MacBook Pro). This seems a small number, but think about it this way: you can take 1-5% more shots on a charge.

Even faster RAW decoding

I’m using a lossless jpeg decoder based on dcraw‘s routines to open the RAW files. This had one drawback: dcraw was not designed to be able to work on multiple images simultaneously – something I need for my future plans. Not to mention that I also had to work around this limitation in Kuuvik Capture.

Fortunately I found and fixed the issue, and my decoder not just works parallel on multiple processor cores, but also crunching numbers faster. I measured 5-6% faster file opens (with 50 megapixel files on my MacBook Pro).

When?

These improvements will be available in Kuuvik Capture 2.5 later this fall.

Polishing in Progress

Oceans are the great stone polishers. They start with rough cliffs and grind them into perfectly round pebbles. But I find the middle of this process filled with irregular shapes, sizes and chaotic arrangements the most interesting.

Polishing in Progress

Polishing in Progress

Taken with the Canon EOS 5DS R and Zeiss Otus 1.4/55 lens. Originally composed with the Mark II Artist’s Viewfinder and captured (after having a nice coffee and cake in the nearby cafe) with Kuuvik Capture 2. The exposure was elongated with a LEE Big Stopper.

It’s All White in the Beginning

All glaciers start out as a spotless pure white blanket, gaining more – darker – colors as they proceed downhill. The result is a rich variation of forms, sprinkled with subtle blue tones, but these details may lay so far away that you need a long lens to extract them.

It's All White in the Beginning

It’s All White in the Beginning

This is why I always carry a 500mm telephoto, and consider it a great landscape lens. Actually landscape use was one of the deciding factors between the 500 and the 600.

Shot with the Canon EOS 5DS R and EF 500mm f/4L IS II USM lens. The new Mark II provides enough resolution to feed the hungry 5DS R sensor.

The Choice

From time to time travelers had to make a choice. From the outside, from the surface, it may look like simply taking the bright path or the dark path. But in reality one rarely chooses between two possibilities. And even in darkness, one’s inner Sun may shine or it could fade in blinding light.

The Choice

The Choice

Photographed with the Canon EOS 5DS R and my custom modified Zeiss Distagon T* 2.8/15. The camera was controlled with Kuuvik Capture.