diff --git a/rtdata/languages/default b/rtdata/languages/default index 3666e9cb9..ddf218625 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -650,9 +650,9 @@ HISTORY_MSG_417;Retinex - Transmission median HISTORY_MSG_418;Retinex - Threshold HISTORY_MSG_419;Retinex - Color space HISTORY_MSG_420;Retinex - Histogram - HSL -HISTORY_MSG_421;Retinex - Gamma retinex -HISTORY_MSG_422;Retinex - gamma -HISTORY_MSG_423;Retinex - slope +HISTORY_MSG_421;Retinex - Gamma +HISTORY_MSG_422;Retinex - Gamma +HISTORY_MSG_423;Retinex - Gamma slope HISTORY_MSG_424;Retinex - HL threshold HISTORY_MSG_425;Retinex - Log base HISTORY_MSG_426;Retinex - Hue equalizer @@ -1560,31 +1560,28 @@ 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_RSTPROTECTION;Red and skin-tones protection 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_LAB;Histogram equalizer L*a*b* 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;Luminance according to luminance L=f(L)\nCorrect raw data to reduce halos and artifacts. TP_RETINEX_CONTEDIT_LH;Hue equalizer TP_RETINEX_CURVEEDITOR_LH;Strength=f(H) -TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Equalize strength in function of hue\nIf Retinex method='highlight' also acts on the chroma +TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. 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_GAM;Gamma retinex +TP_RETINEX_GAIN_TOOLTIP;Acts on the transmission in combination with the offset. This is very different from the others settings. Used for black or white pixels, and to help balance the histogram. +TP_RETINEX_GAMMA;Gamma TP_RETINEX_GAMMA_NONE;None TP_RETINEX_GAMMA_LOW;Low TP_RETINEX_GAMMA_MID;Middle TP_RETINEX_GAMMA_HIGH;High TP_RETINEX_GAMMA_FREE;Free -TP_RETINEX_GAMMA;Gamma -TP_RETINEX_SLOPE;Slope -TP_RETINEX_GAMMA_TOOLTIP;Restore tones by applying gamma before and after Retinex\nDifferent from Retinex curves or others curves (Lab, Exposure,..) +TP_RETINEX_GAMMA;Free gamma +TP_RETINEX_SLOPE;Free gamma slope +TP_RETINEX_GAMMA_TOOLTIP;Restore tones by applying gamma before and after Retinex. Different from Retinex curves or others curves (Lab, Exposure, etc.). TP_RETINEX_HIGH;High TP_RETINEX_HIGHLIG;Highlight -TP_RETINEX_HIGHLIGPLUS;Highlight More 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.\nMay require you to re-adjust "Neighboring pixels" and to increase the "White-point correction" in the Raw tab -> Raw White Points tool. TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic TP_RETINEX_LABEL;Retinex @@ -1592,25 +1589,23 @@ TP_RETINEX_LABSPACE;L*a*b* TP_RETINEX_LOW;Low TP_RETINEX_MEDIAN;Transmission median filter TP_RETINEX_METHOD;Method -TP_RETINEX_METHOD_TOOLTIP;Low: Reinforce low light,\nUniform: Equalize action,\nHigh: Reinforce high light\nHighLight: Try to remove magenta +TP_RETINEX_METHOD_TOOLTIP;Low = Reinforce low light,\nUniform = Equalize action,\nHigh = Reinforce high light,\nHighlight = Remove magenta in highlights. TP_RETINEX_MLABEL;Restored haze-free Min=%1 Max=%2 TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no mixture. TP_RETINEX_NEIGHBOR;Neighboring pixels TP_RETINEX_NEUTRAL;Reset -TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to default +TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. TP_RETINEX_NONE;None TP_RETINEX_OFFSET;Offset -TP_RETINEX_SCALES;Scales -TP_RETINEX_SCALES_TOOLTIP;Low scales increase contrast but give relief effect.\nHigh scales can increase noise, but give more natural images. TP_RETINEX_SETTINGS;Settings TP_RETINEX_STRENGTH;Strength TP_RETINEX_THRESHOLD;Threshold -TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out - in = image source - out = image Gauss +TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out.\nIn = image source,\nOut = image gauss. TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 -TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max used by Variance.\nMean and Sigma\nTm=Min TM=Max of transmission map. +TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma\nTm=Min TM=Max of transmission map. TP_RETINEX_TRANSMISSION;Transmission map -TP_RETINEX_TRANSMISSION_TOOLTIP;Modify transmission in function of transmission\nAbscissa : transmission from negatives values (min), mean, and positives values (max)\nOrdonate : amplification - reduction +TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. TP_RETINEX_UNIFORM;Uniform TP_RETINEX_VARIANCE;Variance TP_RETINEX_VARIANCE_TOOLTIP;Low variance increase local contrast and saturation, but can lead to artifacts. @@ -1806,9 +1801,9 @@ TP_WAVELET_CONTRA;Contrast TP_WAVELET_CONTRA_TOOLTIP;Changes contrast of the residual image. TP_WAVELET_CONTR;Gamut TP_WAVELET_CTYPE;Chrominance control -TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Modifies local contrast as a function of the original local contrast (absciss)\nLow absciss represents small local contrast (real values about 10..20)\n50% absciss represents average of local contrast (real value about 100..300)\n66% absciss represents standard deviation of local contrast (real value about 300..800)\n100% represents maximum (real value about 3000..8000) +TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Modifies local contrast as a function of the original local contrast (abscissa).\nLow abscissa values represent small local contrast (real values about 10..20).\n50% abscissa represents average local contrast (real value about 100..300).\n66% abscissa represents standard deviation of local contrast (real value about 300..800).\n100% abscissa represents maximum local contrast (real value about 3000..8000). TP_WAVELET_CURVEEDITOR_CH;Contrast levels=f(Hue) -TP_WAVELET_CURVEEDITOR_CH_TOOLTIP;Modifies each level's contrast as a function oh hue.\nTake care not to overwrite changes made with the Gamut Hue controls.\nThe curve will only have an effect when wavelet contrast level sliders are non-zero. +TP_WAVELET_CURVEEDITOR_CH_TOOLTIP;Modifies each level's contrast as a function of hue.\nTake care not to overwrite changes made with the Gamut sub-tool's hue controls.\nThe curve will only have an effect when wavelet contrast level sliders are non-zero. TP_WAVELET_CURVEEDITOR_CL;L TP_WAVELET_CURVEEDITOR_CL_TOOLTIP;Applies a final contrast luminance curve at the end of the wavelet treatment. TP_WAVELET_CURVEEDITOR_HH;HH diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index bfaf7fdb4..8a283ac56 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -44,7 +44,6 @@ #include "rawimagesource.h" #include "improcfun.h" #include "opthelper.h" -#include "StopWatch.h" #define MAX_RETINEX_SCALES 8 #define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val ) @@ -207,7 +206,6 @@ void mean_stddv( float **dst, float &mean, float &stddv, int W_L, int H_L, const void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) { if (deh.enabled) {//enabled - StopWatch Stop1("MSR"); float mean, stddv, maxtr, mintr; // float mini, delta, maxi; float delta; @@ -250,10 +248,10 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e lhutili = true; } } - - + + if(deh.retinexMethod == "highliplus") higplus = true; - + if (deh.retinexMethod == "uni") { moderetinex = 0; } @@ -324,7 +322,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e for (int i = 0; i < H_L; i++) { int j = 0; - + #ifdef __SSE2__ if(useHslLin) { @@ -469,9 +467,9 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e maxCD = -9999999.f; minCD = 9999999.f; - - - + + + #ifdef _OPENMP #pragma omp parallel #endif @@ -504,7 +502,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e str *= (1.f + 2.f*valparam); } } - + // if(exLuminance[i][j] > 65535.f*hig && higplus) str *= hig; luminance[i][j] = clipretinex( cd, 0.f, 32768.f ) * str + (1.f - str) * originalLuminance[i][j]; } @@ -523,11 +521,11 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e Tsigma = stddv; Tmin = mintr; Tmax = maxtr; - + if (shcurve) { delete shcurve; } - + } } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 987891195..501d0a030 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -155,14 +155,14 @@ void RetinexParams::setDefaults() retinexMethod = "high"; retinexcolorspace = "Lab"; gammaretinex = "none"; - medianmap = true; + medianmap = false; cdcurve.clear(); cdcurve.push_back(DCT_Linear); cdHcurve.clear(); cdHcurve.push_back(DCT_Linear); lhcurve.clear(); lhcurve.push_back(DCT_Linear); - + getDefaulttransmissionCurve(transmissionCurve); } @@ -1451,7 +1451,7 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol if (!pedited || pedited->retinex.slope) { keyFile.set_double ("Retinex", "Slope", retinex.slope); } - + if (!pedited || pedited->retinex.enabled) { keyFile.set_boolean ("Retinex", "Enabled", retinex.enabled); } @@ -1493,7 +1493,7 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol // if (!pedited || pedited->retinex.grbl) { // keyFile.set_integer ("Retinex", "grbl", retinex.grbl); // } - + if (!pedited || pedited->retinex.retinexMethod) { keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod); } @@ -1520,7 +1520,7 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol Glib::ArrayHandle lhcurve = retinex.lhcurve; keyFile.set_double_list("Retinex", "LHCurve", lhcurve); } - + if (!pedited || pedited->retinex.transmissionCurve) { Glib::ArrayHandle transmissionCurve = retinex.transmissionCurve; keyFile.set_double_list("Retinex", "TransmissionCurve", transmissionCurve); @@ -3818,7 +3818,7 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited) pedited->retinex.gammaretinex = true; } } - + if (keyFile.has_key ("Retinex", "Enabled")) { retinex.enabled = keyFile.get_boolean ("Retinex", "Enabled"); @@ -3866,7 +3866,7 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited) pedited->retinex.slope = true; } } - + if (keyFile.has_key ("Retinex", "Gain")) { retinex.gain = keyFile.get_integer ("Retinex", "Gain"); @@ -3922,7 +3922,7 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited) pedited->retinex.grbl = true; } } -*/ +*/ if (keyFile.has_key ("Retinex", "CDCurve")) { retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve"); @@ -3946,7 +3946,7 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited) pedited->retinex.lhcurve = true; } } - + if (keyFile.has_key ("Retinex", "TransmissionCurve")) { retinex.transmissionCurve = keyFile.get_double_list ("Retinex", "TransmissionCurve"); diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 6a3d6a9d7..73e604e2e 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -48,7 +48,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), retinexcolorspace->append_text (M("TP_RETINEX_HSLSPACE_LIN")); retinexcolorspace->set_active(0); retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexColorSpaceChanged) ); - + dhbox->pack_start(*retinexMethod); dhbox->pack_start(*retinexcolorspace); retinexVBox->pack_start(*dhbox); @@ -99,9 +99,9 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), transmissionCurveEditorG->curveListComplete(); gambox = Gtk::manage (new Gtk::HBox ()); - labgam = Gtk::manage (new Gtk::Label (M("TP_RETINEX_GAM") + ":")); + labgam = Gtk::manage (new Gtk::Label (M("TP_RETINEX_GAMMA") + ":")); gambox->pack_start (*labgam, Gtk::PACK_SHRINK, 1); - + gammaretinex = Gtk::manage (new MyComboBoxText ()); gammaretinex->append_text (M("TP_RETINEX_GAMMA_NONE")); gammaretinex->append_text (M("TP_RETINEX_GAMMA_LOW")); @@ -124,7 +124,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), expsettings = new MyExpander (false, M("TP_RETINEX_SETTINGS")); expsettings->signal_button_release_event().connect_notify( sigc::bind( sigc::mem_fun(this, &Retinex::foldAllButMe), expsettings) ); - + retinexVBox->pack_start (*str); str->show (); @@ -133,10 +133,10 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), retinexVBox->pack_start (*vart); vart->show (); - + retinexVBox->pack_start (*highl); highl->show (); - + mMLabels = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER)); mMLabels->set_tooltip_markup (M("TP_RETINEX_MLABEL_TOOLTIP")); @@ -159,11 +159,11 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH")); curveEditorGH->setCurveListener (this); - + lhshape = static_cast(curveEditorGH->addCurve(CT_Flat, M("TP_RETINEX_CURVEEDITOR_LH"))); lhshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_LH_TOOLTIP")); lhshape->setCurveColorProvider(this, 4); - + milestones.clear(); for (int i = 0; i < 7; i++) { @@ -174,9 +174,9 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), } lhshape->setBottomBarBgGradient(milestones); - + curveEditorGH->curveListComplete(); - + medianmap = Gtk::manage (new Gtk::CheckButton (M("TP_RETINEX_MEDIAN"))); medianmap->set_active (true); medianmapConn = medianmap->signal_toggled().connect( sigc::mem_fun(*this, &Retinex::medianmapChanged) ); @@ -189,7 +189,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), settingsVBox->pack_start (*transLabels2); transLabels2->show (); - + settingsVBox->pack_start (*curveEditorGD, Gtk::PACK_SHRINK, 4); curveEditorGD->show(); @@ -198,9 +198,9 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), settingsVBox->pack_start (*curveEditorGH, Gtk::PACK_SHRINK, 4); curveEditorGH->show(); - + gambox->pack_start(*gammaretinex); - + settingsVBox->pack_start(*gambox); gammaretinex->show(); @@ -209,8 +209,8 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), settingsVBox->pack_start (*slope); slope->show (); - - + + // settingsVBox->pack_start (*scal); // scal->show (); @@ -234,7 +234,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // settingsVBox->pack_start (*grbl); // grbl->show (); - + settingsVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); transmissionCurveEditorG->show(); @@ -244,7 +244,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), neutrHBox = Gtk::manage (new Gtk::HBox ()); neutrHBox->set_border_width (2); - + neutral = Gtk::manage (new Gtk::Button (M("TP_RETINEX_NEUTRAL"))); RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); neutral->set_image(*resetImg); @@ -253,8 +253,8 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), neutral->show(); neutrHBox->pack_start (*neutral); - - + + str->setAdjusterListener (this); if (str->delay < 200) { @@ -266,13 +266,13 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), if (scal->delay < 200) { scal->delay = 200; } - + gam->setAdjusterListener (this); if (gam->delay < 500) { gam->delay = 500; } - + slope->setAdjusterListener (this); if (slope->delay < 500) { @@ -314,7 +314,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), if (highl->delay < 200) { highl->delay = 200; } - + baselog->setAdjusterListener (this); if (baselog->delay < 200) { @@ -326,7 +326,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), if (grbl->delay < 200) { grbl->delay = 200; } -*/ +*/ pack_start (*retinexVBox); pack_start (*expsettings); pack_start (*neutrHBox); @@ -364,7 +364,7 @@ void Retinex::neutral_pressed () cdshape->reset(); cdshapeH->reset(); lhshape->reset(); -} +} void Retinex::foldAllButMe (GdkEventButton* event, MyExpander *expander) { @@ -459,8 +459,8 @@ void Retinex::updateTrans () Glib::ustring::format(std::fixed, std::setprecision(1), nA), Glib::ustring::format(std::fixed, std::setprecision(1), nB)) ); - - + + } } } @@ -502,7 +502,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) if (!pedited->retinex.gammaretinex) { gammaretinex->set_active_text(M("GENERAL_UNCHANGED")); } - + cdshape->setUnChanged (!pedited->retinex.cdcurve); cdshapeH->setUnChanged (!pedited->retinex.cdHcurve); transmissionShape->setUnChanged (!pedited->retinex.transmissionCurve); @@ -561,7 +561,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) } else if (pp->retinex.gammaretinex == "fre") { gammaretinex->set_active (4); } - + retinexMethodChanged (); retinexColorSpaceChanged(); gammaretinexChanged(); @@ -653,7 +653,7 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) } else if (retinexcolorspace->get_active_row_number() == 2) { pp->retinex.retinexcolorspace = "HSLLIN"; } - + if (gammaretinex->get_active_row_number() == 0) { pp->retinex.gammaretinex = "none"; } else if (gammaretinex->get_active_row_number() == 1) { @@ -665,12 +665,12 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) } else if (gammaretinex->get_active_row_number() == 4) { pp->retinex.gammaretinex = "fre"; } - + } void Retinex::retinexMethodChanged() { - + if(retinexMethod->get_active_row_number() == 3) highl->show(); else highl->hide(); @@ -683,19 +683,19 @@ void Retinex::ColorSpaceUpdateUI () { if (!batchMode) { curveEditorGH->show(); - + if(retinexcolorspace->get_active_row_number() == 0) { curveEditorGD->show(); curveEditorGDH->hide(); - baselog->show(); + baselog->show(); } else if(retinexcolorspace->get_active_row_number() == 1) { curveEditorGD->hide(); curveEditorGDH->show(); - baselog->show(); + baselog->show(); } else if(retinexcolorspace->get_active_row_number() == 2) { curveEditorGD->hide(); curveEditorGDH->show(); - baselog->hide(); + baselog->hide(); } } } @@ -718,7 +718,7 @@ void Retinex::gammaretinexChanged() slope->show(); } else if(gammaretinex->get_active_row_number() != 4) { gam->hide(); - slope->hide(); + slope->hide(); } }