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

awesnap

  • New to the forum
  • *
  • Posts: 7
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1750 on: February 03, 2014, 06:03:08 AM »
It's really doing ISO 400/1600.  You haven't specified what camera model you're using, but the available recovery ISOs are restricted depending on the particular model.  I know that my 50D tops out at ISO 1600.  The technical reason for this restriction is that Dual ISO is implemented by changing the CMOS-gain registers, while the ISOs greater than 1600 on the 50D have the same CMOS gain as ISO 1600 (a different amplifier gets you to the higher ISOs).

Ok thanks.  Yea sorry about that, I forgot.  I have a 5d mk2


Recently I decided to try this out when I was out for a party at a museum.  The dance floor was pretty much pitch black, so I decided to use a flash. I noticed during post afterward, when I load the files in Lightroom 5 and shooting people, I tend to take down the highlights, resulting in the skin gets VERY "sun-burned". More so than regular raw files (obviously, cause the highlight recovery is insanely effective now)....  Besides taking down the red/yellow/orange levels to try and compensate and recover the highlights, is there anything you guys would recommend to keep the "sun-burn" under control?

I'm loving this level of control of DR I have now, its so addicting to just shoot Dual Iso all the time!! Thank you again for this awesome tool!!

awesnap

  • New to the forum
  • *
  • Posts: 7
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1751 on: February 03, 2014, 06:30:07 AM »
Also, one other quick question I had.  When exposing for a Dual ISO shot, are you guys exposing for the base ISO, or the recover ISO, or somewhere in between?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1752 on: February 03, 2014, 07:15:04 AM »
Expose to the right for ISO 100, then bump the recovery ISO to fill the shadows (400-1600, depending on how much contrast you have).

Tip: auto ETTR does it for you.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1753 on: February 03, 2014, 09:09:20 AM »
Another test with a fake dual ISO from two ISO-bracketed shots from Audionut: 100.CR2 and 1600.CR2.

Code: [Select]
fake_dual_iso 100.CR2 1600.CR2
cr2hdr out.dng --debug-blend
mv out.DNG final-output.dng

Highlights:

Code: [Select]
ufraw-batch --temperature=3500 --green=0.8 --exposure=0.5 100.CR2          --out-type=ppm --output=- | convert - -crop 1200x800+425+2500 hi-100.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=-3.5 1600.CR2        --out-type=ppm --output=- | convert - -crop 1200x800+425+2500 hi-1600.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=1.5 fullres.dng      --out-type=ppm --output=- | convert - -crop 1200x800+425+2500 hi-fullres.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=1.5 halfres.dng      --out-type=ppm --output=- | convert - -crop 1200x800+425+2500 hi-halfres.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=1.5 final-output.dng --out-type=ppm --output=- | convert - -crop 1200x800+425+2500 hi-final-output.jpg

100 and 1600 (left is ground truth for highlights):


full-res and half-res (reconstructed from the fake dual ISO shot)


final output (reconstructed from the fake dual ISO shot)


Midtones:
Code: [Select]
ufraw-batch --temperature=3500 --green=0.8 --exposure=2.5 100.CR2          --out-type=ppm --output=- | convert - -crop 1200x800+1750+2650 mid-100.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=-1.5 1600.CR2        --out-type=ppm --output=- | convert - -crop 1200x800+1750+2650 mid-1600.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=3.5 fullres.dng      --out-type=ppm --output=- | convert - -crop 1200x800+1750+2650 mid-fullres.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=3.5 halfres.dng      --out-type=ppm --output=- | convert - -crop 1200x800+1750+2650 mid-halfres.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=3.5 final-output.dng --out-type=ppm --output=- | convert - -crop 1200x800+1750+2650 mid-final-output.jpg

100 and 1600 (ground truths):


full-res and half-res (reconstructed from the fake dual ISO shot)


final output (reconstructed from the fake dual ISO shot)



Shadows:
Code: [Select]
ufraw-batch --temperature=3500 --green=0.8 --exposure=6.5 100.CR2          --out-type=ppm --output=- | convert - -crop 1200x800+3650+2600 shad-100.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=2.5 1600.CR2         --out-type=ppm --output=- | convert - -crop 1200x800+3650+2600 shad-1600.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=7.5 fullres.dng      --out-type=ppm --output=- | convert - -crop 1200x800+3650+2600 shad-fullres.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=7.5 halfres.dng      --out-type=ppm --output=- | convert - -crop 1200x800+3650+2600 shad-halfres.jpg
ufraw-batch --temperature=3500 --green=0.8 --exposure=7.5 final-output.dng --out-type=ppm --output=- | convert - -crop 1200x800+3650+2600 shad-final-output.jpg

