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

papkee

  • Freshman
  • **
  • Posts: 73
  • Casual amateur
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1500 on: October 28, 2013, 01:42:06 AM »
I didn't try both of them, but I don't think it can work in this way. Try with the plain raw2dng.

Actually, it DOES work, but only by using the command line. The problem appears to be with dragging and dropping files onto cr2hdr.exe. Whenever I try with DNGs, either from raw2dng or your special one for the 650d it just quickly closes. Any thoughts? I don't want to have to command line convert every one of my 433 frame individually.
EOS 650D, a bunch of random lenses & adapters

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1501 on: October 28, 2013, 08:38:39 AM »
What happens if you drag a small number of files? There may be a limit on command-line length.

engardeknave

  • Senior
  • ****
  • Posts: 339
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1502 on: October 28, 2013, 09:52:30 AM »
Quote
I don't want to have to command line convert every one of my 433 frame individually.

http://www.magiclantern.fm/forum/index.php?topic=8520.0

Bassaidai

  • New to the forum
  • *
  • Posts: 14
  • 300D, 5D, 5D2
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1503 on: October 28, 2013, 01:44:04 PM »
Quote
I don't want to have to command line convert every one of my 433 frame individually.
You can also drag and drop the CR2 files by packs of tens or twentys. This will fire up multiple instances of the converter and hence drastically speed up the overall conversion progress (on multicore PCs at least...)

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1504 on: October 28, 2013, 03:39:47 PM »
I'm experimenting with two fast versions of cr2hdr:

cr2hdr-fast-halfres.exe: roughly 5x as fast, but it skips all the expensive postprocessing steps used to recover details in highlights and shadows. You will get lots of aliasing with it.

cr2hdr-fast-fullres.exe: roughly 3x as fast; this one has full-resolution detail in midtones and shadows, but also lots of noise. It doesn't seem to recover more than 11 stops of DR.

Neither of these two versions are meant for the final output, but just for getting some quick previews. May be helpful if you shoot say 2000 pictures from which you want to select 50 good ones. They may also be useful for troubleshooting (because the first one minimizes noise and the second one minimizes aliasing).

Both of them are bad in highlights (of course, when compared with edge-directed interpolation).

If a picture comes out clean with the fast-fullres version, it probably doesn't need dual ISO.

papkee

  • Freshman
  • **
  • Posts: 73
  • Casual amateur
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1505 on: October 28, 2013, 04:04:30 PM »
What happens if you drag a small number of files? There may be a limit on command-line length.

Even dragging one .dng doesn't work. The program flashes for a second before closing, and the file is unchanged. Could it be something with the way windows 8 interacts with command line programs? I read somewhere that sometimes Windows puts "" around the file path.
EOS 650D, a bunch of random lenses & adapters

Legushka

  • New to the forum
  • *
  • Posts: 25
  • Rus
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1506 on: October 28, 2013, 04:38:08 PM »
Even dragging one .dng doesn't work. The program flashes for a second before closing, and the file is unchanged. Could it be something with the way windows 8 interacts with command line programs? I read somewhere that sometimes Windows puts "" around the file path.
for windows: install total comander, open folder witch  cr2hdr, press ctrl+enter on cr2hd.exe, press crrl+enter on Raw image, press enter.
Canon eos 60d, firmware 1.1.1/sigma 10-20 + ML v2.3.RC2 + Nodal Ninja NN4

angarsk8

  • Just arrived
  • *
  • Posts: 1
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1507 on: October 28, 2013, 05:57:58 PM »
Hello everyone. I've been following this particular forum thread quite a long time now but I have never read anything related to the usage of ML on a Canon 40d, which is the camera I currently use. I had a canon 600d but it was stolen :( , so now I only have my 4 years old 40d which is a great camera for stills, has a nice build quiality, fair resolution, fast, etc... I would be pleased to hear that is possible to install ML on a 40d, I would love to use the Dual Iso feature specially because of the poor dynamic range of the 40d that has the same 11 stops of DR of the 600d. thank you very much.

Andrés Garciá Hurtado.

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8672
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1508 on: October 28, 2013, 06:10:13 PM »
Please select the proper forum next time ...
And use the search function ...
http://www.magiclantern.fm/forum/index.php?topic=1452.msg78621#msg78621
And read F.A.Q.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1509 on: October 28, 2013, 06:56:46 PM »
If a picture comes out clean with the fast-fullres version, it probably doesn't need dual ISO.

A human readable clear text message (maybe in %) from cr2hdr would be nice to let the user know how much a shot profited from being dual_iso... this could also be used as an error code to automatically trash dual_iso shots that were also taken in normal mode. Just a suggestion and if it's very easy to add of course.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1510 on: October 28, 2013, 07:36:48 PM »
Good idea, will think about it. Not sure how to quantify this though, since "clean" is subjective (so this is a test where you can judge with your own eyes).

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1511 on: October 28, 2013, 08:32:14 PM »
Good idea, will think about it. Not sure how to quantify this though, since "clean" is subjective (so this is a test where you can judge with your own eyes).

