Magic Lantern Forum

Developing Magic Lantern => Feature Requests => Topic started by: NickZee on November 11, 2013, 11:20:26 PM

Title: Advanced Bracket Features Request
Post by: NickZee on November 11, 2013, 11:20:26 PM
Thank you nightly builders for the new advanced bracket updates! 

I particularly appreciate the increase in frames from 9 to 15!  Thank you! ;D

I would like to request these updates. 

1.  Add 0.3 and 0.7 EV increment options.

2.  Shutter speed sequence calculator.  In the Promote Control, when you select your shutter speed and EV increment, it calculates the shutter speed range based on the number of frames you select.   The good thing about this is that you get an on screen visualization of the shutter speed sequence (under to over) based on EV and Frames.   See this for an on screen example, http://youtu.be/TstWu67pKj0?t=5m2s  (5:02 to 5:40)

3. Add more Frame from 15 to 40. (just in case you need them  ;))

4. Faster between shots.  Especially in Autodetect mode.

Thank you again!




Title: Re: Advanced Bracket Features Request
Post by: Greg on November 12, 2013, 03:27:08 AM
Quote from: NickZee on November 11, 2013, 11:20:26 PM
2.  Shutter speed sequence calculator.  In the Promote Control, when you select your shutter speed and EV increment, it calculates the shutter speed range based on the number of frames you select.   The good thing about this is that you get an on screen visualization of the shutter speed sequence (under to over) based on EV and Frames.   See this for an on screen example, http://youtu.be/TstWu67pKj0?t=5m2s  (5:02 to 5:40)
Interesting idea.

Quote from: NickZee on November 11, 2013, 11:20:26 PM
3. Add more Frame from 15 to 40. (just in case you need them  ;))
I never needed more than 9x2EV on 500D. We can change it to 20, that looks nice in the ML menu.  ;D

Quote from: NickZee on November 11, 2013, 11:20:26 PM
4. Faster between shots.  Especially in Autodetect mode.
Autodetect mode can not be faster. ML must be checked after each shot its parameters.

