Headline news

Want to help with Magic Lantern development, without having to code?

You can find our live webchat here: [email protected]

Author Topic: Dual ISO - massive dynamic range improvement (dual_iso.mo)  (Read 438656 times)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 7542
  • 5D Mark Free
Dual ISO - massive dynamic range improvement (dual_iso.mo)
« on: July 16, 2013, 06:33:50 PM »
Time for the first real image quality improvement in ML history :)

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. Now it works on most cameras!

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



Please post your samples here -> Thread photos dual ISO

More samples on Flickr (tag: Dual-ISO)
Tutorial - Guide to using Dual ISO Mode on your Canon 5D Mark III
Open Source Brings High-End Canon 5D MK III Dynamic Range Closer to Nikon D800

Code
- dual_iso module
- recent nightly builds should have this working on most cameras

Technical doc
- dual_iso.pdf (in-depth description of how it works)
- See also: ADTG and CMOS discussion

Warning
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.

We don't pay for repairs. Use it at your own risk.

Also, the 7D implementation seems quite buggy right now. Don't use it for serious stuff yet. Programming the dual DIGIC is not that easy for parallel computing noobs like me. SOLVED!

Usage
- 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/800.
- Try a larger gap for really extreme situations, or a smaller gap for better midtone detail (less aliasing).

Histograms, ETTR, playback tricks

- ETTR integrates with dual ISO (just enable both). It will use dual ISO only in high dynamic range scenes. Adjust the SNR limits to let the algorithm know what exactly is a "high dynamic range scene" and to fine-tune the balance between midtone/shadow noise and highlight aliasing.

- Raw zebras: weak markers appear where only one of the two ISOs is overexposed (likely to get aliasing), strong markers appear where both ISOs are overexposed (there's no more detail in these areas).

- Raw histogram will use the darker exposure. Consider the brighter one as some sort of shadow recovery.
- JPEG zebras/histogram are totally unreliable.
- In photo LiveView you will see the ISO from Canon menu. In movie mode, you will see horizontal lines.
- Playback in 1x will show some sort of HDR preview. At certain zoom levels, you'll be able to see only one of the two exposures, at very low resolution.
- The dynamic range indicator from the histogram is not accurate. (solved!)

Postprocessing

- Reference converter: cr2hdr.c (Windows:cr2hdr.exe). It requires dcraw and (optional) exiftool in your executable path (they are in the zip). Drag and drop the CR2 files over cr2hdr.exe.

- Experimental 20-bit version: cr2hdr-20bit.exe

- For RAW video files: extract the DNGs with any method you like (e.g. raw2dng or mlv_dump), then drag the DNG files over cr2hdr.exe

- GUI frontends:
   - Lightroom plugin (WIN/MAC)
   - BarracudaGUI (WIN)
   - Script for multiple instances of cr2hdr (WIN, VBScript)
   - Mac GUI for cr2hdr: OSX_cr2hdr_app.zip and OSX_cr2hdr.zip
   - MLV to DNG Batch Converter (WIN, video only)

- To get a natural HDR look: try my automatic color grading script.

Price to pay
- Half resolution in highlights and shadows
- Aliasing and moire - of course, in highlights and shadows
- You can no longer check critical focus when zooming in

Samples

This is actually a video frame from 5D Mark III. Here's the DNG.
Bottom-left: ISO 100. Top-right: ISO 100/1600.
Credits: Luke Neumann.



The next one is a still photo from 5D Mark III. Here's the DNG and the original CR2. ISO 100/1600.






Questions? Read the pdf first. The mistery should clear up, I hope.

That's it. Looking forward to your samples.
« Last Edit: Today at 06:05:53 PM by a1ex »

Andy600

  • Contributor
  • Hero Member
  • *****
  • Posts: 1372
  • Have you tried turning it off and on again?
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #1 on: July 16, 2013, 06:39:28 PM »
a1ex - this is amazing! Super impressed.
600d & 50d / Manual lenses / Post in After Effects, Premier Pro and Davinci Resolve. Brit living in Latvia. Developer of CinelogDCP www.cinelogdcp.com

driftwood

  • Contributor
  • Freshman
  • *****
  • Posts: 70
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #2 on: July 16, 2013, 06:47:18 PM »
Excellent work a1ex.
Canon 60D, Canon 5DMK3, Lexar 1000x 128GB CF, Panasonic (shhhh!) GH2s & GH3s. :-)

