Advanced Bracket Features Request

Started by NickZee, November 11, 2013, 11:20:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

boogotti84

 
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.


digitalcoastimage

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

boogotti84

 i argee with digitalcoastimage post , does Enblend/Enfuse, save 32bit hdr or exr files out?


dmilligan

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.

Marsu42

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.

Greg

I've added a indicator, if the shutter speed is faster than the camera shutter speed, add "E"


Marsu42

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.

Greg

It can create two menu frames, the first will be 12, the second 40 The second menu is normally hidden?



Canon rounding does not work well, if we add 8/3, does not always work correctly.

Marsu42

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?

engardeknave

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?

Greg

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.

a1ex

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.

engardeknave

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

a1ex

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.

engardeknave

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?

a1ex

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.

engardeknave

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

a1ex

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)

boogotti84

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.

a1ex

My tool outputs 32-bit float DNG without any tonemapping. All you have to do is to convert them to EXR.

Guillermo Luijk

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

engardeknave

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

dmilligan

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

Audionut

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.