change gamma and log

This commit is contained in:
Desmis 2015-10-13 14:49:37 +02:00
parent 257d4bf54e
commit d669f2ff2e
11 changed files with 103 additions and 86 deletions

View File

@ -654,9 +654,8 @@ HISTORY_MSG_421;Retinex - Gamma retinex
HISTORY_MSG_422;Retinex - gamma HISTORY_MSG_422;Retinex - gamma
HISTORY_MSG_423;Retinex - slope HISTORY_MSG_423;Retinex - slope
HISTORY_MSG_424;Retinex - HL threshold HISTORY_MSG_424;Retinex - HL threshold
HISTORY_MSG_425;Retinex - HL control red HISTORY_MSG_425;Retinex - Log base
HISTORY_MSG_426;Retinex - HL control GB HISTORY_MSG_426;Retinex - Hue equalizer
HISTORY_MSG_427;Retinex - Hue equalizer
HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT;Add
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b> HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
HISTORY_SNAPSHOTS;Snapshots HISTORY_SNAPSHOTS;Snapshots
@ -1561,13 +1560,15 @@ TP_LABCURVE_LCREDSK;Restrict LC to red and skin-tones
TP_LABCURVE_LCREDSK_TIP;If enabled, the LC Curve affects only red and skin-tones.\nIf disabled, it applies to all tones. TP_LABCURVE_LCREDSK_TIP;If enabled, the LC Curve affects only red and skin-tones.\nIf disabled, it applies to all tones.
TP_LABCURVE_RSTPROTECTION;Red and skin-tones protection TP_LABCURVE_RSTPROTECTION;Red and skin-tones protection
TP_LABCURVE_RSTPRO_TOOLTIP;Works on the Chromaticity slider and the CC curve. TP_LABCURVE_RSTPRO_TOOLTIP;Works on the Chromaticity slider and the CC curve.
TP_RETINEX_BASELOG;Logarithm base
TP_RETINEX_BASELOG_TOOLTIP;Change base logarithm\nLow values = near linear\nHigh values increase effect
TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL
TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b*
TP_RETINEX_CURVEEDITOR_CD;L=f(L) TP_RETINEX_CURVEEDITOR_CD;L=f(L)
TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Correct raw data to reduce halos and artifacts TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Correct raw data to reduce halos and artifacts
TP_RETINEX_CONTEDIT_LH;Hue equalizer TP_RETINEX_CONTEDIT_LH;Hue equalizer
TP_RETINEX_CURVEEDITOR_LH;Strength=f(H) TP_RETINEX_CURVEEDITOR_LH;Strength=f(H)
TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Equalize strength in function of hue\nIf Reinex method='highlight' also acts on the chroma TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Equalize strength in function of hue\nIf Retinex method='highlight' also acts on the chroma
TP_RETINEX_GAIN;Gain TP_RETINEX_GAIN;Gain
TP_RETINEX_GAIN_TOOLTIP;Acts on the transmission in combination with offset, this is very different from others settings. Used for black or white pixels, and for better balance the histogram. TP_RETINEX_GAIN_TOOLTIP;Acts on the transmission in combination with offset, this is very different from others settings. Used for black or white pixels, and for better balance the histogram.
TP_RETINEX_GAM;Gamma retinex TP_RETINEX_GAM;Gamma retinex
@ -1584,9 +1585,6 @@ TP_RETINEX_HIGHLIG;Highlight
TP_RETINEX_HIGHLIGPLUS;Highlight More TP_RETINEX_HIGHLIGPLUS;Highlight More
TP_RETINEX_HIGHLIGHT;Highlight threshold TP_RETINEX_HIGHLIGHT;Highlight threshold
TP_RETINEX_HIGHLIGHT_TOOLTIP;Increase action of High algorithm\nNeeds probably to change settings (Neighboring pixels), and increase Raw White-point TP_RETINEX_HIGHLIGHT_TOOLTIP;Increase action of High algorithm\nNeeds probably to change settings (Neighboring pixels), and increase Raw White-point
TP_RETINEX_HIGHLIGHT2;Highlight control (red)
TP_RETINEX_HIGHLIGHT2_TOOLTIP;Acts on RGB channels to reduce magenta (red = master)
TP_RETINEX_HIGHLIGHT3;Highlight control (blue green)
TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LIN;HSL-Linear
TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic
TP_RETINEX_LABEL;Retinex TP_RETINEX_LABEL;Retinex

