get_histo_range strangeness - page 5 - Script Writing - CHDK Forum supplierdeeply

get_histo_range strangeness

  • 55 Replies
  • 4570 Views
Re: get_histo_range strangeness
« Reply #40 on: 20 / May / 2022, 12:43:49 »
Advertisements
@c_joerg

As with many things, I use the ML feedback to inform my exposure setting, not control it.

For this reason, the CHDK gamma based histo feedback is more than sufficient to set/control auto bracketing, ie set the exposure for the shadows and bracket until the ETTR point.

I personally, in my script, give the user the option to define the ETTR/saturation point, ie when the top 1 to 5, user selectable, bins are ‘just’ non zero, from there I can adjust by a 1/3 of a stop, for additional ETTR insurance.

My gut feeling is, the RAW feedback won’t change things that much, if at all, but I still welcome us having more ‘accurate’ feedback.

Finally, I think Lua CHDK has the edge over ML for photography. ML is now totally a video user platform, ie the ML blog is ‘just’ video stuff. CHDK on the M3 = a great photographers platform IMHO.

It’s sad we are going to lose the M platform. Fingers crossed those trying to get ML running on the R platform succeed and that the project doesn’t get too hijacked by the video world ;-)

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: get_histo_range strangeness
« Reply #41 on: 20 / May / 2022, 12:47:49 »
Probably success depends on scenery, as so often...  :haha
I think, we try here to optimize the last steps of pre-postprocessing finetuning,
so how to perform the best presets?  :-*
Maybe a good view from Scene Luminance...  ???
https://chdk.setepontos.com/index.php?topic=9537.msg97763#msg97763

Edit: For experiments exposed to luascript.c
Code: [Select]
// from shooting_get_luminance()
static int luaCB_get_luminance( lua_State* L ) // http://en.wikipedia.org/wiki/APEX_system
{//    static const double K = 12.5;  // K is the reflected-light meter calibration constant (*100)
    short bv = shooting_get_bv96();
    int b=(int)(1250*pow(2.0,((double)(bv-168)/96.0)));
  lua_pushnumber(L, b);
  return 1;
}
//    FUNC(get_luminance)
« Last Edit: 20 / May / 2022, 14:27:45 by Caefix »
All lifetime is a loan from eternity.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: get_histo_range strangeness
« Reply #42 on: 21 / May / 2022, 02:58:21 »
Thanks for the tips & links. I will take a closer look at the ML code to see what I can find.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: get_histo_range strangeness
« Reply #43 on: 21 / May / 2022, 03:09:17 »


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: get_histo_range strangeness
« Reply #44 on: 22 / May / 2022, 00:48:34 »
Looking at the ML code the ETTR hint for an over exposed image appears to be a simple value calculated from the % of over exposed pixels (relative to the total pixel count).


     correction = -log2(1 + over_exposed_count * over_exposed_count)


1% -> -1 EV
2% -> -2 EV
5% -> -4 EV
10% -> -6 EV


etc.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: get_histo_range strangeness
« Reply #45 on: 22 / May / 2022, 01:07:19 »
@philmoz

That doesn’t look mathematically/scientifically ‘robust’ to me, it looks more like a heuristic or empirical type of approach.

May still be helpful however ;-)

*

Offline c_joerg

  • *****
  • 1248
Re: get_histo_range strangeness
« Reply #46 on: 22 / May / 2022, 12:58:51 »
That doesn’t look mathematically/scientifically ‘robust’ to me, it looks more like a heuristic or empirical type of approach.

That is exactly my experience with the ML ETTR.

You just need an underexposed picture for an exact calculation.
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

Re: get_histo_range strangeness
« Reply #47 on: 22 / May / 2022, 13:18:50 »
@c_joerg

I’m finding that I can achieve all my needs, on the M3, by either setting exposure for the shadows, bracketing to the ETTRing point; or setting an ETTR exposure, using the ETTR hint bars, and ISO  bracketing by a single exposure, eg ISO 800, say.



*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: get_histo_range strangeness
« Reply #48 on: 06 / June / 2022, 05:38:49 »
The Ximr builds have an updated version of the expiremental raw EV histogram.


The histogram bars are now at 1/9 EV instead of 1/3 to be able to calculate an ETTR hint.


The ETTR hint is only calculated for under exposed images. I have tried a few ways of calculating for an over exposed image; but I can't find anything that I think is usable.


The attached image shows what it looks like. The grey lines are spaced at 1 stop intervals - they are clustered closer at the left end because of the decreased resolution at the shadow/black end.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline Caefix

  • *****
  • 945
  • Sorry, busy deleting test shots...
Re: get_histo_range strangeness
« Reply #49 on: 06 / June / 2022, 10:16:11 »
I have tried a few ways of calculating for an over exposed image; but I can't find anything that I think is usable.

How to implement the eqiuvalent of an audio-compressor/limiter...  :o
Probably need to analyze sceen first. (far overexposed spot (sun)  :-[ or bright winter plane?)
Maybe need for additional edge-detection?  :-*
All lifetime is a loan from eternity.

 

Related Topics