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

Lupo_wolfi

  • New to the forum
  • *
  • Posts: 4
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1675 on: December 29, 2013, 08:11:31 PM »
Time for the first real image quality improvement in ML history :)

Postprocessing

- For CR2 files: 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.

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

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


It works as long the group of DNG files to drag on cr2hdr.exe, is less than 2300.
In small groups of DNG it works. But if I drag the whole 2300 DNGs files, it tells me that "File name or extention is too long"

djronbxs

  • New to the forum
  • *
  • Posts: 18
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1676 on: December 29, 2013, 08:53:00 PM »
why when i process the photos with cr2hdr im loosing the icc profile information ?

thanks
ron

Erik

  • New to the forum
  • *
  • Posts: 5
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1677 on: January 01, 2014, 02:45:40 AM »
Problem and Possible Solution with Pink highlights in Video

I'm using dualiso a lot in video, and want to share some fails/successes with pink highlights. Maybe we can tweak some settings to get the best results:


Workflow
I'm running all .RAW files against raw2dng, then running the DNGs against cr2hdr, then finally a converter to ProRes or another proxy.

Problem
When I use the latest cr2hdr.exe, if the shot has really tough lighting I get nasty pink lines in my highlights that are not present in the interlaced DNG I get from raw2dng. So the culprit is likely to be cr2hdr, right?

Possible Solutions
I've tried 5 different versions of cr2hdr (thanks A1ex for all the hard work), and have found varying degrees of success:

You can view DNGs, exes, logs, etc:
https://www.dropbox.com/sh/78nozdsmyu4waei/-Xu6-IjAOs

I'll keep posting results

cr2hdr_histmatch -- overall best; eliminated most pink interpolation highlights and green pixelation; does produce some flickering in highlights an a few pink highlights


cr2hdr_hot -- eliminated interpolation, eliminated most pinks, eliminates some small green pixelation, but still has some pink highlight in a few frames


cr2hdr_histmatch2 -- eliminated interpolation, eliminated most pinks, but still has some pink highlight and green pixelation in a few frames


cr2hdr_histmatch3 -- eliminated interpolation, eliminated most pinks, but still has some pink highlight and green pixelation in a few frames

5d mkiii - RAW Hack Firmware Dated-2013.Aug.6.

Erik

  • New to the forum
  • *
  • Posts: 5
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1678 on: January 01, 2014, 11:16:49 PM »
Video produced using cr2hdr-histmatch. Note the highlight flashing and pink highlights near the end of the video.

Still has some highlight issues:
5d mkiii - RAW Hack Firmware Dated-2013.Aug.6.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1679 on: January 01, 2014, 11:20:47 PM »
Have you tried the cr2hdr from the first post of this thread?  It was updated about a month ago iirc.

TheFilmGuy

  • New to the forum
  • *
  • Posts: 2
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1680 on: January 02, 2014, 03:47:54 AM »
Thank you! This feature works flawlessly minus the resolution loss.









Erik

  • New to the forum
  • *
  • Posts: 5
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1681 on: January 02, 2014, 05:19:59 PM »
Thanks Audionut.

Have you tried the cr2hdr from the first post of this thread?  It was updated about a month ago iirc.

Yes. It yields the worst results - pink interpolation and green pixelation in highlights.
Currently histmatch rev1 produces the best images, though it still has issues - flickering highlights, some pink highlights.
I'm assuming I need to adjust the highlight parameter to something lower than 15000.

Any suggestions?
5d mkiii - RAW Hack Firmware Dated-2013.Aug.6.

Erik

  • New to the forum
  • *
  • Posts: 5
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1682 on: January 02, 2014, 10:59:25 PM »
Checking the white level, it shifts from 12500 to 15886 - big shift that causes my highlights (sky in this case) to render as either blue with clouds or blown-out white.
Given that these changes might happen from frame to frame, that would explain the flickering highlights and pinks.


I tried tweaking the saturation in level in dcraw and got the following:

at 12500


at 15886