On the 500D is a fast bracketing - http://www.magiclantern.fm/forum/index.php?topic=8535.0
He is working at full speed continuous mode.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 12, 2013, 04:13:29 PM
(http://s16.postimg.org/6mglumaad/VRAM0.png)

(http://s16.postimg.org/ak3vk0x3p/VRAM1.png)
Title: Re: Advanced Bracket Features Request
Post by: boogotti84 on November 12, 2013, 05:14:30 PM
Yes pls! for 6D, this will be very helpful! will happily donate £15 / thats $24 for US people to the developer for this function on the 6D
compiled as i can't program :(

-15 frames upped to 40
yes i need more for creating hdri's for VFX CGI work

- Add 0.3 and 0.7 EV increment options, (more lower EV possible?)

- Shutter speed sequence calculator

- Faster between shots i.e mirror lock up limit mirror vibration, faster shots, continuous shooting?
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 12, 2013, 06:05:48 PM
Quote from: boogotti84 on November 12, 2013, 05:14:30 PM
-15 frames upped to 40
yes i need more for creating hdri's for VFX CGI work
If there are more people who need this function, I do it.
Done - https://bitbucket.org/hudson/magic-lantern/pull-request/293/feature_hdr_bracketing-15-frames-upped-to/diff

Quote from: boogotti84 on November 12, 2013, 05:14:30 PM
- Add 0.3 and 0.7 EV increment options, (more lower EV possible?)
Yes, it is possible.

Quote from: boogotti84 on November 12, 2013, 05:14:30 PM
- Shutter speed sequence calculator
It need a few corrections.

Quote from: boogotti84 on November 12, 2013, 05:14:30 PM
- Faster between shots i.e mirror lock up limit mirror vibration, faster shots, continuous shooting?
I do not have 6D, I do not know how to do it.
Fast bracketing only work on 500D.
Title: Re: Advanced Bracket Features Request
Post by: boogotti84 on November 12, 2013, 07:09:14 PM
Quote from: Greg on November 12, 2013, 06:05:48 PM
If there are more people who need this function, I do it.
Done - https://bitbucket.org/hudson/magic-lantern/pull-request/293/feature_hdr_bracketing-15-frames-upped-to/diff
Yes, it is possible.
It need a few corrections.
I do not have 6D, I do not know how to do it.
Fast bracketing only work on 500D.

Thank you greg, is this build on the 6D, 1% Nov build?
http://www.magiclantern.fm/forum/index.php?topic=3904.2775

do you reckon you can get the 0.3 and 0.7 EV increment options? in a build?

Also - Shutter speed sequence calculator

happy to pay you if you can get these two in pls

thanks again
Title: Re: Advanced Bracket Features Request
Post by: Marsu42 on November 12, 2013, 07:09:58 PM
Quote from: Greg on November 12, 2013, 06:05:48 PM
If there are more people who need this function, I do it.
Done - https://bitbucket.org/hudson/magic-lantern/pull-request/293/feature_hdr_bracketing-15-frames-upped-to/diff

Good thing alex isn't here right now, he'd get a heart attack - "When the cat's away the mice will play" :-p

Quote from: boogotti84 on November 12, 2013, 05:14:30 PM
- Add 0.3 and 0.7 EV increment options, (more lower EV possible?)

There is a reason for this not being implemented, just like the 15 frame limit (which was raised from 10 after a very lengthy discussion) - it doesn't make sense, or no one could come up with a scenario in which it would. The raw files are so elastic you can easily +-1ev postprocess the exposure, so a too small spacing only is a shutter killer.

Quote from: boogotti84 on November 12, 2013, 05:14:30 PM
Yes pls! for 6D, this will be very helpful! will happily donate £15 / thats $24 for US people to the developer for this function on the 6D

On a final note: I think it's great people supporting ML (donate to the EFF!), but I'd still favor consistency and common sense when coding over someone waving with some dollar bills. Maybe it would be better to do a private binary "code on demand" build for this request and cash in than to do a pull request for all ml users.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 12, 2013, 07:18:28 PM
Also I think it is not useful.
Maybe I should do the Advanced menu, as is the FPS override?
Title: Re: Advanced Bracket Features Request
Post by: Marsu42 on November 12, 2013, 07:27:44 PM
Quote from: Greg on November 12, 2013, 07:18:28 PM
Maybe I should do the Advanced menu, as is the FPS override?

Hmm, looking at the bracketing menu there doesn't seem to be anything to esoteric that it needs to be hidden, also the menu is very small (unlike the fps override). What do you have in mind?

Note that there currently are two problems with the "advanced menu" design:
* it says something about "for experts" and "use with care" which isn't the case if the options are just hidden to avoid clutter
* when you change an "advanced" option it isn't hidden anymore but moves to the "non-advanced" default menu which can create confusion if the changed menu item was part of a logical group that is now torn apart.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 12, 2013, 08:05:32 PM
I thought about something like this:

if(advanced)
{
    frames (auto - 40)
    fast bracketing
}
else
{
    frames (auto - 9)
}

Is there any difference in image quality between the bracket 4x2EV vs 16x0.5EV?
I always use 2EV.
Title: Re: Advanced Bracket Features Request
Post by: Audionut on November 12, 2013, 08:12:13 PM
Quote from: Greg on November 12, 2013, 08:05:32 PM
Is there any difference in image quality between the bracket 4x2EV vs 16x0.5EV?
I always use 2EV.

Personally I find midtones (-4EV below sensor saturation) to retain sufficient quality.  So I would use 2x4 in your scenario.

CGI guys are always saying different though!
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 12, 2013, 08:25:28 PM
Quote from: Audionut on November 12, 2013, 08:12:13 PM
Personally I find midtones (-4EV below sensor saturation) to retain sufficient quality.  So I would use 2x4 in your scenario.

CGI guys are always saying different though!

The 500D when using bracketing 3EV or more, receive poorer quality.
I've never met a scene which requires more than 9x2EV the 500D. So if anyone needs the best picture quality should be enough 18x1EV. A larger number of frames does not make sense.

We have to decide what to do, what to change.
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on November 12, 2013, 08:51:37 PM
How about fixing this issue? I have been lobbying to get this fixed forever.

https://bitbucket.org/hudson/magic-lantern/issue/1661/bracket-in-c-mode-5d2

It seems like other people are having similar or related problems:

https://bitbucket.org/hudson/magic-lantern/issue/1665/hdr-bracket-in-c-mode-when-setting-manual
https://bitbucket.org/hudson/magic-lantern/issue/1691/turning-off-bulb-mode-when-shoot-bulb-mode
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on November 12, 2013, 08:56:08 PM
How about automatically putting each bracket set in its own folder? I would kill for this.

Fast bracketing on the 5D2 as well.
Title: Re: Advanced Bracket Features Request
Post by: Audionut on November 12, 2013, 08:56:33 PM
I agree with what Marsu42 has said.

I don't see any reason why there needs to be 1/3rd stop resolution and you've already added increased frames.
Title: Re: Advanced Bracket Features Request
Post by: boogotti84 on November 12, 2013, 10:03:40 PM
Hey Guys hdri's are used for Global Illumination/reflections, these extra stops make a difference, depending on how much of dynamic range your trying to capture. You cant just say that 7 exposures will cover all situations. It depends on the environment what range your trying to capture.

I understand for the average user that 7 exposures will cover all the bases for just image use.
But for the niche VFX artist user, Can make use of these extra exposures. As we are looking to capture dynamic resolution more stops the more resolution. Yes raws you can push and pull them a stop or two. But this is emulated. Yes you can recreate it but your dynamic range will be noisey and less in dynamic range resolution.

I know for the masses using hdris that over 7 exposures is excessive. But for us vfx guys is much needed for accurately capturing the most dynamic range resolution for rendering in cgi.

Spheron HDR Camera
This is used by studios has 26-f stop range in the hdri image. Used for CGI re-lighting
http://www.youtube.com/watch?v=4keIdSE6aZ0
Hdri dome light
http://www.peterguthrie.net/blog/2010/04/vraysun-and-hdri-sky-tutorial/

Greg, i can send you the money by paypal? i'll pm you my email? can you pls work on these features for 6D?
- Add 0.3 and 0.7 EV increment options,
- Shutter speed sequence calculator
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 13, 2013, 02:36:27 AM
I do not want money for my work on ML. A new SD card would be really helpful for me, maybe I can get one for Christmas ;)

I think the main repository we can add a function Shutter speed sequence calculator.

This we need to create another repository :
-15 frames upped to 40,
- Add 0.3 and 0.7 EV,
Title: Re: Advanced Bracket Features Request
Post by: boogotti84 on November 13, 2013, 02:56:10 PM
Quote from: Greg on November 13, 2013, 02:36:27 AM
I do not want money for my work on ML. A new SD card would be really helpful for me, maybe I can get one for Christmas ;)

