Author Topic: Auto ETTR based on RAW histogram (ettr.mo)  (Read 105751 times)

X-RAY

  • New to the forum
  • *
  • Posts: 34
  • Germany - 5DIII
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #50 on: May 28, 2013, 09:25:16 PM »
Ah sorry ... I think ExpSim was it. You're great ^^
www.frankenfotograf.com
instagram.com/frankenfotograf

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #51 on: May 28, 2013, 09:58:13 PM »
For some reason when I start voice tags on 600D and 6D it just flashes the light once and doesn't start recording... set is only blinking the light. Even if I comment out the check for QR mode it doesn't work.... but it does start during normal photo mode... I see the events when I turned on event spy. Looking at it some more.

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #52 on: May 31, 2013, 01:20:34 AM »
*bump


Auto ETTR doesn't touch aperture does it? Outside I get overexposed frames if I don't set the aperture. I know many want fixed DOF, etc but maybe as an option.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3565
  • Blunt and to the point
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #53 on: May 31, 2013, 04:34:55 AM »
Aperture could be set like a safety shift in Canon menu I guess.
At last resort, stop down aperture.

On another note, I set this up on my brother in laws 550D.  After being amazed, he looked at me and said, "But you said not to use auto modes".  lol.

Did anyone else know that when you load the raw_rec module, you get RAW histograms in live view?  Am I just slow!

On his 550D, Auto ETTR only worked in live view.  I couldn't get it to work at all in photo mode.  And yet on my 5D3, it doesn't work in liveview.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #54 on: May 31, 2013, 06:45:04 AM »
The math is already complex only with balancing shutter and ISO (with all those rounding limitations from Canon), good luck adding the aperture ;)

Also, the ETTR is also good for timelapse, where you want constant aperture. It's not intended to be a full auto mode. You can combine it with expo lock btw.

In LiveView, it works if picture quality is raw. If you shoot jpeg... of course it shows the jpeg histogram.

lederschnautz

  • New to the forum
  • *
  • Posts: 4
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #55 on: June 08, 2013, 07:44:20 PM »
Hi there,

in the Beginners Guide to ETTR Timelapse, RenatoPhoto wrote
Quote
NOTE:  If you set your intervalometer at 30 seconds and your slowest shutter speed at 30 sec, you will have problems.  Set the intervalometer at least = Slowest Shutter speed plus the review image setting, in Canon Menu, plus 3 more seconds.
Would it be possible, to change the interval during the course of a shooting? So i start during daytime with short intervals, giving a lot of frames to work with and only if the shutter gets to slow, the intervals get longer.
If this question is already answered somewhere, please don't crucify me, i couldn't find anything about it.

Thanks to all the Devs for putting their time in this awsome Firmware, and to all the people contributing great information in these forums.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #56 on: June 08, 2013, 07:45:09 PM »
Set ETTR to 30s and intervalometer to 10s, should do the trick. Didnt't try it though.

ismael

  • New to the forum
  • *
  • Posts: 2
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #57 on: June 21, 2013, 05:10:13 PM »
About ETTR.

In a dark scene, what would be better in terms of reducing noise?

- expose to the right using high ISO's? (assuming I'm already maxed out in terms of iris and shutter)?
- expose properly and have the advantage of using a lower ISO and therefore less noise?

This is not exactly about the feature itself from ML but more of a general wondering about the tecnique.

jerkjackson

  • Just arrived
  • *
  • Posts: 1
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #58 on: August 20, 2013, 10:07:49 AM »
hi there,

i'm new to ML and the forums here - but so far am quite impressed! tried the auto ettr on a 5dII mainly for timelapse.

i'm currently planning a future project which will involve a lot of timelapse and will probably use ML for exposing to the right. the only thing that i'm not 100% happy with is, that it auto-ettr only seems possible in full RAW mode. am i missing something here? is it possible to use auto ettr with SRAW1 and SRAW2 modes as well?