View File

@ -228,7 +228,11 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
int moderetinex = 2; // default to 2 ( deh.retinexMethod == "high" ) int moderetinex = 2; // default to 2 ( deh.retinexMethod == "high" )
float hig = ((float) deh.highl)/100.f; float hig = ((float) deh.highl)/100.f;
bool higplus = false ; bool higplus = false ;
float elogt;
float hl = deh.baselog;
if(hl >= 2.71828f) elogt = 2.71828f + SQR(SQR(hl - 2.71828f));
else elogt = hl;
// printf("elo=%f\n",elogt);
FlatCurve* shcurve = NULL;//curve L=f(H) FlatCurve* shcurve = NULL;//curve L=f(H)
bool lhutili = false; bool lhutili = false;
@ -308,6 +312,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
vfloat pondv = F2V(pond); vfloat pondv = F2V(pond);
vfloat limMinv = F2V(ilimD); vfloat limMinv = F2V(ilimD);
vfloat limMaxv = F2V(limD); vfloat limMaxv = F2V(limD);
vfloat elogtv = F2V(elogt);
#endif #endif
#ifdef _OPENMP #ifdef _OPENMP
@ -325,7 +330,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
} }
} else { } else {
for (; j < W_L - 3; j += 4) { for (; j < W_L - 3; j += 4) {
_mm_storeu_ps(&luminance[i][j], LVFU(luminance[i][j]) + pondv * xlogf(LIMV(LVFU(src[i][j]) / LVFU(out[i][j]), limMinv, limMaxv) )); _mm_storeu_ps(&luminance[i][j], LVFU(luminance[i][j]) + pondv * xlogf(LIMV(LVFU(src[i][j]) / LVFU(out[i][j]), limMinv, limMaxv) )/xlogf(elogtv));
} }
} }
@ -337,7 +342,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
} }
} else { } else {
for (; j < W_L; j++) { for (; j < W_L; j++) {
luminance[i][j] += pond * xlogf(LIM(src[i][j] / out[i][j], ilimD, limD)); luminance[i][j] += pond * xlogf(LIM(src[i][j] / out[i][j], ilimD, limD))/log(elogt);// /logt ?
} }
} }
} }

View File

@ -451,9 +451,9 @@ enum ProcEvent {
EvLgam = 421, EvLgam = 421,
EvLslope = 422, EvLslope = 422,
EvLhighl = 423, EvLhighl = 423,
EvLhighlig = 424, EvLbaselog = 424,
EvLgrbl = 425, // EvLgrbl = 425,
EvRetinexlhcurve = 426, EvRetinexlhcurve = 425,
NUMOFEVENTS NUMOFEVENTS
}; };
} }

View File

