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

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #725 on: August 26, 2013, 08:32:27 PM »
https://www.dropbox.com/s/rjjpbcloe0dbfvl/IMG_0200test.CR2
hello, on the generated dng (from the above CR2) I also noticed that the repeatable pattern I reported can be observed not only in shadows but in mid tones as well. Generally it can be seen everywhere, it is just easier to see it in shadows. You may have to use 300% or 400% to see it but it is there  :(

ed.jenner

  • New to the forum
  • *
  • Posts: 33
Re: Dual ISO - massive dynamic range improvement
« Reply #726 on: August 26, 2013, 08:51:21 PM »
I've seen the same thing on all my files.   Still gives nicer images in some situations than not using it though.


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #727 on: August 26, 2013, 09:14:41 PM »
It's caused by the bias towards more shadow details and less aliasing. The first cr2hdr was minimizing the noise, but people pointed out the aliasing issues very quickly. Instead of nice pictures in extreme lighting conditions, first samples were power lines, trees and dark keyboards...

Here's the lowest shadow noise that you can get from this shot: IMG_0200test_bright.dng

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #728 on: August 26, 2013, 09:42:26 PM »
Could the cr2hdr.exe obtain an optional parameter switch that will allow the caller to choose the bias?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #729 on: August 26, 2013, 09:53:23 PM »
I'd like something that chooses near-optimal settings every time. But I think I'll add something that outputs the components before blending (e.g. the ISO 100 half, the ISO 1600 half, the full-res image and so on).

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #730 on: August 26, 2013, 09:56:41 PM »
In contrast to the dng I sent I cannot open the bright dng either with CS4 or CS6.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #731 on: August 26, 2013, 10:21:59 PM »
Re-uploaded, should be OK now.

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #732 on: August 26, 2013, 10:28:15 PM »
The new .dng  was a disaster. Pink or Magenta  instead of white everywhere! Maybe a WB problem but I am not sure that  it can be fixed (in contrast to the original .dng which was easily fixable)

However, I do not think I see these patterns now at the shadows!!!

But it is unusable. Even with patterns the previous was better  :(

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #733 on: August 26, 2013, 10:30:08 PM »
In shadows?!

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #734 on: August 26, 2013, 10:36:08 PM »
In shadows?!
The new .dng  was a disaster. Pink or Magenta  instead of white everywhere! Maybe a WB problem but I am not sure that  it can be fixed (in contrast to the original .dng which was easily fixable)

However, I do not think I see these patterns now at the shadows!!!

But it is unusable. Even with patterns the previous was better  :(

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #735 on: August 26, 2013, 10:38:38 PM »
... I've only showed you the theoretical limit for shadow noise and you complain about all sorts of stuff?!

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #736 on: August 26, 2013, 10:42:44 PM »
... I've only showed you the theoretical limit for shadow noise and you complain about all sorts of stuff?!
OK! I was afraid that you had changed the cr2exe !!!!

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #737 on: August 26, 2013, 10:44:55 PM »
But still very IMPRESSIVE. If only the changes you demonstrated could be applied to the shadows with no other effects Nikon would file for bankruptcy!

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7740
Re: Dual ISO - massive dynamic range improvement
« Reply #738 on: August 26, 2013, 11:07:11 PM »
LOGAN57 on the 7d thread uploaded a dual iso cr2 mac converter app. The thread can be found here http://www.magiclantern.fm/forum/index.php?topic=7752.msg68051;topicseen#msg68051
I put it up on google drive for anyone interested.

cr2hdr_mac

https://docs.google.com/file/d/0B4tCJMlOYfirUW1GRGw5bk02Q0E/edit?usp=sharing

*Actually the compiled stuff was from A.D here https://bitbucket.org/a_d_/magic-lantern/downloads/

Greg

  • Contributor
  • Hero Member
  • *****
  • Posts: 607
Re: Dual ISO - massive dynamic range improvement
« Reply #739 on: August 27, 2013, 02:16:31 PM »
500D test :

ISO 100


DUAL ISO 100-1600

a59192

  • New to the forum
  • *
  • Posts: 13
Re: Dual ISO - massive dynamic range improvement
« Reply #740 on: August 27, 2013, 04:22:23 PM »
500D test :

ISO 100
DUAL ISO 100-1600


Will the 500D how to use Dual ISO?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #741 on: August 27, 2013, 05:17:31 PM »
Updated cr2hdr (first post):

- better handling of shadow aliasing (thanks Ted for this resolution chart)
- robust line fitting when estimating ISO (median is doing wonders, fixes the duck from Danne and some banding issues)
- fix some tricky overexposed shots (like the CR2 from akumiszcza)
- better handling of hot/cold pixels in some extreme situations (e.g. the CR2 from canon eos m) - but still has some subtle artifacts
- reduced some shadow noise patterns (e.g. the CR2 from tron)

Also I've added some dynamic range analysis (estimated from how much noise you have in the optical black areas). The formula is just log2(full well capacity / noise stdev) and ignores the autocorrelation of the noise (which I don't know how to handle), so it's probably grossly inflated.

Sample before/after:


If you still have problems with image quality, upload the CR2.

noisyboy

  • Guest
Re: Dual ISO - massive dynamic range improvement
« Reply #742 on: August 27, 2013, 05:23:00 PM »
That's a massive improvement dude! Cool  8)

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #743 on: August 27, 2013, 05:26:10 PM »
Alex thanks and congratulations! I will try to make some tests during the weekend.

ted ramasola

  • Moderators
  • Hero Member
  • *****
  • Posts: 1251
Re: Dual ISO - massive dynamic range improvement
« Reply #744 on: August 27, 2013, 05:39:07 PM »
A1ex,

Seeing how much better color aliasing and moire is handled by tweaking the cr2hdr code, and also in my tests on the 5dmkII WITHOUT the VAF filter,
that dual iso image is better with aliasing compared to a Raw video and h264 video without vaf,

Would it be possible that you can FIX once and for all the issues with aliasing and moire that plagued these cameras by implementing this algorithms even without dual iso on the raw video image?
5DmkII  / 7D
www.ramasolaproductions.com
Texas

tron

  • Member
  • ***
  • Posts: 162
Re: Dual ISO - massive dynamic range improvement
« Reply #745 on: August 27, 2013, 05:47:40 PM »
hello, I run it against my CR2 (the one you have access to) and it crashed  :(

It initiated the Visual Studio debugger so I let it run and then captured the debugger screenshot that shows the offending instruction.

https://www.dropbox.com/s/2qtnuft59et5yfi/ch2hdr-27-8-crash.JPG

The last message printed was Looking for hot/cold pixels...


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #746 on: August 27, 2013, 05:48:14 PM »
I can only fix aliasing where there's some information about the missing pixels (and that's what I'm doing here).

For example: let's say the higher ISO is completely overexposed. This means the missing pixels are for sure higher than white level minus ISO difference (for 100/1600, that's white minus 4 stops). This info is essential for guessing what's there (it was the key for solving the palm tree shot).

In 5D2, there's no info about what might be in the skipped lines, so, according to Nyquist theorem, this is something that can't be fixed in post.

AdamTheBoy

  • New to the forum
  • *
  • Posts: 19
Re: Dual ISO - massive dynamic range improvement
« Reply #747 on: August 27, 2013, 05:54:49 PM »
I love Dual ISO, it really can produce some stunning imagery!  I'm excited to test the newest processing method on raw video but I don't know if it's been adapted for video yet, is that further down the line?  Still, this is really awesome.

ted ramasola

  • Moderators
  • Hero Member
  • *****
  • Posts: 1251
Re: Dual ISO - massive dynamic range improvement
« Reply #748 on: August 27, 2013, 05:57:46 PM »
I can only fix aliasing where there's some information about the missing pixels (and that's what I'm doing here).

For example: let's say the higher ISO is completely overexposed. This means the missing pixels are for sure higher than white level minus ISO difference (for 100/1600, that's white minus 4 stops). This info is essential for guessing what's there (it was the key for solving the palm tree shot).

In 5D2, there's no info about what might be in the skipped lines, so, according to Nyquist theorem, this is something that can't be fixed in post.

Is the pattern for skipping lines constant? I mean do we have the information on which lines from the sensor is being skipped? Is this not constant so you can apply an algorithm for resolving that missing line?

Maybe just maybe if you apply your dual iso algorithm tweaked a bit for  non dual iso shot that compensates not for an overexposure but the similar then maybe it would be better in guessing it than how the current debayer is handling it.

I will email to you a dng of full resolution chart properly framed without the vaf.
5DmkII  / 7D
www.ramasolaproductions.com
Texas

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement
« Reply #749 on: August 27, 2013, 06:02:30 PM »
@AdamTheBoy: not yet. Dirty trick: you can try to process the video with a tool that doesn't know about dual ISO, then drag the DNG files over cr2hdr. This may not work with the latest one, because it relies on the black bars (not present in raw video files), but with the older one (or cr2hdr_exp, look it up in the thread) should work just fine.

@ted: it reads one line, skips 2, and I don't know how to change it. I think it can be shifted somehow with ADTG registers, but this area is still a mistery.

To hide color aliasing where I can't recover it, I do some median filtering, but I believe all serious converters do it (dcraw does, I took the algorithm from there).

@tron: solved, download again.