iaremrsir

  • Member
  • ***
  • Posts: 160
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #3 on: July 16, 2013, 07:14:27 PM »
 :o Mother of God, this is amazing! You guys never fail to impress!

platu

  • Freshman
  • **
  • Posts: 94
  • 5D3, 60D
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #4 on: July 16, 2013, 07:15:56 PM »
Wow... so clever!   And so useful!!  Thank you for your work on this and for the in depth technical docs.

ilguercio

  • Contributor
  • Hero Member
  • *****
  • Posts: 839
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #5 on: July 16, 2013, 07:18:43 PM »
It's all very interesting but it's a shame that you can only use the trick on the 5DIII and sort of on the 7D.
I guess that this research could easily lead into other interesting things, being able to control the sensor readout is a BIG thing.

Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

critycal

  • New to the forum
  • *
  • Posts: 5
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #6 on: July 16, 2013, 07:24:37 PM »
Is there any possibility to port it to the 5DII

D.L. Watson

  • Supporter
  • Freshman
  • *****
  • Posts: 76
  • Film Artist
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #7 on: July 16, 2013, 07:33:00 PM »
That's too bad it only works on the 5D Mark III. Oh well, loving the images out of my 50D.
See my portfolio of work at www.dlwatson.net

Danne

  • Supporter
  • Hero Member
  • *****
  • Posts: 923
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #8 on: July 16, 2013, 07:33:46 PM »
This is too crazy. Who could ever imagine. The mother of all updates, with raw video to. E x c e l l e n t!

Stedda

  • Supporter
  • Senior
  • *****
  • Posts: 444
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #9 on: July 16, 2013, 07:43:07 PM »
Amazing, thank you for more great features!
5D Mark III -- 7D   SOLD -- EOS M 22mm 18-55mm STM -- Fuji X-T1 18-55 F2.8-F4 & 35 F1.4
Canon Glass   100L F2.8 IS -- 70-200L F4 -- 135L F2 -- 85 F1.8 -- 17-40L --  40 F2.8 -- 35 F2 IS  Sigma Glass  120-300 F2.8 OS -- 50 F1.4 -- 85 F1.4  Tamron Glass   24-70 2.8 VC   600EX-RT X3

anchoricex

  • New to the forum
  • *
  • Posts: 20
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #10 on: July 16, 2013, 07:43:48 PM »
Please, for everyones sake people, don't come in here and ask "when can we expect this for <insert canon model here>"

The 5dmkiii is a highly capable camera and with it's hardware it makes sense that many of these new developments are coming forward on this platform. I, myself, moved on from my 550d to the 5dmkiii because of the future course of Magic Lantern developments.

This is an insane development to come in the midst of all the raw development. So much new stuff to go forward with, I'd imagine it's going to be quite some time before a stable release is on the horizon

johnha

  • New to the forum
  • *
  • Posts: 22
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #11 on: July 16, 2013, 07:45:09 PM »
Incredible work. The white paper was illuminating. Thank you A1ex!

jaybirch

  • New to the forum
  • *
  • Posts: 26
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #12 on: July 16, 2013, 07:50:32 PM »
Words fail me.... Amazing.

Look forward to testing this out

rmihai81

  • Just arrived
  • *
  • Posts: 1
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #13 on: July 16, 2013, 07:52:26 PM »
Nice work my friend!!!!

ilguercio

  • Contributor
  • Hero Member
  • *****
  • Posts: 839
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #14 on: July 16, 2013, 07:54:51 PM »
The way i understand it is that no further moire or aliasing is introduced in raw while recording vs stills.
This is amazing.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

discocalculi

  • Supporter
  • Freshman
  • *****
  • Posts: 63
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #15 on: July 16, 2013, 07:55:09 PM »
Awesome! Should buy myself some new cameras instead of lenses. Looks promising.

Stedda

  • Supporter
  • Senior
  • *****
  • Posts: 444
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #16 on: July 16, 2013, 07:55:47 PM »
Please, for everyones sake people, don't come in here and ask "when can we expect this for <insert canon model here>"