I think the main repository we can add a function Shutter speed sequence calculator.

This we need to create another repository :
-15 frames upped to 40,
- Add 0.3 and 0.7 EV,

Hey Greg its coolio  :) you can buy an SD card with it, i have no idea, how to program and compile this together, if you or someone can get these features as requested into a compiled 6D build the im more that happy to pay for it... for the time and effort.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 13, 2013, 06:36:42 PM
My idea:

In the main repository:
- Reduce the amount of frames from 15 to 12 (12x2EV = 24EV this is good)
- Add calculator

If you need more frames change
ML -> settings -> magic.cfg "hdr.frames = 6", enter the value that you need
This method of working, I checked it today.
Title: Re: Advanced Bracket Features Request
Post by: NickZee on November 13, 2013, 07:11:58 PM
Quote from: boogotti84 on November 12, 2013, 10:03:40 PM
But for the niche VFX artist user, Can make use of these extra exposures. As we are looking to capture dynamic resolution more stops the more resolution. Yes raws you can push and pull them a stop or two. But this is emulated. Yes you can recreate it but your dynamic range will be noisey and less in dynamic range resolution.

First off, thank you for the great response to these requests!  Amazing!

I want to reiterate boogotti84 about the benefit for smaller EV increments.  I shoot interiors and the range from the shadows inside a room to the sun outside the windows is so great that without these smaller steps we lose some of the quality/data.  I'm being schooled by the gentleman at http://digitalcoastimage.com/portfolio/content/01_large.html (http://digitalcoastimage.com/portfolio/content/01_large.html) and he recommends the 1/3 or 2/3 stop with 15 to 18 frames (less or more depending on scenario obviously) to capture the data properly.


Thank you again!


Title: Re: Advanced Bracket Features Request
Post by: dmilligan on November 13, 2013, 07:42:56 PM
If you're going to be taking that many pics anyway, maybe consider using the intervalometer instead of advanced bracket. I have a module that can ramp any exposure setting during an intervalometer sequence:
http://www.magiclantern.fm/forum/index.php?topic=8431.0

You can also now trigger the intervalometer to start based on a shutter press, so once you set it up, it would work just like advanced bracket.


You know I've seen this requested by CGI artists several times to have rediculous numbers of frames and small EV increments, and I wonder if it's not simply the stacking of multiple frames that is giving you the good results. I'm an astrophotographer and we use stacking in this manner to reduce noise and increase dynamic range.

In other words, I wonder if this exposure sequence:
-6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5 - 2, - 1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6
is the same as:
-6, -6, -6, -6, -4, -4, -4, -4, -2, -2, -2, -2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6

