diff --git a/rtdata/languages/default b/rtdata/languages/default index f307b1412..aafc33bd5 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2762,7 +2762,7 @@ TP_LOCALLAB_MASKCOM_TOOLNAME;Common Color Mask - 13 TP_LOCALLAB_MASKCOM_TOOLTIP;A tool in its own right.\nCan be used to adjust the image appearance (chrominance, luminance, contrast) and texture as a function of Scope. TP_LOCALLAB_MASKCURVE_TOOLTIP;The 3 curves are set to 1 (maximum) by default:\nC=f(C) the chroma varies according to the chrominance. You can decrease the chroma to improve the selection. By setting this curve close to zero (with a low value of C to activate the curve) you can desaturate the background in Inverse mode.\nL=f(L) the luminance varies according to the luminance, so you can decrease the brightness to improve the selection.\nL and C = f(H) luminance and chroma vary with hue, so you can decrease luminance and chroma to improve selection TP_LOCALLAB_MASKH;Hue curve -TP_LOCALLAB_MASKLC_TOOLTIP;This allows you to target the denoise based on the image luminance information contained in the L(L) or LC(H) mask (Mask and Modifications). The L(L) mask or the LC(H) mask must be enabled to use this function. \n if the mask is very dark - below the threshold 'dark' - denoise will be increased.\n if the mask is clear - above the threshold 'light' - denoise will be progressively cancelled.\n between the two, denoise will be maintained at the settings without mask. +TP_LOCALLAB_MASKLC_TOOLTIP;This allows you to target the denoise based on the image luminance information contained in the L(L) or LC(H) mask (Mask and Modifications). The L(L) mask or the LC(H) mask must be enabled to use this function. \n if the mask is very dark - below the threshold 'dark' - denoise will be increased if reinforce > 1.\n if the mask is clear - above the threshold 'light' - denoise will be progressively cancelled.\n between the two, denoise will be maintained at the settings without mask. TP_LOCALLAB_MASKLCTHR;Light area luminance % threshold TP_LOCALLAB_MASKLCTHRLOW; Dark area luminance % threshold TP_LOCALLAB_MASKLNOISELOW;Reinforce denoise in dark areas diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 38e068a07..2fde19c61 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -8865,12 +8865,13 @@ void ImProcFunctions::DeNoise(int call, float * slidL, float * slida, float * sl } } - if(lp.enablMask && lp.usemask) { + if(lp.enablMask && lp.lnoiselow !=1.f) { + //this code has been reviewed by Ingo in september 2020 PR5903 float hig = lp.thrhigh; if(lp.thrhigh < lp.thrlow) { hig = lp.thrlow + 0.01f; } - float alow = -lp.lnoiselow / lp.thrlow; + float alow = -(lp.lnoiselow - 1.f) / lp.thrlow; float blow = lp.lnoiselow; float ahigh = 0.9999f / (hig - 100.f); float bhigh = 1.f - hig * ahigh; @@ -8894,6 +8895,8 @@ void ImProcFunctions::DeNoise(int call, float * slidL, float * slida, float * sl if(HHhuecurve) { + //same code as in wavelet levels + #ifdef _OPENMP #pragma omp parallel for #endif @@ -9463,13 +9466,15 @@ void ImProcFunctions::DeNoise(int call, float * slidL, float * slida, float * sl } } - if(lp.enablMask && lp.usemask) { + if(lp.enablMask && lp.lnoiselow != 1.f) { + //this code has been reviewed by Ingo in september 2020 PR5903 + //i just change parameters to better progressivity float hig = lp.thrhigh; if(lp.thrhigh < lp.thrlow) { hig = lp.thrlow + 0.01f; } - float alow = -lp.lnoiselow / lp.thrlow; + float alow = -(lp.lnoiselow - 1.f) / lp.thrlow; float blow = lp.lnoiselow; float ahigh = 0.9999f / (hig - 100.f); float bhigh = 1.f - hig * ahigh; @@ -9494,6 +9499,7 @@ void ImProcFunctions::DeNoise(int call, float * slidL, float * slida, float * sl if(HHhuecurve) { + //same code as in wavelet levels #ifdef _OPENMP #pragma omp parallel for #endif diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 604589e92..8f08c74bb 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -3309,7 +3309,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : medMethod("33"), usemask(false), levelthr(40.), - lnoiselow(1.5), + lnoiselow(1.), levelthrlow(12.), activlum(true), noiselumf(0.), diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 027cb335c..bc5bc0323 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -5762,9 +5762,9 @@ LocallabBlur::LocallabBlur(): wavshapeden(static_cast(LocalcurveEditorwavden->addCurve(CT_Flat, "", nullptr, false, false))), expdenoise1(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_DENOI1_EXP")))), usemask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_USEMASK")))), - lnoiselow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLNOISELOW"), 0.5, 4., 0.1, 1.5))), - levelthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 1., 100., 1., 40.))), - levelthrlow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 0., 100., 1., 12.))), + lnoiselow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLNOISELOW"), 0.7, 2., 0.01, 1.))), + levelthr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHR"), 10., 100., 1., 40.))), + levelthrlow(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MASKLCTHRLOW"), 1., 100., 1., 12.))), noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 0.01, 0.))), noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), noiselumf2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINETWO"), MINCHRO, MAXCHRO, 0.01, 0.))), @@ -6045,7 +6045,7 @@ LocallabBlur::LocallabBlur(): wavBox->pack_start(*noiselequal); wavBox->pack_start(*LocalcurveEditorwavhue, Gtk::PACK_SHRINK, 4); ToolParamBlock* const wavBox1 = Gtk::manage(new ToolParamBlock()); - wavBox1->pack_start(*usemask, Gtk::PACK_SHRINK, 0); + // wavBox1->pack_start(*usemask, Gtk::PACK_SHRINK, 0); wavBox1->pack_start(*lnoiselow, Gtk::PACK_SHRINK, 0); wavBox1->pack_start(*levelthrlow, Gtk::PACK_SHRINK, 0); wavBox1->pack_start(*levelthr, Gtk::PACK_SHRINK, 0);