thanks,
joerg

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #59 on: August 25, 2013, 09:11:48 PM »
Last week I had some time to play with ETTR and I think I've found a way to avoid the severe underexposure in scenes with high dynamic range (e.g. like this).

https://bitbucket.org/hudson/magic-lantern/commits/fcdc23eb5d7d

How it works:
- If the midtones get too noisy, the ETTR algorithm will stop underexposing.
- Same thing if the shadows get too noisy.

How to quantify "too noisy"?

For midtones it's easy: the median "brightness" gives you the signal level, so we can use the SNR. So, when I say the midtone SNR is 5 EV, this means half of the image has a SNR less than 5 EV, and the other half has a SNR higher than 5 EV. Pretty easy and statistically robust.

For shadows, I've chosen the 5% percentile. So, in this context, the shadows having a SNR of 3 EV means 5% of the image pixels have a SNR lower than 3 EV, and the other pixels will be brighter than that.

Keep in mind that 5% is bigger than you may think, since it refers to image area, not linear size. The linear percentage is roughly 22% (1/4.5).

So, you can choose 2 noise limits, one for midtones and one for shadows, and the image will not get noisier than that (but you may lose some highlights). This setting has the highest priority, so it will sacrifice highlights even if you disallow clipping from the other settings.

I'm not yet sure what are some good defaults for this new trick, so it's turned off by default.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3565
  • Blunt and to the point
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #60 on: August 26, 2013, 06:46:32 AM »
This is handy.

Shouldn't the midtones be 13-18% luminance?  3EV below important highlights.

In it's current configuration, 6EV looks to be a good default.

Default ETTR 0% clipping                                                                                                                   5EV midtones





6EV midtones                                                                                                                                       7EV midtones





8EV midtones



8EV midtones can be ruled out due to highlight loss, although to be fair, the skin tones have been captured correctly.  7EV has also blown highlights beyond recovery.  But lets weigh up midtone detail.

5EV midtones                                                                                                                               


6EV midtones


7EV midtones


8EV midtones


8EV is obviously clean because it was captured correctly.
7EV is nice and clean also because it was captured at only 1EV below.
6EV still retains nice clean detail in the midtones (skin).  Deep shadows are getting noisy.
5EV has noise above my own personal threshold.  Deep shadows are very noisy, but more importantly, noise in the midtones has become to high.

Conclusion.  You're like Santa Clause, but better.  You bring toys to play with every other week  ;D

On a more serious note!
6EV is where it's at.  6EV lifts the midtones to a suitable SNR while retaining very good highlight detail.

Here is a quick blend of the 6EV shot.



On scenes with greater dynamic range, my conclusion holds true imo.  5EV midtone setting will blow highlight detail without lifting that midtone detail to a sufficient SNR.  Might as well blow the highlight detail a stop further and get those midtone to a sufficient SNR.


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #61 on: August 26, 2013, 07:01:07 AM »
Quote
Shouldn't the midtones be 13-18% luminance?  3EV below important highlights.

I prefer to specify this in terms of noise (because this is the reason to sacrifice the highlights). So, at ISO 100, with 11 stops of DR, 3 EV below clipping level would be 8 EV of SNR if my math is not broken.

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3565
  • Blunt and to the point
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #62 on: August 26, 2013, 09:36:38 AM »
Yes that does make sense.

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #63 on: August 30, 2013, 05:05:15 PM »
How it works:
- If the midtones get too noisy, the ETTR algorithm will stop underexposing.
- Same thing if the shadows get too noisy.

I am impressed with the results! 
I love AETTR and this function makes it easier to use because I do not need to tweak the highlight ignore so much.

It appears that by using these two settings the module adjusts to one or the other noise levels.  I assume that whichever (midtones or shadows) gives the higher correction level, then that one is implemented.  Maybe this is an weighted additive correction such as 1/2midtones + 1/2shadows.   
I was wondering if you could confirm the logic implementation because this part is not clear.

