Auto exposure algorithm for shooting - auto iso, ae (autoexpo.mo)

Started by pravdomil, July 20, 2013, 10:19:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nanomad

Welcome to the world of reverse engineering, where half of the stuff is a wild guess.
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

Audionut

Quote from: pravdomil on August 16, 2013, 11:59:18 AM
well we can't change aperture in TV and shutter in Av (fighting with Canon) !

definitely I left this idea until there will be some clear and realizable algorithm

So we should stay in M mode and allow user to define Av or Tv useability in module.
In Av useability mode.  Map max Av to top scroll wheel.
If max Av change, adjust ISO to match original curve.  We adjust ISO, because we always want to use lowest Tv (with respect for user defined minimum Tv) for maximum light through lens.  We don't adjust Tv, because like real Av mode, we let Tv float (based on Av/ISO) for correct exposure. 

Like so,



For Tv mode.  Map TV minimum to top scroll wheel.  Adjust ISO curve to match original curve.


Or redefine module, with AV minimum and TV range/TV curve.

xNiNELiVES

So now we can shoot in other modes than M? Last time I was here I was told that it only works in M, which didn't allow an auto shutter speed.

pravdomil

Quote from: Audionut on August 22, 2013, 04:36:34 AM
In Av useability mode.  If max Av change, adjust ISO to match original curve.
you probably mean min AV
so if you increase min AV => move ISO curve left

Quote from: Audionut on August 22, 2013, 04:36:34 AM
For Tv mode.  Map TV minimum to top scroll wheel.  Adjust ISO curve to match original curve.
so if you increase TV minimum => move ISO curve left

right? some other dependencies?

Audionut

Quote from: pravdomil on August 22, 2013, 12:16:00 PM
you probably mean min AV

Yes sorry.  My mistake on the GUI also, I was thinking aperture opening, not Aperture Value.

Quote from: pravdomil on August 22, 2013, 12:16:00 PM
so if you increase min AV => move ISO curve left
so if you increase TV minimum => move ISO curve left

Correct.  Only when Av is adjusted via scroll wheel, so that current functionality remains exactly the same.
ie:  Enter module and adjust settings as is currently done, when Av changes via scroll wheel, ISO curves adjusts accordingly

Quote from: pravdomil on August 22, 2013, 12:16:00 PM
some other dependencies?

Not sure the best way to control this with cameras that only have 1 scroll wheel.  On cameras with dual wheels (5D3 etc), Av/Tv control can be on 1 wheel, with EC control on the other.

Mapping minimum Tv isn't a true Tv priority mode.  This would require a mode select option to choose Tv/Av priority.  In Tv priority, Tv minimum becoming Av minimum and AV range/Av curve becoming Tv range/Tv curve.

Karmaschinken

Hello, I don´t understand some things happening here. I have installed the todays nightly build to have a look what has happened to ML during the last month. When stumbling upon this new ETTR-module, something that is completely new for me, but I get the idea behind it, I was wondering, if my long desired  min-max ranges for AV/TV and ISO were realized meanwhile. When googeling that, I found stated in a thread, that the module ml_auto_iso was dropped because now there is ETTR. But here I see a thread that is talking about a "real P"-mode, which, looking at the curves and so on, seems to be fantastic. And I can´t see how ETTR replaces min-max-ranges or even curves for exposure values? I see you discussed ETTR vs. "real P", but I can´t see your final conclusion.

However, this module discussed here is not implemented yet, no? What do you think, will it be linked into ML, and if so, when? Thanks a lot! Martin...

Audionut

ETTR exposes for the highlights, this exposes for the midtones.

Quote from: Karmaschinken on August 22, 2013, 08:39:40 PM
However, this module discussed here is not implemented yet, no? What do you think, will it be linked into ML, and if so, when? Thanks a lot! Martin...

Try reading the first post.

psihodrill

I testing the Auto exposure on 60D But at want moment i get error on Cr2 file its make vertical lines,this error i get when i have large iso 5000 - 10000. When i turn off autoexpo module & changed iso its start work properly. JPG file: https://www.dropbox.com/s/wbmwdxmgl5pb3uc/_MG_2130.CR2_1.jpg CR2 file: https://www.dropbox.com/s/8b33t1x46ffwnda/_MG_2130.CR2

Karmaschinken

Jesus! Incredible stuff! You are real heroes! Okay, today I´ll try to learn some curves! :-D Thanks a lot!

pravdomil

https://bitbucket.org/hudson/magic-lantern/pull-request/196/autoexpo-update

Same TV curve
Compensate minimum aperture changes with ISO offset.
And EC changes with max aperture & EC offset & ISO offset.
for now, I don't know how to make relation between min shutter speed, we need to describe it more accurately (the best in C)

pravdomil

Thanks Audionut for a big beer! This will be a little different beer than others.

Marsu42

Quote from: pravdomil on August 23, 2013, 12:39:54 AM
https://bitbucket.org/hudson/magic-lantern/pull-request/196/autoexpo-update

