Magic_Lantern_logo-whiteThe breakthroughs keep coming. Magic Lantern did the unthinkable and figured out how to get RAW video out of Canon cameras, and now they've managed to increase the native dynamic range of the image without using an HDR method of varying light and dark frames, which can cause serious motion artifacts. That's all in the past for the Canon 5D Mark III and the Canon 7D, as a1ex has managed to get a major dynamic range increase right on the sensor itself in the neighborhood of 14 stops, which brings it into ARRI ALEXA and Sony F65/F55 territory.

This is currently working in both RAW video and photo for the Mark III, but photo only for the 7D. Here's a still image of ISO 100 and 1600 combined with the Mark III (grabbed from this post in the ML Forum). These samples are from Luke Neumann and were converted by a1ex to show what is possible:


Here is a RAW video frame showing combined images at 100 and 1600:


In the ML Forum, here is an explanation:

Here's a trick that samples half of the sensor at ISO 100 and the other half at ISO 1600, for example. If you mix these two, you can get almost the entire dynamic range the sensor is capable of (around 14 stops). 5D3/7D only.

There are no motion artifacts; not even a difference in motion blur for the two exposures. So, it works well for fast moving subjects.

And later, after mentioning that the 7D implementation is a bit buggy:

- 5D3: works for both raw photo and raw video. 7D: photo only.
- Select one ISO from Canon menu, the other from Dual ISO submenu.
- Expose to the right for the lower ISO (usually ISO 100). Maybe darken 1 stop from there.
- Start at ISO 100/1600.
- Try a larger gap for really extreme situations, or a smaller gap for better midtone detail (less aliasing).

Here's how to process the images:

- For CR2 files: cr2hdr.c (Windows: cr2hdr.exe). It requires dcraw and (optional) exiftool in your path.
- For RAW video files: latest raw2dng.exe.
- To get a natural HDR look: try my automatic color grading script.

So what are the downsides? For starters, this is not like Magic Lantern RAW, where the team has simply grabbed what the camera is already doing. This is a pretty serious change in the way the camera is exposing a normal image. This is not something you want to mess around with lightly. You are using it AT YOUR OWN RISK. Here is a1ex on that:

This code changes low-level sensor parameters. In the technical doc you can see how this method messes with the feedback loop for optical black, for example. Therefore, it's safe to assume it can fry the sensor or do other nasty things. My 5D3 is still alive after roughly one week of playing with this, but that's not a guarantee.

You also are losing some resolution with this mode, as you are halving resolution in the highlights and the shadows. You are more at risk for aliasing and moire since the sensor is now being sampled differently, and you're also losing 5x and 10x zoom to check focus. This may never be something you use on a daily basis because of these issues, but for some instances, if you need the dynamic range, this could work very, very well, and there won't be the strange motion issues that come from HDR and combining pixels.

A1ex has written a mathematically dense but extremely informative PDF explaining the situation and what was done in order to achieve this as well as how the images can be processed to look better. Here's a little taste of that:

As expected, intermediate ISOs like 160 or 250 do not cause any changes in ADTG/CMOS configuration. These ISOs are obtained by applying some digital gain to the raw data acquired at the nearest full-stop ISO, and this gain is configured from the DIGIC register 0xC0F08030 (SHAD GAIN). In LiveView, the gain is only applied to the YUV image (it does not affect the 14-bit raw data at all), but in photo mode, the gain is burned into the raw data. Don’t ask me why.

So, back to our CMOS register #0, it looks like the LSB nibble is probably some flag, and the other two are some sort of amplifier gains. What do you think it will happen if we change this register to 0x403 or 0x043?

It turns out... the answer to this question is the key to some massive improvement in image quality. The sensor will scan half of the lines at ISO 100 and the other half at 1600 (Figure 2).

I don't recommend this for anyone not willing to lose their camera (at least for now). Again, this is not like all of the other Magic Lantern advancements that have come before it. This is a major change in the way the sensor is actually operating. The upside, though, is that it is a very serious increase in dynamic range. This new breakthrough is actually operating in a similar way to how the sensor in the ARRI ALEXA operates. It's taking dual readouts from shadows and highlights and combining them in a seamless way very early on in the picture pipeline. The reason this is possible, it seems, is because of an 8 channel readout in the Mark III and the 7D, whereas most of the Canon cameras only have 4, so they will not be able to take advantage of this update. The new 70D, however, might actually be able to do it since it supposedly has 8 channels.

The team over at Magic Lantern have done impossible things over and over again, so I don't doubt for a second that literally anything is possible. It's definitely worth reading the PDF just to get the background on what's going on, so head on over to the Magic Lantern forum to check out the document, as well as download the new update.

Link: Dual ISO - massive dynamic range improvement for 5D3 and 7D -- Magic Lantern Forum

[via Magic Lantern Twitter]