I think it probably is.
Title: Re: Advanced Bracket Features Request
Post by: dmilligan on November 13, 2013, 08:02:40 PM
Also wonder if dithering would help you guys, if you do that (for wide angles you'd probably need the shift function of a tilt shift lens to do that properly). Here's an example I think you could achieve equal, if not better results with the current 'limited' capabilities of ML:

Rather than 20 exposures with 0.5 EV increments, shoot 4 sequences of 5 exposures with 2EV increments and move the camera a tiny bit (or shift your fancy tilt shift, if you've got one) to dither inbetween each group. Of course you'll need to align them in post, but there's plenty of software to do that automatically.
Title: Re: Advanced Bracket Features Request
Post by: Marsu42 on November 13, 2013, 09:10:56 PM
Quote from: NickZee on November 13, 2013, 07:11:58 PM
I want to reiterate boogotti84 about the benefit for smaller EV increments.  I shoot interiors and the range from the shadows inside a room to the sun outside the windows is so great that without these smaller steps we lose some of the quality/data.

I really, really doubt that until proven wrong:

If you shoot with 1ev spacing (there's not even the 10 exposure limit if you set it to auto) and then +-1/3ev these in postprocessing, you're getting your 1/3, 2/3, ... steps, and considering these are 14bit raw files with a lot of potential for shadow and highlight recovery there should be no quality loss at all.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 13, 2013, 09:50:16 PM
Shutter speed calculator sequence seems to be working - https://bitbucket.org/Gr3g01/ml-hdr3/commits/d7eeb042def595b1896ae1f606203c58c024ce31
If anyone has any suggestions on how to optimize this code, I will be grateful.
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on November 13, 2013, 11:26:54 PM
QuoteI'm being schooled by the gentleman at http://digitalcoastimage.com/portfolio/content/01_large.html (http://digitalcoastimage.com/portfolio/content/01_large.html) and he recommends the 1/3 or 2/3 stop with 15 to 18 frames (less or more depending on scenario obviously) to capture the data properly.

I just tried a few tests with 10-25 frames and saw no significant difference in the output with Enfuse. But I guess he's using something else. What would that be?
Title: Re: Advanced Bracket Features Request
Post by: boogotti84 on November 14, 2013, 12:44:27 AM
 
Quote from: Marsu42 on November 13, 2013, 09:10:56 PM
and considering these are 14bit raw files with a lot of potential for shadow and highlight recovery there should be no quality loss at all.
Marsu42 not totally true.....explained below

Guys i can say for 3D VFX this makes a difference, as when you stop down an image there is clipping(or step up noise in the blacks) then taking an image at the proper exposure.

Again im taking about dynamic resolution. So gaining up an image or stopping down an hdri image you be able to see the dymaic resolution captured in the hdri,
The Ideal for a VFX  hdri is to capture  26 f-stops of dynamic range like the Spheron HDR Camera does.

The only choice us VFX have to capture a decent hdri on a dslr is Promote Control which is £300!! which is way over priced for what it does! no way worth £300
http://www.promotesystems.com/products/Promote-Control.html
This allows for 40, (40 will hardly be used but nice to have the option available there, when you're on site just in case) and
0.3EV - 0.7 EV's increments.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 14, 2013, 01:27:04 AM
I think it's working well - https://bitbucket.org/Gr3g01/ml-hdr3/compare#diff

(http://s9.postimg.org/w59n6qd9r/VRAM0.png)
Title: Re: Advanced Bracket Features Request
Post by: digitalcoastimage on November 14, 2013, 03:07:35 AM
Quote from: engardeknave on November 13, 2013, 11:26:54 PM
I just tried a few tests with 10-25 frames and saw no significant difference in the output with Enfuse. But I guess he's using something else. What would that be?

Enblend/Enfuse fixes photon shot noise the more images you give it.  It also sharpens per pixel the more images you give it.  So being able to bracket at 2/3rds (.7) is very useful for full frame (and at 1/3rd to overcome noisier shadows for APS-C sensors). 

1EV is too large when shooting dungeon dark interiors with blazing brite windows and needing to pull all that range in clean enough to print on a billboard or two page magazine spread.  Exterior and landscape shots 1EV is no problem, but with tungsten interior lighting and daylight out the window and DR scenes that are almost always 18++ EVs benefit greatly from lower than 1EV steps.

Michael James
http://www.digitalcoastimage.com
Title: Re: Advanced Bracket Features Request
Post by: boogotti84 on November 14, 2013, 11:46:58 AM
 i argee with digitalcoastimage post , does Enblend/Enfuse, save 32bit hdr or exr files out?

Title: Re: Advanced Bracket Features Request
Post by: dmilligan on November 14, 2013, 01:36:53 PM
Quote from: digitalcoastimage on November 14, 2013, 03:07:35 AM
Enblend/Enfuse fixes photon shot noise the more images you give it.  It also sharpens per pixel the more images you give it.

Did you read my post? What I'm saying is that I don't think it makes much difference that each frame be slightly different exposure, just that you have a lot of them, so some of them can be the same exposure, it will help just about as much as having the exposures slightly separated. What you say here seems to tend to agree with that.

I believe you guys, that more images helps what you're trying to do (as an astrophotographer, I actually take way more frames, like hundreds more, than you do to compose an hdri and pull stuff out of super insanely deep shadows, orders and orders of magnitiude darker than what you guys do). But what I'm saying is that it has little to no effect that they are all separated by a little bit, some of them can be at the same EV and it wont make much difference.

I'm capturing a pretty huge amount of dynamic range in my astrophotos and thats from taking hundreds of exposures all at the same exposure (I'm limited to the physical maxium that my equipment allows since what I'm imaging is so dark). I use a program call PixInsight, which actually supports outputting 64 bit float.
Title: Re: Advanced Bracket Features Request
Post by: Marsu42 on November 14, 2013, 05:20:06 PM
Quote from: dmilligan on November 14, 2013, 01:36:53 PM
But what I'm saying is that it has little to no effect that they are all separated by a little bit, some of them can be at the same EV and it wont make much difference.

I have to admit a new argument has come up which if I understand correctly is that more shots tend to cancel out photon noise while +-ev of the same shot in post has the same noise pattern - you can get the same nr effect from overlaying multiple exposures of the same scene, there's even specialized software to do just that.

*If* this really makes a difference for these high dr interior shots I'd say that it does make sense to add 1/3ev (crop) & 2/3ev (ff) steps and more exposures to ml bracketing, but with a big fat warning attached that this is for special purpose only. After all, the coding implementation is trivial and  at the end of the day would I mind if someone ignores the warning and kills his/her shutter, more revenue for our friends at Canon :-)

However, since I never did shots like this and even the vfx guys agree that for landscape/outdoor 1ev is enough I hope the members with more experience in this matter can come to an agreement if this new argument is valid or a placebo.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 16, 2013, 06:22:37 PM
I've added a indicator, if the shutter speed is faster than the camera shutter speed, add "E"

(http://s21.postimg.org/6h7xm6qdz/VRAM0.png) (http://s21.postimg.org/qnbfl2m1j/VRAM1.png)
Title: Re: Advanced Bracket Features Request
Post by: Marsu42 on November 19, 2013, 09:42:13 PM
Btw you can already do 1/3 steps right now - somewhat: Do a bracket with 1ev, then select -1/3ev exposure compensation, run the bracket again, select -2/3ev ec and run it a 3rd time :-)

Yes, this method requires you to press the shutter three times, but on tripod that should't be much of a problem - and once scripting is running again you will most likely to automate these steps, so there is no absolutely pressing need to implement smaller steps in the bracketing module itself.
Title: Re: Advanced Bracket Features Request
Post by: Greg on November 19, 2013, 11:54:49 PM
It can create two menu frames, the first will be 12, the second 40 The second menu is normally hidden?

(http://s10.postimg.org/bw1b9qd89/VRAM0.png)

Canon rounding does not work well, if we add 8/3, does not always work correctly.
Title: Re: Advanced Bracket Features Request
Post by: Marsu42 on November 20, 2013, 12:04:29 AM
Quote from: Greg on November 19, 2013, 11:54:49 PMCanon rounding does not work well, if we add 8/3, does not always work correctly.

Hmmyes, I admit I already suspected as much but couldn't pinpoint the problem - someone should write a round_to_1_3_ev() and round_to_1_2_ev() functions for lens.c that do the correct rounding if multiples of 8/3 are used... I already started doing that for my auto_iso module but didn't finish it, and it should go into the core anyway.

Quote from: Greg on November 19, 2013, 11:54:49 PM
It can create two menu frames, the first will be 12, the second 40 The second menu is normally hidden?

Ugh, that doesn't sound terribly intuitive :-p ... how about dropping the whole in-ml approach since as I described above you can solve the "I want 40x1/3 bracketing" with 3x bracketing 1ev and -1/3ec and -2/3ec?
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on December 14, 2013, 06:25:34 PM
Quote8883: FEATURE_HDR_BRACKETING - 15 frames upped to 40, clean

8882: 15 frames upped to 40

I'm seeing this in the changelog, but I'm not getting 0.7 or 0.3 ev increments. Is the changelog referencing something else?
Title: Re: Advanced Bracket Features Request
Post by: Greg on December 14, 2013, 06:43:20 PM
Quote from: engardeknave on December 14, 2013, 06:25:34 PM
I'm seeing this in the changelog, but I'm not getting 0.7 or 0.3 ev increments. Is the changelog referencing something else?
8884: Shutter speed sequence calculator, reduce the amount of frames from 15 to 12

Now, I think 0.3 or 0.7EV and 40 frames is not needed.
Title: Re: Advanced Bracket Features Request
Post by: a1ex on December 14, 2013, 06:55:25 PM
Quote from: Greg on December 14, 2013, 06:43:20 PM
Now, I think 0.3 or 0.7EV and 40 frames is not needed.

Exactly. See here why: http://www.cambridgeincolour.com/forums/thread3961.htm

Quote
PS: one could argue two shots are not enough, or that 4 1/3EV apart in  exposure is too much for HDR blending. Both arguments are wrong (the  Zero Noise image above proves this): most HDR situations can be  perfectly solved with just 2 shots, and 4EV apart is not at all too  much. The problem is in the software around: it is very sub-optimum in  the information blending stage. Taking more shots and making them be 2EV  or less apart, is not a requirement for HDR, but for particular HDR  sub-optimum tools such as Photomatix and PS HDR.

So, if you ask me, I would limit it to something like 2 ... 5 images x 2 ... 5 EV spacing. If you need more than 35 stops, I'd like to see what you are photographing and whether your lens is able to handle this dynamic range ;)

P.S. 35 stops means you can record shadow detail that is only 35.000.000.000 times darker than your brightest highlight. Maybe for some of you it's not enough.
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on December 14, 2013, 08:17:42 PM
Well, like he said, it's not really a matter of covering a greater dynamic range. It's just to get more frames to cancel out photon noise. I have yet to see that this yields a visible improvement in sharpness, but I'm definitely willing to try given his results.

And I don't want to just take additional photos because I've scripted my processing around the hdr_.txt files produced in camera.


Quote from: digitalcoastimage on November 14, 2013, 03:07:35 AM
Enblend/Enfuse fixes photon shot noise the more images you give it.  It also sharpens per pixel the more images you give it.  So being able to bracket at 2/3rds (.7) is very useful for full frame (and at 1/3rd to overcome noisier shadows for APS-C sensors). 

1EV is too large when shooting dungeon dark interiors with blazing brite windows and needing to pull all that range in clean enough to print on a billboard or two page magazine spread.  Exterior and landscape shots 1EV is no problem, but with tungsten interior lighting and daylight out the window and DR scenes that are almost always 18++ EVs benefit greatly from lower than 1EV steps.

Michael James
http://www.digitalcoastimage.com
Title: Re: Advanced Bracket Features Request
Post by: a1ex on December 14, 2013, 08:27:57 PM
If you choose the exposure range correctly (that is, the brightest exposure should be grossly overexposed and darkened in post), and merge the images by weighting each shot according to SNR, there's no more noise to cancel. Seriously, read the theory behind ZeroNoise.
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on December 14, 2013, 08:37:50 PM
Ok, before I try and find an English version of that or use Google translate, is it doing something that normal exposure fusion such as Enfuse doesn't do?
Title: Re: Advanced Bracket Features Request
Post by: a1ex on December 14, 2013, 08:46:15 PM
Yes. It weights the images according to SNR, but enfuse weights them according to luminance.

It's basically the same algorithm as cr2hdr without all the deinterlacing stuff. I might write a clone for it some day, beacuse I wasn't able to run it.

BTW, the interesting part is not in running it, but in understanding the theory behind it. Once you get that, you will no longer ask for 40x0.5 brackets.
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on December 14, 2013, 09:03:21 PM
I tried to get ZeroNoise to work last time you mentioned it (without really knowing what it does) but did not succeed. I just found this (http://zeronoiseforlinux.blogspot.com) now but I'm not using Linux for processing.

I'd be very interested in seeing some comparisons between this method and regular exposure fusion if you find or make any. Reading the theory now.
Title: Re: Advanced Bracket Features Request
Post by: a1ex on December 16, 2013, 08:16:05 AM
Thanks, got it working, but I found the output to be unusable. So, I coded my own version of the ZeroNoise algorithm (well, only the part I understood) and ran a little experiment with that.

You can find it here: http://www.magiclantern.fm/forum/index.php?topic=9581

(I've split the topic, since the tool looks promising and now I think it deserves its own thread)
Title: Re: Advanced Bracket Features Request
Post by: boogotti84 on December 16, 2013, 05:52:09 PM
Must say great work Alex,
Just want to make clear that VFX artists look for in hdri images.
We are not looking for tonedmapped flat images which are a hdr effect/ toned mapped.
We use full float 32bit files for lighting either .hdr format or .exr (exr is open-source has really good compression)

more info on exr
http://www.openexr.com/

I found this article for people who aren't VFX artist to explain what we need hdri's for and the dynamic range in them.
http://www.cgarchitect.com/2013/12/effects-of-hdr-vs-mdr-on-image-based-lighting

8 stops with 1EV apart is the minimum, in some cases,(more than likely ) you need more stops or .5Ev apart, to get the resolution in range.

Pls can we increase  the number to 40 frames in ML? maybe a sub menu to unlock that option with in a menu? with warning .
I can say it is a needed feature for VFX guys.
Title: Re: Advanced Bracket Features Request
Post by: a1ex on December 16, 2013, 06:02:18 PM
My tool outputs 32-bit float DNG without any tonemapping. All you have to do is to convert them to EXR.
Title: Re: Advanced Bracket Features Request
Post by: Guillermo Luijk on December 16, 2013, 10:40:18 PM
Hi all, my name is Guillermo Luijk, the author of Zero Noise. If any of the underlying ideas or algorithms in ZN can be of help to improve ML, I am ready to give ideas.

I have to say I don't know the details of the dual ISO mode in ML (it works on alternate lines? it works on RAW or demosaiced data?), although I understand the basics about it.

Regards
Title: Re: Advanced Bracket Features Request
Post by: engardeknave on December 16, 2013, 10:58:54 PM
Quote from: Guillermo Luijk on December 16, 2013, 10:40:18 PM
Hi all, my name is Guillermo Luijk, the author of Zero Noise. If any of the underlying ideas or algorithms in ZN can be of help to improve ML, I am ready to give ideas.

I have to say I don't know the details of the dual ISO mode in ML (it works on alternate lines? it works on RAW or demosaiced data?), although I understand the basics about it.

Regards


Nothing has been done with Zero Noise and Dual ISO together just yet. The thread was split and A1ex's version of Zero Noise along with the results are here: http://www.magiclantern.fm/forum/index.php?topic=9581
Title: Re: Advanced Bracket Features Request
Post by: dmilligan on December 30, 2013, 09:18:24 PM
I've been thinking and reading a lot about noise recently and have come to some conclusions. I would like to offer a (mathematical) deffense of the CGI guys who claim to need a large number of frames and small EV steps to accomplish their goals, and also a general scheme to determine hdr bracketing sequence based on SNR requirements.

First of all a distinction needs to be made with what these guys are trying to do and what a photographer is trying to do. The bottom line is that SNR requirements for CGI are (probably, AFAIK) way higher than for photography. The next paragraph is a justification of why that is (which is based on my limited understanding of the subject, if you do CGI and can explain it mathematically, feel free to expand my justification further and/or come up with some concrete SNR requirements). If you believe that CGI would in fact have a need for a much higher SNR than photography, then you can skip the next paragraph.  (perhaps if you can't believe CGI artist would need so high of a SNR, a scientist doing research might, i.e. an astronomer)

Most of the people who come along and say "no way you'd ever need that many frames" are photographers (including myself), you'd certainly be correct in saying that as well, if your goal is photography. The goal of a photographer is to capture a scene and produce a realistic looking reproduction of that scene. When a scene has a large dynamic range, photographers must use more frames to capture the additional range and then in post they are going to be compressing that range to fit into the relatively small bit depth of the medium it's going to be displayed on (either print or screen). The fact that the HDR image is being compressed for photographic purposes puts a low limit on the minimum SNR required to achieve 'satistfactory' results, i.e. it doesn't matter that we have a noise level of plus or minus a handful of photons out of the hundreds or even thousands of photons of signal esp. when applying a curve to that linear data and then compressing it further to fit on a screen. That small error or noise will compress down such that it is less than 1 brightness level on a screen, totally inpercivable. Local toning methods may be utilized to achieve better results, and these will cause 'local stretching' but in general the SNR requirements for this area not much larger than the SNR requirements for some given area of a single low DR scene. CGI has a totally different goal. They are not simply displaying the image, but are using it as a lighting source to acurately render 3D models to be inserted into the scene. I'm not fully familiar with this process, but it is ceratinly concievable that this would result in situations where the original HDRI is stretched really hard (it maybe that it is stretched really hard in saturation rather than brightness or even in both but the SNR requirements would be similar). The rendered result is still going to be output on an 8 bit display though, which is where I come up with this pratical limit to SNR: 256:1 (i.e. I can think of no reason for a SNR requirement of greater than 256). Should we stretch an image so hard that some given level is black and the next higher level is white on an 8 bit screen, if we had a SNR of 256, there would be no visible noise since the noise level would be less than 1 screen brightness unit above black. So let's say that for some reason we do require this maximum SNR of 256 throughout the entire image, how does that translate to how many and how spaced the brackets need to be:

***

Noise due to the quantum mechanical nature of photons is known as shot noise (http://en.wikipedia.org/wiki/Shot_noise). Due to the nice way the statistics work out it is equal to the square root of the number of photons in our signal. Photon noise far dominates the other sources of noise in the well exposed areas of the image (b/c shot noise only decreases with the sqrt of the signal, while other sources decrease linearly with signal), so let's just consider our main noise source for now, that is, shot noise.

A search of the internets reveals that the full well capacity of the 5D3 (what we'll use for this example, since it's FWC is quite large) is something like 70,000 photons. This means the SNR of the brightest signal capturable with the 5D3 is srqt(70,000) = 264.5... Good enough for gov't work ;) (the read noise SNR would be related to the DR of 11 stops since the DR in EVs is just log2 of the ratio between the brightest possible signal and the noise floor, to convert back to a ratio 2^11 = 2048, so clearly photon noise is dominating here). Now, let's go down by 1 EV, that means 35,000 photons. The SNR is sqrt(35,000) = 187.1 -> not good enough for our extreme 256:1 SNR requirement. If our brackets are spaced 1EV apart, this 1EV down will be overexposed on the next bracket, so we can only use this one frame for those areas. Ironically, as we keeping going down, assuming a well designed algo that 'stacks' frames to cancel out photon noise, there are more and more frames we can use to cancel out photon noise in areas that aren't overexposed, the lower we go. Meaning the shadows will on average have a better SNR than the highlights, and our minimum SNR will be in areas of the image right at that first EV step (assuming we take enough brackets to get down to where even our deepest shadows are only 1 of our EV steps from the right of the histogram). This leads us to a little equation for the minimum SNR based simply on FWC and EV spacing: SNR = sqrt(FWC/(2^EvStep)).

Note: this equation will start to get more and more wrong as ev step size increases, since read noise will start to play a more important role, and we have neglected it's contribution here.

I know it's hard to believe that 187:1 is not a good enough SNR, but I'm trying to give these guys the benefit of the doubt that such extremely noise free images are required for their purposes.

This all leads to some interesting conclusions:

It is better to not use even ev spacing, but gradually increase the ev spacing, assuming you have an HDR merge algo that stacks pixels to cancel out photon noise. The exact rate I think is going to be something related to a sqrt function (but I'm not sure exactly yet, feel free to work out the mathematics, it may involve a geometric series (http://en.wikipedia.org/wiki/Geometric_series)). Working out this rate would give you the most even SNR accross the entire image, thus optimizing the necessary number of frames to take (So that we don't take extra frames that disproportionally contribute to SNR improvement in areas of the image that don't need further improvement). But at some point (maybe around 4 or 5 ev) you will have to stop increasing the spacing due to read noise becoming more of a factor. This is all assumming you need a high and even SNR accross your entire image, which might not neccessarily be true for photographers, since non-linear curves transformations may put more or less emphasis on noise in various regions of the histogram)

The spacing you should use depends only the FWC of your camera, and what your SNR requirements are. (So appropriate spacing may differ between FF and APS-C cameras, since they usually have quite different FWC).

You should keep taking frames at whatever increasing ev spacing works out to be correct until you get to the point where the next image would be completely overexposed. So it's probably just easier to stop when you get to an image that is fully white and just throw it out.

If you do not require a SNR of greater than sqrt(FWC/(2^4)) ~= 66, which would probably be true of most photographers, then Guilermo's Zero Noise ideas about using 4ev spacing is probably very good advice. Another way to think about it is: are bright mid-tones (-4EV from max) on a normal ISO100 image noise free enough for you? I'll put it this way: I've never heard a photographer complain about the noise in the bright midtones of a properly exposed ISO100 image.

Something else to note: should your SNR requirements be higher than sqrt(FWC), i.e. the highlights of a properly exposed ISO 100 image are too noisy (really!?), you are going to have to stack multiple exposures per bracket frame to get there, if you stack 2 frames, you count twice as many photons, effictively doubling your FWC, and so on and so forth. Also, this is mathematical proof of my previous assertions about taking multiple of particular frames at some given ev, with wider ev spacing, being the same as using smaller ev spacing (e.g. a sequence of 10 frames at 1EV spacing is the same as 2 sets of 5 frames at 2 EV spacing), nobody really disputed that though, I'm just pointing out that now I have some proof.
Title: Re: Advanced Bracket Features Request
Post by: Audionut on December 30, 2013, 11:59:42 PM
http://www.cambridgeincolour.com/tutorials/image-averaging-noise.htm

It's my understanding that you gain benefit on each doubling of frames.  So obviously the benefit is determined by how willing you are to kill the shutter.

dmilligan, I had a conversation with another member on shot noise here (http://www.magiclantern.fm/forum/index.php?topic=8442.0).
Title: Re: Advanced Bracket Features Request
Post by: dmilligan on December 31, 2013, 03:19:27 AM
Ah yes, I remember reading bits of that conversation, that guy had no idea what he was talking about. I think he was missing the simple fact that x / sqrt(x) = sqrt(x). So if shot noise is the std dev (σ) of photon distribution and σ = sqrt(N) since it's a poisson distribution, which means the Signal/Noise = N / sqrt(N) = sqrt(N). It's a funny property of photon shot noise that the SNR also equals the amount of noise which also equals the σ of the signal. All because x/sqrt(x) = sqrt(x). The equations weren't wrong, he just didn't realize that they were mathematically the same thing.

Title: Re: Advanced Bracket Features Request
Post by: Audionut on January 01, 2014, 07:05:16 PM
He was just trolling.

I'm pretty sure in your post on the last page, you have mixed SNR with bit precision.  An 8 bit display has 8 bits of precision.  In other words, there are 256 possible shades of grey.  Here, a captured tonal precision of greater then 256 can actually causes problems, when this increased tonal precision is mapped down to 256 levels (banding).  The standard practise is to dither this information (add noise) to mask the levels and reduce the effects of banding.

Stretching and compressing is all in the tonal range, and separate to the SNR of each tonal step.  When we get down to -6EV below sensor saturation (14bit capture device), each successive tonal step below this now has less precision then a typical display (I say typical now because hopefully typical displays are now truly 8bit and don't simply dither down further to 7 or 6 bits).  And of course, this is only a problem where you a stretching the shadows. -6EV being below the recommended 4EV spacing for togs, and extremely below all of this 0.3EV spacing nonsense.

SNR is different entirely, and of course, is a ratio of signal vs noise.

To put things into perspective for those of us less mathematically inclined (3+3=8 right!), -1EV below sensor saturation is still considered to be white.  Not a highlight, white.  The top 2-3 zones in the Zone System (http://dpanswers.com/content/tech_zonesystem.php#zs).