The final result is that the highlight ignore is adjusted based on each individual scene which is exactly what I have been looking for, i.e. some logic to automate the highlight ignore feature.
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #64 on: August 30, 2013, 05:10:11 PM »
The logic is right in the quotes (so it will use the highest correction level).

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #65 on: August 30, 2013, 06:15:17 PM »
Alex, could you add an "analyze only" option that beeps noticeably when the raw histogram has the amount of blown highlights in the ettr options? This way, the module would be very useful even if not going for ettr, but shooting regularly in other modes like I usually do.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #66 on: August 30, 2013, 06:17:52 PM »
I have the histogram always enabled for that (the ETTR hint from there uses the parameters from auto ETTR).

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #67 on: August 30, 2013, 06:25:44 PM »
I have the histogram always enabled for that (the ETTR hint from there uses the parameters from auto ETTR).

The histogram from live view?! I seem to be doing the complete opposite vs. you, as I never shoot in lv, it wouldn't work for me, even if I miss a lot of the great ml lv features.

Most of the time I shoot animals with fill flash(es) in changing light in a semi-automatic (Av with ml autoiso, ml autoexpo) mode - and having an audible hint when the dynamic range rises too much for that iso setting would be invaluable ... because the exposure changes so often auto ettr isn't really helpful here. And even in full manual with flash an "analyze only" ettr option could signal too many blown specular highlights.

Btw as you know this request is really a tiny addition (beep instead of ettr), I'm sure I'm not the only one that'd find it useful.

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #68 on: August 30, 2013, 06:38:07 PM »
Is it possible to use Canon Exposure value or BV value (recently found for Autoexposure module) + 1 EV for a quick first approximation for AETTR?
The mem location was found here: http://www.magiclantern.fm/forum/index.php?topic=7208.msg67025#msg67025

I noticed that AETTR sometime takes a few shots to converge.  But If I take the Canon suggested Exposure value and add +1EV an use these settings as begging point for AETTR then the solution converges rapidly!
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #69 on: August 30, 2013, 06:55:03 PM »
The histogram is there in photo mode too.

Canon exposure value is not much better than random from what I've noticed. But you can use it, just flip to some auto mode.

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #70 on: August 30, 2013, 07:13:38 PM »
Canon exposure value is not much better than random from what I've noticed. But you can use it, just flip to some auto mode.

I had tried this in the past hoping that Canon values would speed up convergence but sometimes it never converged due to some conflict so I stop doing this.  I will try it again.

Thanks
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #71 on: August 30, 2013, 07:48:39 PM »
The histogram is there in photo mode too.

Ok, I again have learned something - but what I really want is to get the camera tell me about blown highlights *without* looking at the display, no matter if live view or not.

That's because when shooting animals my eye is glued to the viewfinder, and I often haven't got time to check for the correct exposure and end up with clipping, as you pointed out Canon's metering cannot really be relied upon so a ml warning would be appreciated...

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #72 on: August 30, 2013, 07:50:19 PM »
The hardest part is to think where I should put that in the menu.

RenatoPhoto

  • Moderators
  • Hero Member
  • *****
  • Posts: 1509
  • 5DM3 / 7D
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #73 on: August 30, 2013, 08:22:24 PM »
But you can use it, just flip to some auto mode.

Ok, I see that it works better now but unfortunately the Midtones and Shadows do not work since (Auto Iso).  If the AutoEttr is ON can it automatically disable the AutoIso to gain better control?
http://www.pululahuahostal.com  |  EF 300 f/4, EF 100-400 L, EF 180 L, EF-S 10-22, Samyang 14mm, Sigma 28mm EX DG, Sigma 8mm 1:3.5 EX DG, EF 50mm 1:1.8 II, EF 1.4X II, Kenko C-AF 2X

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12241
  • Maintenance mode
Re: [DONE] Auto ETTR based on RAW histogram?
« Reply #74 on: August 30, 2013, 08:27:39 PM »
I prefer to let the user choose whatever settings he wants, and just print a warning.