Amen, just reading the PDF should answer that question. Other cameras aren't sold with the same level of hardware as the higher end cameras.
5D Mark III -- 7D   SOLD -- EOS M 22mm 18-55mm STM -- Fuji X-T1 18-55 F2.8-F4 & 35 F1.4
Canon Glass   100L F2.8 IS -- 70-200L F4 -- 135L F2 -- 85 F1.8 -- 17-40L --  40 F2.8 -- 35 F2 IS  Sigma Glass  120-300 F2.8 OS -- 50 F1.4 -- 85 F1.4  Tamron Glass   24-70 2.8 VC   600EX-RT X3

Kabuto1138

  • Freshman
  • **
  • Posts: 84
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #17 on: July 16, 2013, 08:03:50 PM »
Amazing, I had to read this 3 times so I can make sure what I was reading was what think it is.  Holly crap.  Is official, 5dIII is a mini Alexa.

BTW Alex, I can't access the PDF you posted in Dropbox.  It gives me an error.

Frank209

  • New to the forum
  • *
  • Posts: 17
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #18 on: July 16, 2013, 08:05:19 PM »
Error (509)
This account's public links are generating too much traffic and have been temporarily disabled!



This just means that we all love you A1ex!

jc

  • New to the forum
  • *
  • Posts: 30
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #19 on: July 16, 2013, 08:08:27 PM »
sounds an amazing feature!!! so useful for HDR stills with motion in them .. and for video might be even more amazing
I can't however get any of the links to work? they say :

Error (509)
This account's public links are generating too much traffic and have been temporarily disabled!

Could the files be hosted elsewhere please?

James

wintix

  • Supporter
  • Freshman
  • *****
  • Posts: 55
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #20 on: July 16, 2013, 08:22:40 PM »
i took the liberty of mirroring it:

http://linuxdingsda.de/~wintix/dual_iso.pdf

duncanidaho25

  • Supporter
  • New to the forum
  • *****
  • Posts: 42
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #21 on: July 16, 2013, 08:33:33 PM »
wow!  wish i had a 5D3 and not a 5D2.
5D2 |  VAF-5d2b | Komputerbay 64GB 1000x  | 14, 24, 35, 85 Samyang Lens Set  | 50, 180 Nikon | Marshall V-LCD51 | DigiFinder | 528s LED Amaran lights

Rick M

  • New to the forum
  • *
  • Posts: 10
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #22 on: July 16, 2013, 08:35:06 PM »
Awesome work; I don't have a 5DIII, so wont' be able to enjoy the cool stuff like this, but it's definitely a sign of progress that you guys are getting deeper into how the sensors are working and what not.

Random question that has to do with the sensor workings: On lower end models, would it be possible to reduce moire/anti-aliasing by modifying the sensor read outs or something similar? I know the 5DIII is typically moire/anti-aliasing free, but I'm not quite sure how or why that is. I know there's also the VAF filters available for lower end cameras, but still, with this type of manipulation I'm curious if there would be a way to reduce this common problem on lower end models.

Thanks for the awesome work you guys do and any time it takes to answer my question (which might be really foolish).

IliasG

  • Member
  • ***
  • Posts: 123
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #23 on: July 16, 2013, 08:39:30 PM »
Magical !!!!!!

Although the bad side effects (low resolution moire aliasing) are serious defects.

Just thinking loudly ..
What if you try with alternating ISO line by line and use no interpolation just scale the not-burned hiISO pixels by low/hi (zero point should be the Black level). Then a good highlight recovery algo can make the job it knows best ...
This could decrease the DR expansion a bit (1 stop ??) but I think denoise algos can make a good job there also .. I am thinking of denoise at raw level like those at the "RAW" tab of RawTherapee
 
Line by line interlacing will give the opportunity to use hi ISO on the weak line depending on the WB (red for daylight, blue for tungsten) ..   

haemma

  • New to the forum
  • *
  • Posts: 15
Dual ISO - massive dynamic range improvement for 5D3 and 7D
« Reply #24 on: July 16, 2013, 08:41:03 PM »
Amazing Work! Thanks for your effort.  :)