Any thoughts on how best to implement a solution?
5d mkiii - RAW Hack Firmware Dated-2013.Aug.6.

MarS

  • New to the forum
  • *
  • Posts: 20
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1683 on: January 11, 2014, 03:47:52 PM »
Hi all!  :)

Can I have access to some raw images (Dropbox or anything else)? I would like to do some tests with a HDR software that I designed.

If I can provide Dual Iso support, that would be great!  :D

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1684 on: January 11, 2014, 05:03:11 PM »
MarS: there are many links to raw files in this thread (one is in the first post), and I believe most of them are still online. Look for posts showing problems with some particular raw file. Can you share some details about your software?

@erik: it's indeed a white level problem. I should provide a way to override it in the command line, because right now it's autodetected. It's important to have it correct - or a little underestimated - during the conversion; I've changed it in white_detect_brute_force to 10000 and the output seems fine.

For flicker-free video, you have to equalize the exposure somehow. Either by playing with the white point, or maybe also with this deflickering script: http://www.magiclantern.fm/forum/index.php?topic=8850.0

MarS

  • New to the forum
  • *
  • Posts: 20
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1685 on: January 13, 2014, 03:36:18 PM »
Thank you a1ex and congratulations for your brilliant idea!!! :)
I've already downloaded the first link (Orange Juice Bottle). Unfortunately many links are dead. I'll still take the time to check all the pages for cr2 files.

I'm working on a software called MarScaper HDR for Mac. For more details, you can have a look at here: MarScaper HDR web site.

I hope I'll be able to add Dual Iso support to my roadmap. I have already started studying your PDF to understand all the machinery. Very smart approach. If I find an idea to fight against artifacts, I'll share it with pleasure.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1686 on: January 13, 2014, 04:00:05 PM »
The current algorithms are far more advanced than what's in the paper, but the background info still applies; these days, even in highlights where you only have half-res data, the interpolation is clean in many practical cases (except for resolution charts and power lines). But of course, any improvement is welcome.

100 bracketed pictures? Come on... take a look at my experiments with CeroNoice ;)

MarS

  • New to the forum
  • *
  • Posts: 20
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1687 on: January 13, 2014, 06:35:20 PM »
100 bracketed pictures? Come on... take a look at my experiments with CeroNoice ;)
In normal "human" conditions it has no interest of course. It's more a marketing tool.  ;D

But for more specifics conditions (High Iso, very low signal)...

EOS 20D - 160x30s - 1600 Iso

And of course, some astronomical subjects have also a very high dynamic range: Andromeda Galaxy, Orion nebula, etc.

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1688 on: January 15, 2014, 02:57:23 AM »
In normal "human" conditions it has no interest of course. It's more a marketing tool.  ;D

But for more specifics conditions (High Iso, very low signal)...
(...)

And of course, some astronomical subjects have also a very high dynamic range: Andromeda Galaxy, Orion nebula, etc.
Maybe it could help:

According to Barton, H. and Byrne, K. Introduction to Human Vision, Visual Defects & Eye Tests (March 2007), a exercised human vision is capable of a DR about ~60db (~20 stops) in an instant field of view.
So, on a base of ~10 stops per frame (basic DSLR capability) and with a overlap range, no needs to take 100 frames to get a HDR image closed to the human vision.

About astronomical imaging, the number of frames is mainly to increase the SNR, not the DR.
For most objects _even those mentioned here_ a dozen of frames is good enough to render the full dynamic, especially with modern multiscale HDR processings.

stevefal

  • Contributor
  • Hero Member
  • *****
  • Posts: 529
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1689 on: January 15, 2014, 06:52:03 AM »
I think 60dB is about 10 stops.
Steve Falcon

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3657
  • Blunt and to the point
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1690 on: January 15, 2014, 07:18:54 AM »
http://en.wikipedia.org/wiki/Human_eye

Quote
Dynamic range

