Dual ISO - massive dynamic range improvement (dual_iso.mo)

Started by a1ex, July 16, 2013, 06:33:50 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

tron

Quote from: tron on August 22, 2013, 07:43:22 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

I've seen the same thing on all my files.   Still gives nicer images in some situations than not using it though.


a1ex

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

Could the cr2hdr.exe obtain an optional parameter switch that will allow the caller to choose the bias?

a1ex

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

In contrast to the dng I sent I cannot open the bright dng either with CS4 or CS6.

a1ex


tron

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


tron

Quote from: a1ex on August 26, 2013, 10:30: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

... I've only showed you the theoretical limit for shadow noise and you complain about all sorts of stuff?!

tron

Quote from: a1ex 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?!
OK! I was afraid that you had changed the cr2exe !!!!

tron

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

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


a59192


a1ex

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


tron

Alex thanks and congratulations! I will try to make some tests during the weekend.

ted ramasola

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

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

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

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

Quote from: a1ex 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.

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

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