Indeed, if I'd have a way to quantify this I'd have written it :-) ... when in doubt use your judgement, you have looked at more dual_iso shots than anybody else. One certain point for the dual_iso shot though is if there are not only cleaner shadows above a certain ev threshold, but blown highlights in one exposure that can be reconstructed with the other (i.e. not both slices are underexposed).

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1512 on: October 28, 2013, 09:02:10 PM »
It already displays the percentage of reconstructed highlights and deep shadows (these are the areas where it applies the advanced processing). I can't say yet clearly what values are good and what values are bad though.

If the highlight percentage is near zero, the shot was probably underexposed (so consider it shooting at high ISO only). If it's close to 100%, consider shooting it at the low ISO only.

If you enable the intermediate DNGs, you can see the two exposures individually (bright.dng and dark.dng), so you can see exactly where you had recovered highlights and where you had noisy shadows. Maybe I should add a command-line flag for that.

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1513 on: October 28, 2013, 11:21:36 PM »
If you enable the intermediate DNGs, you can see the two exposures individually (bright.dng and dark.dng), so you can see exactly where you had recovered highlights and where you had noisy shadows. Maybe I should add a command-line flag for that.

I'm all in favor for some command line options rather than patching & recompiling the source, getting both exposures apart to see what was what would certainly help to understand what dual_iso can do and what not, i.e. how to expose correctly in the first place.

engardeknave

  • Senior
  • ****
  • Posts: 339
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1514 on: October 29, 2013, 05:55:35 AM »
I think command line flags would make customization and testing a lot easier. Perhaps you could add a destination directory option too.

Legushka

  • New to the forum
  • *
  • Posts: 25
  • Rus
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1515 on: October 29, 2013, 11:16:25 AM »
"Cr2hdr.exe /?" or "Cr2hdr.exe / help" option does not work.
want to know all the parameters ( Cr2hdr.exe /... ) with which you can run cr2hdr.
Canon eos 60d, firmware 1.1.1/sigma 10-20 + ML v2.3.RC2 + Nodal Ninja NN4

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1516 on: October 29, 2013, 04:30:18 PM »
Here you go:

cr2hdr-cmd.exe

Code: [Select]
Command-line usage: cr2hdr [OPTIONS] [FILES]

Shortcuts:
--fast          : disable most postprocessing steps (fast, but low quality)
                  (--mean23, --no-cs, --no-fullres, --no-alias-map, --no-stripe-fix)

Interpolation methods:
--amaze-edge    : use a temporary demosaic step (AMaZE) followed by edge-directed interpolation (default)
--mean23        : average the nearest 2 or 3 pixels of the same color from the Bayer grid (faster)

Chroma smoothing:
--cs2x2         : apply 2x2 chroma smoothing in noisy and aliased areas (default)
--cs3x3         : apply 3x3 chroma smoothing in noisy and aliased areas
--cs5x5         : apply 5x5 chroma smoothing in noisy and aliased areas
--no-cs         : disable chroma smoothing

Bad pixel handling:
--really-bad-pix: aggressive bad pixel fix, at the expense of detail and aliasing
--no-bad-pix    : disable bad pixel fixing (try it if you shoot stars)
--black-bad-pix : mark all bad pixels as black (for troubleshooting)

Other postprocessing steps:
--no-fullres    : disable full-resolution blending
--no-alias-map  : disable alias map, used to fix aliasing in deep shadows
--no-stripe-fix : disable horizontal stripe fix

Troubleshooting options:
--debug-blend   : save intermediate images used for blending:
    dark.dng        the low-ISO exposure, interpolated
    bright.dng      the high-ISO exposure, interpolated and darkened
    halfres.dng     half-resolution blending (low noise, high aliasing)
    fullres.dng     full-resolution blending (minimal aliasing, high noise)
    *_smooth.dng    images after chroma smoothing
--debug-black   : save intermediate images used for black level subtraction
--debug-amaze   : save AMaZE input and output
--debug-edge    : save debug info from edge-directed interpolation
--debug-alias   : save debug info about the alias map
--iso-curve     : plot the curve fitting results for ISO and black offset (requires octave)
--mix-curve     : plot the curve used for half-res blending (requires octave)
--fullres-curve : plot the curve used for full-res blending (requires octave)

I didn't play much with it, so there may be surprises. Most of these things were already available as compile-time options (except for bad pixel handling, where I've fine-tuned the algorithms and I've added a new option).

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1517 on: October 29, 2013, 04:36:06 PM »
Here you go