The retina has a static contrast ratio of around 100:1 (about 6.5 f-stops). As soon as the eye moves (saccades) it re-adjusts its exposure both chemically and geometrically by adjusting the iris which regulates the size of the pupil. Initial dark adaptation takes place in approximately four seconds of profound, uninterrupted darkness; full adaptation through adjustments in retinal chemistry (the Purkinje effect) is mostly complete in thirty minutes. Hence, a dynamic contrast ratio of about 1,000,000:1 (about 20 f-stops) is possible.

http://en.wikipedia.org/wiki/Dynamic_range

Factor (power) 1,000,000 = Decibels 60 = Stops 19.9

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1691 on: January 15, 2014, 08:27:31 AM »
About astronomical imaging, the number of frames is mainly to increase the SNR, not the DR.

DR is computed as log2(full well) - log2(noise in complete darkness). So, if you increase SNR by stacking identical exposures, you will also increase DR.

For example, if you stack 64 identical exposures, you get 8x less noise (stdev), so your DR increases with 3 stops.

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1692 on: January 15, 2014, 01:09:52 PM »
I think 60dB is about 10 stops.
You're using the amplitude definition of decibels, not the power or intensity definition which is 10 * log10(ratio). If you have field amplitudes then the equation becomes 10 * log10 ( ratio^2 ) = 20 * log10(ratio), but that is incorrect to use here, we're measuring the intensity of the light, not the amplitude of the field.

20ev = 2 ^ 20 = 1048576
10 * log10(1048576) = 60.2059991328 dB

l_d_allan

  • Senior
  • ****
  • Posts: 258
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1693 on: January 15, 2014, 02:29:25 PM »
For example, if you stack 64 identical exposures

But ... with astrophotography, would those really be identical exposures, as everything is moving.  Or would you need to be on a rotating, motor-driven tripod like telescopes use? (or is that assumed for this discussion?)

BTW ... impressive/intimidating math ...

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1694 on: January 15, 2014, 04:10:17 PM »

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1695 on: January 16, 2014, 12:23:50 AM »
DR is computed as log2(full well) - log2(noise in complete darkness). So, if you increase SNR by stacking identical exposures, you will also increase DR.

For example, if you stack 64 identical exposures, you get 8x less noise (stdev), so your DR increases with 3 stops.
Of course you can increase DR by increasing SNR.
But the main goal of stacking is about SNR gain, not DR.

I can't confirm your reasoning about the link SNR/DR (huge offtopic in perspective :D), but in most of cases it's not relevant to run 64 frames acquisition just to gain 3 DR stops in astrophotography.

But ... with astrophotography, would those really be identical exposures, as everything is moving.  Or would you need to be on a rotating, motor-driven tripod like telescopes use? (or is that assumed for this discussion?)
(...)
Your question is very interesting: I did not see anybody ask 'and what about dithering frames?' or other calculated miss-alignment pre-processing to drastically reduce noises (please not the 's' ending noise).
However, it's a bit offtopic...

feureau

  • Hero Member
  • *****
  • Posts: 604
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1696 on: January 16, 2014, 12:36:50 AM »
Not sure if I should put this on the EOS-M thread or here, but here goes: Has anyone been getting these dots? http://i.imgur.com/g2wRO2H.png

It appears to be the EOS-M phase detection pixels. And it only appears on some photos. Any ideas what's going on/how to fix it?

CR2 and converted DNG:
https://www.dropbox.com/s/joajfhtsrtpbxad/DualISOPinkDot.zip

Running latest TL and CR2HDR

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1697 on: January 16, 2014, 12:44:33 AM »
Old issue, look for pink dot remover. Also this is apparently a problem on 650D/700D too.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1698 on: January 16, 2014, 07:54:09 AM »
A chroma blur (median filter on R-G and B-G) on the input image should fix it. Of course, the code must be modified to only average pixels from the same channel *and* ISO.

MarS

  • New to the forum
  • *
  • Posts: 20
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1699 on: January 21, 2014, 01:20:11 AM »
So much to say about astronomy! Enough to spend many nights but my english is not good enough I think! :)

To stay on topic, my first test is pretty conclusive even if I have to improve many things...

My approach is may be a little bit different: I extract the two frames and inject them in my HDR fusion.