Nice solution for the #define AE_VALUE !

One request: Could you please add the option to link the iso range to what is set in the Canon menu, i.e. max. value and on 6d/5d3 also min. value? Afaik this also is what the ettr module does and what the autoiso module did.

Imho it makes sense for any modules or ml function to at least to be able to honor these central settings when automatically choosing an iso range, so if the user sets some values he/she can be sure the camera doesn't go beyond this anywhere unless manually overridden with the iso button.

pravdomil

Quote from: Marsu42 on August 23, 2013, 05:00:35 PM
Could you please add the option to link the iso range to what is set in the Canon menu, i.e. max. value and on 6d/5d3 also min. value?
5D2 doesn't have any auto ISO settings.
You can do a pull request to my repo for other cameras.

Marsu42

Quote from: pravdomil on August 23, 2013, 05:06:41 PM
5D2 doesn't have any auto ISO settings. You can do a pull request to my repo for other cameras.

Ok, I'll probably do this once I finished the autoiso module :-p ... the main part here is you're not opposed to the idea so if anyone comes around to it you'll merge it. It's really just the menu option/logic, you can get the value with a global variable: "int max_iso = auto_iso_range & 0xFF".

pravdomil

Maybe a found out relations between our properties.
iso_min => ec_off & iso_off & av_max
av_min  => ec_off & iso_off
ec      => ec_off & iso_off & av_max
tv_min  => ec_off & iso_off

iso_max => ec_off & iso_off ??


:D agree?

Audionut

Quote from: pravdomil on August 23, 2013, 12:39:54 AM
Same TV curve
Compensate minimum aperture changes with ISO offset.
And EC changes with max aperture & EC offset & ISO offset.

Nice work.  It all works as expected.

Quote from: pravdomil on August 23, 2013, 12:39:54 AM
for know, I don't know how to make relation between min shutter speed, we need to describe it more accurately (the best in C)

As Tv minimum increases, decrease Av (for maximum light through lens).  Where compensation fails with Av, move ISO curve left.
As Tv minimum decreases, move ISO curve right (for least ISO noise).  Where compensation fails with ISO, increase Av.

I would also think it's a good idea to respect min Av set by user in AV range.

Quote from: pravdomil on August 23, 2013, 05:19:04 PM
Maybe a found out relations between our properties.

I don't understand.

Can you determine the max Av of a lens?  Currently with -EC, Av max doesn't respect lens limit.
With -EC, EC curve should increase (towards +/-0 EC) at high BV to respect Av max of lens.

pravdomil

Quote from: Audionut on August 24, 2013, 04:18:53 AM
Can you determine the max Av of a lens?  Currently with -EC, Av max doesn't respect lens limit.
turn on lens AV

Same TV relations (it works both ways)
if you increase ISO min => move EC curve and ISO curve to the right, also decrease AV max
if you increase AV min  => move EC curve and ISO curve to the left
if you increase EC      => move EC curve and ISO curve to the left, also decrease AV max
if you increase ISO max => move EC curve and ISO curve to the left ??
if you increase TV min  => decrease AV to AV min if not possible move EC curve and ISO curve to the left ??


agree?

Audionut

If you increase ISO max ==> do not move curves.
Increasing ISO max extends low light capabilities for the same shutter/aperture settings.

Everything else looks sound.

Quote from: pravdomil on August 24, 2013, 01:28:34 PM
turn on lens AV

Request this on as default. 
Changing AV outside of lens capability should be the (advanced) option.

pravdomil

next update https://bitbucket.org/hudson/magic-lantern/pull-request/196/autoexpo-update/commits

Quote from: Audionut on August 24, 2013, 02:47:35 PM
Request this on as default.
done default lens av = this lens

I have implemented min ISO & min AV & EC changes.
I tried to implement min TV relation but it doesn't make sense for me, could you please post some example?
Above that I want to have same TV on and set min TV without changing other variables.

frogcement

is there a module for the 7d with the most recent changes or should i figure out how to build it?
--
K.C.

Audionut

Quote from: frogcement on August 25, 2013, 02:35:35 AM
is there a module for the 7d with the most recent changes or should i figure out how to build it?

Here.  You will probably need a recent build for the 7D for the module to work.

arrinkiiii


frogcement

Quote from: Audionut on August 25, 2013, 04:10:17 AM
Here.  You will probably need a recent build for the 7D for the module to work.
I cant get it to load, im running 2013Aug20.7D203
--
K.C.

frogcement

Quote from: arrinkiiii on August 25, 2013, 04:27:09 AM
It's working on the 7D
Could you post your ML directory && autoexec file somewhere i could download them? id appreciate it.
--
K.C.

arrinkiiii

Here you go my friend

https://www.dropbox.com/sh/9w5t3lcmgugo32g/Xmn6H066DY


The autoexpo.mo that are im ML folder i think is more older that the version that Audionut have put now.