@ -150,8 +150,8 @@ void RetinexParams::setDefaults()
vart = 125; vart = 125;
limd = 8; limd = 8;
highl = 10; highl = 10;
highlig = 100; baselog = 2.71828;
grbl = 50; // grbl = 50;
retinexMethod = "high"; retinexMethod = "high";
retinexcolorspace = "Lab"; retinexcolorspace = "Lab";
gammaretinex = "none"; gammaretinex = "none";
@ -1486,13 +1486,13 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol
keyFile.set_integer ("Retinex", "highl", retinex.highl); keyFile.set_integer ("Retinex", "highl", retinex.highl);
} }
if (!pedited || pedited->retinex.highlig) { if (!pedited || pedited->retinex.baselog) {
keyFile.set_integer ("Retinex", "highlig", retinex.highlig); keyFile.set_double ("Retinex", "baselog", retinex.baselog);
} }
if (!pedited || pedited->retinex.grbl) { // if (!pedited || pedited->retinex.grbl) {
keyFile.set_integer ("Retinex", "grbl", retinex.grbl); // keyFile.set_integer ("Retinex", "grbl", retinex.grbl);
} // }
if (!pedited || pedited->retinex.retinexMethod) { if (!pedited || pedited->retinex.retinexMethod) {
keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod); keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod);
@ -3907,22 +3907,22 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited)
} }
} }
if (keyFile.has_key ("Retinex", "highlig")) { if (keyFile.has_key ("Retinex", "baselog")) {
retinex.highlig = keyFile.get_integer ("Retinex", "highlig"); retinex.baselog = keyFile.get_double ("Retinex", "baselog");
if (pedited) { if (pedited) {
pedited->retinex.highlig = true; pedited->retinex.baselog = true;
} }
} }
if (keyFile.has_key ("Retinex", "grbl")) { /* if (keyFile.has_key ("Retinex", "grbl")) {
retinex.grbl = keyFile.get_integer ("Retinex", "grbl"); retinex.grbl = keyFile.get_integer ("Retinex", "grbl");
if (pedited) { if (pedited) {
pedited->retinex.grbl = true; pedited->retinex.grbl = true;
} }
} }
*/
if (keyFile.has_key ("Retinex", "CDCurve")) { if (keyFile.has_key ("Retinex", "CDCurve")) {
retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve"); retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve");
@ -7328,8 +7328,8 @@ bool ProcParams::operator== (const ProcParams& other)
&& retinex.gain == other.retinex.gain && retinex.gain == other.retinex.gain
&& retinex.limd == other.retinex.limd && retinex.limd == other.retinex.limd
&& retinex.highl == other.retinex.highl && retinex.highl == other.retinex.highl
&& retinex.highlig == other.retinex.highlig && retinex.baselog == other.retinex.baselog
&& retinex.grbl == other.retinex.grbl // && retinex.grbl == other.retinex.grbl
&& retinex.offs == other.retinex.offs && retinex.offs == other.retinex.offs
&& retinex.retinexMethod == other.retinex.retinexMethod && retinex.retinexMethod == other.retinex.retinexMethod
&& retinex.retinexcolorspace == other.retinex.retinexcolorspace && retinex.retinexcolorspace == other.retinex.retinexcolorspace

View File

@ -286,8 +286,8 @@ public:
int vart; int vart;
int limd; int limd;
int highl; int highl;
int highlig; double baselog;
int grbl; // int grbl;
bool medianmap; bool medianmap;
RetinexParams (); RetinexParams ();
void setDefaults(); void setDefaults();

View File

@ -1829,6 +1829,8 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar
double pwr = 1.0 / retinexParams.gam; double pwr = 1.0 / retinexParams.gam;
double gamm = retinexParams.gam; double gamm = retinexParams.gam;
double ts = retinexParams.slope; double ts = retinexParams.slope;
double gamm2 = retinexParams.gam;
if(gamm2 < 1.) {pwr = 1./pwr; gamm = 1. / gamm;}
int mode = 0, imax = 0; int mode = 0, imax = 0;
Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope
@ -1839,6 +1841,9 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar
double add = g_a4; double add = g_a4;
double mul = 1. + g_a4; double mul = 1. + g_a4;
double x; double x;
if(gamm2 < 1.) {start = g_a2; add = g_a4;
x = Color::igammareti (val, gamm, start, ts, mul , add);}
else
x = Color::gammareti (val, gamm, start, ts, mul , add); x = Color::gammareti (val, gamm, start, ts, mul , add);
lutTonereti[i] = CLIP(x * 65535.);// CLIP avoid in some case extra values lutTonereti[i] = CLIP(x * 65535.);// CLIP avoid in some case extra values
@ -2084,8 +2089,10 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC
double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5;
double pwr = 1.0 / deh.gam; double pwr = 1.0 / deh.gam;
double gamm = deh.gam; double gamm = deh.gam;
double gamm2 = gamm;
double ts = deh.slope; double ts = deh.slope;
int mode = 0, imax = 0; int mode = 0, imax = 0;
if(gamm2 < 1.) {pwr = 1./pwr; gamm = 1. / gamm;}
Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope
// printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4);
@ -2095,6 +2102,9 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC
double mul = 1. + g_a4; double mul = 1. + g_a4;
double add = g_a4; double add = g_a4;
double start = g_a2; double start = g_a2;
if(gamm2 < 1.) {start = g_a3; add = g_a3;
x = Color::gammareti (val, gamm, start, ts, mul , add);}
else
x = Color::igammareti (val, gamm, start, ts, mul , add); x = Color::igammareti (val, gamm, start, ts, mul , add);
lutToneireti[i] = CLIP(x * 65535.); lutToneireti[i] = CLIP(x * 65535.);

View File

@ -451,8 +451,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
DEMOSAIC, // EvLgam DEMOSAIC, // EvLgam
DEMOSAIC, // EvLslope DEMOSAIC, // EvLslope
ALLNORAW, // EvLhighl ALLNORAW, // EvLhighl
DEMOSAIC, // EvLhighlig DEMOSAIC, // EvLbaselog
DEMOSAIC, // EvLgrbl // DEMOSAIC, // EvLgrbl
DEMOSAIC // EvRetinexlhcurve DEMOSAIC // EvRetinexlhcurve
}; };

