over_exposed = (histogram_proc[HISTO_RGB][HISTO_WIDTH-3] +histogram_proc[HISTO_RGB][HISTO_WIDTH-2]*4 +histogram_proc[HISTO_RGB][HISTO_WIDTH-1]*8) > exposition_thresh;
@reyalp @philmoz Out of ignorance, is there a way to extract a variable from the core, to use in Lua. Or does one need to code/compile in the transfer. For example the following is in the histogram.c Code: [Select]over_exposed = (histogram_proc[HISTO_RGB][HISTO_WIDTH-3] +histogram_proc[HISTO_RGB][HISTO_WIDTH-2]*4 +histogram_proc[HISTO_RGB][HISTO_WIDTH-1]*8) > exposition_thresh;Thus is there a way to ‘peek’ at the variable over_exposed?
luascript.c: static int luaCB_over_exposed( lua_State* L ){ lua_pushnumber(L, histo_over_exposed); return 1;}static int luaCB_under_exposed( lua_State* L ){ lua_pushnumber(L, histo_under_exposed); return 1;}//... FUNC(under_exposed) FUNC(over_exposed)// histogram.h:static int histo_under_exposed;static int histo_over_exposed;// histogram.c: if (histo_max[HISTO_RGB] > 0) { // over- / under- exposed under_exposed = (histogram_proc[HISTO_RGB][0]*8 +histogram_proc[HISTO_RGB][1]*4 +histogram_proc[HISTO_RGB][2]); over_exposed = (histogram_proc[HISTO_RGB][HISTO_WIDTH-3] +histogram_proc[HISTO_RGB][HISTO_WIDTH-2]*4 +histogram_proc[HISTO_RGB][HISTO_WIDTH-1]*8); } else { over_exposed = 0; under_exposed = 1; } histo_over_exposed = over_exposed; histo_under_exposed = under_exposed; under_exposed = under_exposed> exposition_thresh; over_exposed = over_exposed > exposition_thresh; histogram_stage = 5; break;
There may be ways to make a low level value more global and give it a token for scripting... Edit: A first attempt for some research, ...Edit2: & a little improvement, if need for more precision than than 1 or 0...
Started by GrAnd Forum related topics (including issues)
Started by emklap « 1 2 » DSLR Hack development
Started by ledelectronics Feature Requests
Started by srsa_4c « 1 2 » General Discussion and Assistance
Started by waterwingz Forum related topics (including issues)