Thanks! ... but what would "octave" be :-o ? Also, I guess a higher cs setting is there for reducing color bleeding on edges, or is there anything else it's good for?


chris_overseas

  • Moderators
  • Member
  • *****
  • Posts: 234
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1518 on: October 29, 2013, 05:10:25 PM »
Thanks! ... but what would "octave" be :-o ? Also, I guess a higher cs setting is there for reducing color bleeding on edges, or is there anything else it's good for?

Octave is presumably this: http://www.gnu.org/software/octave/
EOS R5 1.1.0 | Canon 16-35mm f4.0L | Tamron SP 24-70mm f/2.8 Di VC USD G2 | Canon 70-200mm f2.8L IS II | Canon 100-400mm f4.5-5.6L II | Canon 800mm f5.6L | Canon 100mm f2.8L macro | Sigma 14mm f/1.8 DG HSM Art | Yongnuo YN600EX-RT II

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1519 on: October 29, 2013, 05:43:56 PM »
Octave is presumably this: http://www.gnu.org/software/octave/

Oh my, thanks - I'm embarrassed to say this even shows up as the #1 google result, I just didn't expect it to be something like this :-o

rufustfirefly

  • New to the forum
  • *
  • Posts: 30
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1520 on: October 29, 2013, 09:35:42 PM »
I'm still periodically building win32 and linux 32bit binaries for cr2hdr, available here:

https://bitbucket.org/rufustfirefly/magic-lantern/downloads

in case anyone is interested. I try to build a new version whenever I see a Mercurial check-in related to the cr2hdr code, usually once a day, at most.
EOS 5Dmk3 | EOS 40D
EF 70-200mm f/2.8 IS II ; 50mm f/1.4 ; 24-104mm kit lens ; 135mm f/2.8 SF | FD 28mm f/2.0 ; 55mm f/1.2 ; 300mm f/4 | Nikkor 55mm f/1.2 | Other : Rokinon Cine 14mm, 24mm, 35mm, 85mm ; Juplen M42 135mm f/2.8 ; ... etc ...
http://jbuchbinder.com/

Legushka

  • New to the forum
  • *
  • Posts: 25
  • Rus
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1521 on: October 30, 2013, 08:13:50 AM »
make a separate thread for cr2hdr in bitbucket.org
that it was possible to see the changes by version-)
Thank you very much for the work done.
Canon eos 60d, firmware 1.1.1/sigma 10-20 + ML v2.3.RC2 + Nodal Ninja NN4

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1523 on: October 30, 2013, 09:51:23 PM »
I'm experimenting with some noise reduction, with an algorithm along these lines:

http://www.computersdontsee.net/index.php/post/2013/02/09/Introducing-NL-means
http://bengal.missouri.edu/~kes25c/nl2.pdf
http://scholar.harvard.edu/files/stanleychan/files/chan_zickler_lu_2013_0.pdf
http://www.cs.tut.fi/~foi/3D-DFT/ - watch the animation




According to the logs, this squeezes roughly one more stop of dynamic range, and it seems to whiten the noise too.

Download: cr2hdr-denoice.exe

The denoising step is not enabled by default; you need to specify --denoice in the command line.

Now the big question: how does this compare with state-of-art denoising software? (Lightroom, Neat Image, Noise Ninja, whatever you use). I don't have license for any of these, so I don't know if I'm reinventing the wheel or not.

For comparison, I suggest processing the CR2 with default options, then with --denoice, then postprocessing both DNGs in your favorite editor and denoise them so they have similar noise levels, and see which one holds more detail. Your quest is to find out whether my denoising step helps or hurts, and how much.

Original CR2 files for these examples: 7O4C8804.CR2, 6X8A0381.CR2 and IMG_5762.CR2 (credits: AdamTheBoy, daancalo2013 and Danne). To get the DNGs from the top row, process them with default settingss, and to get the DNGs from the bottom row, process them with --denoice.

Please note that each test run will create a different DNG (the denoising algorithm uses monte carlo sampling). It may be interesting to see what happens if you average the output from a few test runs (didn't try). Also it may be worth trying --denoice --cs5x5.

Legushka

  • New to the forum
  • *
  • Posts: 25
  • Rus
Re: Dual ISO - massive dynamic range improvement (dual_iso.mo)
« Reply #1524 on: October 30, 2013, 09:53:47 PM »

jpeg (-x) + jpeg (0) + jpeg (+ x) -> hdr, where x-expo
cr2 (iso100/1600) -> dng

whether it is possible to do so in cr2hdr: cr2 (iso100/1600) -> jpeg (-x) +{ jpeg (0) +} jpeg (+ x)?
Canon eos 60d, firmware 1.1.1/sigma 10-20 + ML v2.3.RC2 + Nodal Ninja NN4