View File

@ -66,8 +66,8 @@ void ParamsEdited::set (bool v)
retinex.vart = v; retinex.vart = v;
retinex.limd = v; retinex.limd = v;
retinex.highl = v; retinex.highl = v;
retinex.highlig = v; retinex.baselog = v;
retinex.grbl = v; // retinex.grbl = v;
retinex.medianmap = v; retinex.medianmap = v;
retinex.transmissionCurve = v; retinex.transmissionCurve = v;
retinex.retinex = v; retinex.retinex = v;
@ -543,8 +543,8 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
retinex.vart = retinex.vart && p.retinex.vart == other.retinex.vart; retinex.vart = retinex.vart && p.retinex.vart == other.retinex.vart;
retinex.limd = retinex.limd && p.retinex.limd == other.retinex.limd; retinex.limd = retinex.limd && p.retinex.limd == other.retinex.limd;
retinex.highl = retinex.highl && p.retinex.highl == other.retinex.highl; retinex.highl = retinex.highl && p.retinex.highl == other.retinex.highl;
retinex.highlig = retinex.highlig && p.retinex.highlig == other.retinex.highlig; retinex.baselog = retinex.baselog && p.retinex.baselog == other.retinex.baselog;
retinex.grbl = retinex.grbl && p.retinex.grbl == other.retinex.grbl; // retinex.grbl = retinex.grbl && p.retinex.grbl == other.retinex.grbl;
retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap; retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap;
retinex.enabled = retinex.enabled && p.retinex.enabled == other.retinex.enabled; retinex.enabled = retinex.enabled && p.retinex.enabled == other.retinex.enabled;
labCurve.lcurve = labCurve.lcurve && p.labCurve.lcurve == other.labCurve.lcurve; labCurve.lcurve = labCurve.lcurve && p.labCurve.lcurve == other.labCurve.lcurve;
@ -1102,13 +1102,13 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
toEdit.retinex.highl = mods.retinex.highl; toEdit.retinex.highl = mods.retinex.highl;
} }
if (retinex.highlig) { if (retinex.baselog) {
toEdit.retinex.highlig = mods.retinex.highlig; toEdit.retinex.baselog = mods.retinex.baselog;
} }
if (retinex.grbl) { // if (retinex.grbl) {
toEdit.retinex.grbl = mods.retinex.grbl; // toEdit.retinex.grbl = mods.retinex.grbl;
} // }
if (retinex.gain) { if (retinex.gain) {
toEdit.retinex.gain = dontforceSet && options.baBehav[ADDSET_RETI_GAIN] ? toEdit.retinex.gain + mods.retinex.gain : mods.retinex.gain; toEdit.retinex.gain = dontforceSet && options.baBehav[ADDSET_RETI_GAIN] ? toEdit.retinex.gain + mods.retinex.gain : mods.retinex.gain;

View File

@ -72,8 +72,8 @@ public:
bool vart; bool vart;
bool limd; bool limd;
bool highl; bool highl;
bool highlig; bool baselog;
bool grbl; // bool grbl;
bool method; bool method;
bool transmissionCurve; bool transmissionCurve;
bool cdcurve; bool cdcurve;

View File

@ -112,8 +112,8 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
gammaretinexConn = gammaretinex->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::gammaretinexChanged) ); gammaretinexConn = gammaretinex->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::gammaretinexChanged) );
gammaretinex->set_tooltip_markup (M("TP_RETINEX_GAMMA_TOOLTIP")); gammaretinex->set_tooltip_markup (M("TP_RETINEX_GAMMA_TOOLTIP"));
gam = Gtk::manage (new Adjuster (M("TP_RETINEX_GAMMA"), 0.6, 1.6, 0.01, 1.30)); gam = Gtk::manage (new Adjuster (M("TP_RETINEX_GAMMA"), 0.6, 3.0, 0.01, 1.30));
slope = Gtk::manage (new Adjuster (M("TP_RETINEX_SLOPE"), 2., 20., 0.1, 3.)); slope = Gtk::manage (new Adjuster (M("TP_RETINEX_SLOPE"), 1., 20., 0.1, 3.));
str = Gtk::manage (new Adjuster (M("TP_RETINEX_STRENGTH"), 0, 100., 1., 20.)); str = Gtk::manage (new Adjuster (M("TP_RETINEX_STRENGTH"), 0, 100., 1., 20.));
neigh = Gtk::manage (new Adjuster (M("TP_RETINEX_NEIGHBOR"), 6, 100., 1., 80.)); neigh = Gtk::manage (new Adjuster (M("TP_RETINEX_NEIGHBOR"), 6, 100., 1., 80.));
@ -143,13 +143,13 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -10000, 10000, 1, 0)); offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -10000, 10000, 1, 0));
vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125)); vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125));
limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8)); limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8));
highlig = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT2"), 1, 100, 1, 100)); baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1.1, 100., 0.001, 2.718));
grbl = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT3"), 1, 100, 1, 50)); // grbl = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT3"), 1, 100, 1, 50));
gain->set_tooltip_markup (M("TP_RETINEX_GAIN_TOOLTIP")); gain->set_tooltip_markup (M("TP_RETINEX_GAIN_TOOLTIP"));
scal->set_tooltip_markup (M("TP_RETINEX_SCALES_TOOLTIP")); scal->set_tooltip_markup (M("TP_RETINEX_SCALES_TOOLTIP"));
vart->set_tooltip_markup (M("TP_RETINEX_VARIANCE_TOOLTIP")); vart->set_tooltip_markup (M("TP_RETINEX_VARIANCE_TOOLTIP"));
limd->set_tooltip_markup (M("TP_RETINEX_THRESHOLD_TOOLTIP")); limd->set_tooltip_markup (M("TP_RETINEX_THRESHOLD_TOOLTIP"));
highlig->set_tooltip_markup (M("TP_RETINEX_HIGHLIGHT2_TOOLTIP")); baselog->set_tooltip_markup (M("TP_RETINEX_BASELOG_TOOLTIP"));
curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH")); curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH"));
curveEditorGH->setCurveListener (this); curveEditorGH->setCurveListener (this);
@ -221,11 +221,11 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
// settingsVBox->pack_start (*highl); // settingsVBox->pack_start (*highl);
// highl->show (); // highl->show ();
settingsVBox->pack_start (*highlig); settingsVBox->pack_start (*baselog);
highlig->show (); baselog->show ();
settingsVBox->pack_start (*grbl); // settingsVBox->pack_start (*grbl);
grbl->show (); // grbl->show ();
settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2);
transmissionCurveEditorG->show(); transmissionCurveEditorG->show();
@ -295,18 +295,18 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
highl->delay = 200; highl->delay = 200;
} }
highlig->setAdjusterListener (this); baselog->setAdjusterListener (this);
if (highlig->delay < 200) { if (baselog->delay < 200) {
highlig->delay = 200; baselog->delay = 200;
} }
grbl->setAdjusterListener (this); /* grbl->setAdjusterListener (this);
if (grbl->delay < 200) { if (grbl->delay < 200) {
grbl->delay = 200; grbl->delay = 200;
} }
*/
pack_start (*retinexVBox); pack_start (*retinexVBox);
pack_start (*expsettings); pack_start (*expsettings);
@ -441,8 +441,8 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
vart->setEditedState (pedited->retinex.vart ? Edited : UnEdited); vart->setEditedState (pedited->retinex.vart ? Edited : UnEdited);
limd->setEditedState (pedited->retinex.limd ? Edited : UnEdited); limd->setEditedState (pedited->retinex.limd ? Edited : UnEdited);
highl->setEditedState (pedited->retinex.highl ? Edited : UnEdited); highl->setEditedState (pedited->retinex.highl ? Edited : UnEdited);
highlig->setEditedState (pedited->retinex.highlig ? Edited : UnEdited); baselog->setEditedState (pedited->retinex.baselog ? Edited : UnEdited);
grbl->setEditedState (pedited->retinex.grbl ? Edited : UnEdited); // grbl->setEditedState (pedited->retinex.grbl ? Edited : UnEdited);
set_inconsistent (multiImage && !pedited->retinex.enabled); set_inconsistent (multiImage && !pedited->retinex.enabled);
medianmap->set_inconsistent (!pedited->retinex.medianmap); medianmap->set_inconsistent (!pedited->retinex.medianmap);
@ -476,8 +476,8 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
gam->setValue (pp->retinex.gam); gam->setValue (pp->retinex.gam);
slope->setValue (pp->retinex.slope); slope->setValue (pp->retinex.slope);
highl->setValue (pp->retinex.highl); highl->setValue (pp->retinex.highl);
highlig->setValue (pp->retinex.highlig); baselog->setValue (pp->retinex.baselog);
grbl->setValue (pp->retinex.grbl); // grbl->setValue (pp->retinex.grbl);
setEnabled (pp->retinex.enabled); setEnabled (pp->retinex.enabled);
@ -554,8 +554,8 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
pp->retinex.vart = (int)vart->getValue (); pp->retinex.vart = (int)vart->getValue ();
pp->retinex.limd = (int)limd->getValue (); pp->retinex.limd = (int)limd->getValue ();
pp->retinex.highl = (int)highl->getValue (); pp->retinex.highl = (int)highl->getValue ();
pp->retinex.highlig = (int)highlig->getValue (); pp->retinex.baselog = baselog->getValue ();
pp->retinex.grbl = (int)grbl->getValue (); // pp->retinex.grbl = (int)grbl->getValue ();
pp->retinex.cdcurve = cdshape->getCurve (); pp->retinex.cdcurve = cdshape->getCurve ();
pp->retinex.lhcurve = lhshape->getCurve (); pp->retinex.lhcurve = lhshape->getCurve ();
pp->retinex.cdHcurve = cdshapeH->getCurve (); pp->retinex.cdHcurve = cdshapeH->getCurve ();
@ -579,8 +579,8 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
pedited->retinex.vart = vart->getEditedState (); pedited->retinex.vart = vart->getEditedState ();
pedited->retinex.limd = limd->getEditedState (); pedited->retinex.limd = limd->getEditedState ();
pedited->retinex.highl = highl->getEditedState (); pedited->retinex.highl = highl->getEditedState ();
pedited->retinex.highlig = highlig->getEditedState (); pedited->retinex.baselog = baselog->getEditedState ();
pedited->retinex.grbl = grbl->getEditedState (); // pedited->retinex.grbl = grbl->getEditedState ();
pedited->retinex.cdcurve = !cdshape->isUnChanged (); pedited->retinex.cdcurve = !cdshape->isUnChanged ();
pedited->retinex.cdHcurve = !cdshapeH->isUnChanged (); pedited->retinex.cdHcurve = !cdshapeH->isUnChanged ();
pedited->retinex.transmissionCurve = !transmissionShape->isUnChanged (); pedited->retinex.transmissionCurve = !transmissionShape->isUnChanged ();
@ -626,9 +626,10 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
void Retinex::retinexMethodChanged() void Retinex::retinexMethodChanged()
{ {
// if (retinexMethod->get_active_row_number() == 4) {highl->show();highlig->show();grbl->show();}
if(retinexMethod->get_active_row_number() == 3) {highl->show();highlig->hide();grbl->hide();} if(retinexMethod->get_active_row_number() == 3) highl->show();
else {highl->hide();highlig->hide();grbl->hide();} else highl->hide();
if (listener) { if (listener) {
listener->panelChanged (EvretinexMethod, retinexMethod->get_active_text ()); listener->panelChanged (EvretinexMethod, retinexMethod->get_active_text ());
} }
@ -642,12 +643,15 @@ void Retinex::ColorSpaceUpdateUI ()
if(retinexcolorspace->get_active_row_number() == 0) { if(retinexcolorspace->get_active_row_number() == 0) {
curveEditorGD->show(); curveEditorGD->show();
curveEditorGDH->hide(); curveEditorGDH->hide();
baselog->show();
} else if(retinexcolorspace->get_active_row_number() == 1) { } else if(retinexcolorspace->get_active_row_number() == 1) {
curveEditorGD->hide(); curveEditorGD->hide();
curveEditorGDH->show(); curveEditorGDH->show();
baselog->show();
} else if(retinexcolorspace->get_active_row_number() == 2) { } else if(retinexcolorspace->get_active_row_number() == 2) {
curveEditorGD->hide(); curveEditorGD->hide();
curveEditorGDH->show(); curveEditorGDH->show();
baselog->hide();
} }
} }
} }
@ -722,8 +726,8 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
vart->setDefault (defParams->retinex.vart); vart->setDefault (defParams->retinex.vart);
limd->setDefault (defParams->retinex.limd); limd->setDefault (defParams->retinex.limd);
highl->setDefault (defParams->retinex.highl); highl->setDefault (defParams->retinex.highl);
highlig->setDefault (defParams->retinex.highlig); baselog->setDefault (defParams->retinex.baselog);
grbl->setDefault (defParams->retinex.grbl); // grbl->setDefault (defParams->retinex.grbl);
gam->setDefault (defParams->retinex.gam); gam->setDefault (defParams->retinex.gam);
slope->setDefault (defParams->retinex.slope); slope->setDefault (defParams->retinex.slope);
@ -736,8 +740,8 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
vart->setDefaultEditedState (pedited->retinex.vart ? Edited : UnEdited); vart->setDefaultEditedState (pedited->retinex.vart ? Edited : UnEdited);
limd->setDefaultEditedState (pedited->retinex.limd ? Edited : UnEdited); limd->setDefaultEditedState (pedited->retinex.limd ? Edited : UnEdited);
highl->setDefaultEditedState (pedited->retinex.highl ? Edited : UnEdited); highl->setDefaultEditedState (pedited->retinex.highl ? Edited : UnEdited);
highlig->setDefaultEditedState (pedited->retinex.highlig ? Edited : UnEdited); baselog->setDefaultEditedState (pedited->retinex.baselog ? Edited : UnEdited);
grbl->setDefaultEditedState (pedited->retinex.grbl ? Edited : UnEdited); // grbl->setDefaultEditedState (pedited->retinex.grbl ? Edited : UnEdited);
gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited); gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited);
slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited); slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited);
@ -748,8 +752,8 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
vart->setDefaultEditedState (Irrelevant); vart->setDefaultEditedState (Irrelevant);
limd->setDefaultEditedState (Irrelevant); limd->setDefaultEditedState (Irrelevant);
highl->setDefaultEditedState (Irrelevant); highl->setDefaultEditedState (Irrelevant);
highlig->setDefaultEditedState (Irrelevant); baselog->setDefaultEditedState (Irrelevant);
grbl->setDefaultEditedState (Irrelevant); // grbl->setDefaultEditedState (Irrelevant);
str->setDefaultEditedState (Irrelevant); str->setDefaultEditedState (Irrelevant);
scal->setDefaultEditedState (Irrelevant); scal->setDefaultEditedState (Irrelevant);
gam->setDefaultEditedState (Irrelevant); gam->setDefaultEditedState (Irrelevant);
@ -794,10 +798,10 @@ void Retinex::adjusterChanged (Adjuster* a, double newval)
listener->panelChanged (EvLlimd, limd->getTextValue()); listener->panelChanged (EvLlimd, limd->getTextValue());
} else if (a == highl) { } else if (a == highl) {
listener->panelChanged (EvLhighl, highl->getTextValue()); listener->panelChanged (EvLhighl, highl->getTextValue());
} else if (a == highlig) { } else if (a == baselog) {
listener->panelChanged (EvLhighlig, highlig->getTextValue()); listener->panelChanged (EvLbaselog, baselog->getTextValue());
} else if (a == grbl) { // } else if (a == grbl) {
listener->panelChanged (EvLgrbl, grbl->getTextValue()); // listener->panelChanged (EvLgrbl, grbl->getTextValue());
} else if (a == gam) { } else if (a == gam) {
listener->panelChanged (EvLgam, gam->getTextValue()); listener->panelChanged (EvLgam, gam->getTextValue());
} else if (a == slope) { } else if (a == slope) {
@ -858,8 +862,8 @@ void Retinex::trimValues (rtengine::procparams::ProcParams* pp)
vart->trimValue(pp->retinex.vart); vart->trimValue(pp->retinex.vart);
limd->trimValue(pp->retinex.limd); limd->trimValue(pp->retinex.limd);
highl->trimValue(pp->retinex.highl); highl->trimValue(pp->retinex.highl);
highlig->trimValue(pp->retinex.highlig); baselog->trimValue(pp->retinex.baselog);
grbl->trimValue(pp->retinex.grbl); // grbl->trimValue(pp->retinex.grbl);
gam->trimValue(pp->retinex.gam); gam->trimValue(pp->retinex.gam);
slope->trimValue(pp->retinex.slope); slope->trimValue(pp->retinex.slope);
@ -930,8 +934,8 @@ void Retinex::setBatchMode (bool batchMode)
vart->showEditedCB (); vart->showEditedCB ();
limd->showEditedCB (); limd->showEditedCB ();
highl->showEditedCB (); highl->showEditedCB ();
highlig->showEditedCB (); baselog->showEditedCB ();
grbl->showEditedCB (); // grbl->showEditedCB ();
curveEditorGD->setBatchMode (batchMode); curveEditorGD->setBatchMode (batchMode);
curveEditorGDH->setBatchMode (batchMode); curveEditorGDH->setBatchMode (batchMode);
transmissionCurveEditorG->setBatchMode (batchMode); transmissionCurveEditorG->setBatchMode (batchMode);

View File

@ -30,7 +30,7 @@ protected:
Adjuster* vart; Adjuster* vart;
Adjuster* limd; Adjuster* limd;
Adjuster* highl; Adjuster* highl;
Adjuster* highlig; Adjuster* baselog;
Adjuster* grbl; Adjuster* grbl;
Adjuster* gam; Adjuster* gam;
Adjuster* slope; Adjuster* slope;