100 and 1600 (right is ground truth for shadows):


full-res and half-res (reconstructed from the fake dual ISO shot)


final output (reconstructed from the fake dual ISO shot)


Feel free to repeat this test on your own bracketed images (you don't need any source code modifications; simply change your crop windows, exposures, white balance, and then paste the commands in the terminal).

Tools you need: fake_dual_iso.exe, cr2hdr, ufraw (I used ufraw-mod), ImageMagick and a Unix-like shell.

Happy pixel peeping!

P.S. try getting a better blending between fullres and halfres (compared to my final output). You may try getting as close to the ground truths as you can.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1754 on: February 03, 2014, 10:15:27 AM »
Can you update fake_dual_iso to accept tiff?

I'd like to test my theory of applying noise reduction on the dark ISO.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1755 on: February 03, 2014, 10:38:41 AM »
It's not quite straightforward. I think the easiest way is to split the tif into RGB, save each one as pgm, load them in fake_dual_iso.c with the existing routine, and redo the bayering.

Here's the source if you want to try: http://a1ex.magiclantern.fm/bleeding-edge/fake_dual_iso.c

To build it, copy the Makefile rules from cr2hdr, but use this source file instead.

Even if you denoise from dxo, you will get a linear (RGB) DNG, so you need to write the code to load it.

Therefore, I believe the really easy way is to implement the denoise filter in cr2hdr (in the "dark" image, probably before interpolation). Try a bilateral filter, it's fairly easy to write and shouldn't blur edges too much.

joebone

  • New to the forum
  • *
  • Posts: 10
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1756 on: February 06, 2014, 04:58:57 PM »
when reviewing these pictures in the camera they will look all banded and stuff right, it wont look right till post processing? 

sqd

  • New to the forum
  • *
  • Posts: 8
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1757 on: February 06, 2014, 05:43:56 PM »
when reviewing these pictures in the camera they will look all banded and stuff right, it wont look right till post processing?

Yep.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1758 on: February 06, 2014, 07:17:39 PM »
when reviewing these pictures in the camera they will look all banded and stuff right, it wont look right till post processing?

There is/was an experimental patch to display part of the picture merged in camera - it's still available in the famed Tragic Lantern :-p though at least I never got it working on the 6d, but in ML it's not in the current dual_iso module... probably for good reason.

Personally, I've gotten some training in evaluating dual_iso shots in camera (sharpness & exposure) so I'm not so desperate for an immediate preview anymore ... I'd rather have the wb in acr correct, but I hope we acr users will figure something out sooner or later.

kyrobb

  • Member
  • ***
  • Posts: 131
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1759 on: February 09, 2014, 02:17:22 AM »
How do I get Dual ISO to work with video on the 50D. When I turn video on, it won't let me use dual iso. It says [MOVIE] This feature requires you shooting RAW.  I'm using the latest nightly and have Raw enabled... What am I doing wrong? I can only seem to shoot dual iso stills.

ayshih

  • Contributor
  • Senior
  • *****
  • Posts: 266
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1760 on: February 09, 2014, 09:36:15 AM »
Unless I'm mistaken, the 50D (along with other cameras of the same generation) cannot make use of Dual ISO in movie mode because it does not use ISO registers in the same way as in photo mode.  The error message is misleading because Dual ISO can be disabled because the ISO register is not defined, not just because RAW recording is not enabled.
Canon EOS 50D | 17–40mm f/4L & 70–300mm f/4.5–5.6 DO IS | Lexar 1066x

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1761 on: February 11, 2014, 06:12:08 AM »
I would have been using mini_iso on these.  BL 64, WL 16380.
https://dl.dropboxusercontent.com/u/34113196/ML/_46A3766.CR2



The same thing happens with different recovery ISOs.
Here is a preview of 100/6400 for instance.


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1762 on: February 11, 2014, 07:49:31 AM »
It converts fine with the upcoming 20-bit engine (I should clean it up and post an update).

Output black level is 240 with both engines.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1763 on: February 11, 2014, 08:30:45 AM »
It converts fine with the upcoming 20-bit engine (I should clean it up and post an update).

That's of course interesting and I'm looking forward to it, just one note: If the fp files are significantly larger than 16bit I wouldn't mind if you keep maintaining the smaller version, I'm saying this because I know some people don't care about disk space, but some do.

Maybe you'll add some branching to cr2hdr to automatically decide if 16bit is enough for this specific shot or a higher bit depth is required?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1764 on: February 11, 2014, 08:35:01 AM »
Nope, the output is still 16-bit, only the internal processing will be 20-bit.

If I'll add an option for output, that would be floating point DNG (and the default will be still 16-bit).

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1765 on: February 11, 2014, 10:06:07 AM »
I didn't even think to check the 20bit version.


SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1766 on: February 11, 2014, 04:17:18 PM »
Nope, the output is still 16-bit, only the internal processing will be 20-bit.

If I'll add an option for output, that would be floating point DNG (and the default will be still 16-bit).

Is 20-bit is a limitation?
(I'm thinking about 32-bit internal -> 32-bit integer FITS file output for linear work purposes)

BTW 16-bit floating point DNG output should be nice, indeed.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1767 on: February 11, 2014, 04:19:09 PM »
I use some lookup tables (from linear to log and back), and for this, 20-bit is already on the large side.

Floating point makes sense on CeroNoice - http://www.magiclantern.fm/forum/index.php?topic=9581

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1768 on: February 11, 2014, 09:50:14 PM »
Indeed, 2*12-bit - overlap should fit in 20-bit.
Mathematically it makes sense for 3 images or more, so not the case with dual_iso.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1769 on: February 11, 2014, 11:15:11 PM »
I use some lookup tables (from linear to log and back), and for this, 20-bit is already on the large side.

Does this 20bit processing obsolete the --soft-film option you recently introduced to cr2hdr, or is it still worth experimenting with that?

It looks like it might fix one problem of acr: even with highlight recovery @max some dual_iso files still have to much contrast in the highlights so I need to use tone curves in LR - which might lower iq, or is this about the same like your cr2hdr curve?

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1770 on: February 12, 2014, 05:30:20 PM »
20bit is just the internal processing.  The output could still contain information pushing the limits of 16bit.  Here, --soft-film will help.

mrd777

  • New to the forum
  • *
  • Posts: 49
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1771 on: February 13, 2014, 06:37:01 AM »
When I put my canon iso to 100 and dual_iso's iso to 1600, then take a photo, it comes out with horizontal lines in my LCD - as expected. However, when I go to my comp and put the CR2 into cr2HDR.exe, it processes and outputs a DNG with only iso 100 (very dark)... I try to use Camera Raw to pull it back up in brightness, but it doesn't go enough, and it is super noisy.

 any ideas?

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1772 on: February 13, 2014, 06:44:22 AM »
Do you have your highlights exposed close to saturation (clipping)?

mrd777

  • New to the forum
  • *
  • Posts: 49
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1773 on: February 13, 2014, 07:15:06 AM »
No. I'm in my room with a computer monitor which is super blown out, unless I go to iso100 with the Canon ISO, which is what I did, and then ML with 1600 on the dual_iso

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1774 on: February 13, 2014, 07:41:53 AM »
You should ensure that you have your base ISO (ISO 100 in this case) exposure at close to saturation.  That is, the really bright bits in the scene should be at the right hand side of the histogram.

Why? 

Shot noise is not affected by ISO.  The recovery ISO (ISO 1600 in this case) doesn't fix the shot noise, it only cleans up the noise inherent in the camera electronics.  Higher ISOs are cleaner then lower ISOs:  http://www.clarkvision.com/articles/evaluation-canon-5diii/

In post processing, dual_iso files have an extended dynamic range that is pushing the limits of the 16bit output.  So here, if you have your highlights exposed at say -1.5 EV below saturation, you lose out on 3 fronts. 

First:  Your captured scene contains an increased amount of shot noise (then it would if the scene was exposed correctly for the highlights).
Second:  Your shadows are digitally stored with to few bits.  <-- research bit depth/tonal range
Third:  Your post processing software may struggle to correctly render the brightness.


A computer monitor in a dark room will result in a dynamic range well in excess of 11 EV.  Here, the dark areas of the scene will suffer from shot noise even with the highlight exposure set correctly.  Here, dual_iso will clean the electronic noise added by the camera, but cannot clean the shot noise.