From 376103e463db5bba8eb3f769b3faa057863e2ef4 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 25 May 2019 07:27:32 +0200 Subject: [PATCH] Fixed bug in exposure - change some settings and labels --- rtdata/languages/default | 4 ++-- rtengine/iplocallab.cc | 13 +++++++------ rtengine/ipretinex.cc | 4 ++-- rtengine/procparams.cc | 2 +- rtgui/locallab.cc | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index afdaefef1..656507500 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -901,7 +901,7 @@ HISTORY_MSG_653;Local - SH mask chroma HISTORY_MSG_654;Local - SH mask gamma HISTORY_MSG_655;Local - SH mask slope HISTORY_MSG_656;Local - Color soft radius -HISTORY_MSG_657;Local - Retinex Guide Filter radius +HISTORY_MSG_657;Local - Retinex Guided Filter radius HISTORY_MSG_658;Local - CBDL soft radius HISTORY_MSG_659;Local Spot transition-weakening HISTORY_MSG_660;Local - cbdl clarity @@ -2050,7 +2050,7 @@ TP_LOCALLAB_EXECLU;Excluding spot TP_LOCALLAB_EXPOSE;Exposure TP_LOCALLAB_EXPOSURE_TOOLTIP;In some cases (strong shadows ..) you can use the module "Shadows Highlights" TP_LOCALLAB_EXPCHROMA;Chroma compensation -TP_LOCALLAB_GUIDFILTER;Guide filter radius +TP_LOCALLAB_GUIDFILTER;Guided filter radius TP_LOCALLAB_GUIDFILTER_TOOLTIP;Adapt this values according to images - reduce if non misty images TP_LOCALLAB_LOC_CONTRAST;Local contrast TP_LOCALLAB_REFLABEL;Ref. (0..1) Chroma=%1 Luma=%2 Hue=%3 diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index f9db9cce0..a72a59976 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2426,9 +2426,9 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex const float chra = bufexporig->a[loy - begy][lox - begx]; const float chrb = bufexporig->b[loy - begy][lox - begx]; - // if (senstype == 4) { + if (senstype == 5) { fliab = 1.f + clc; - // } + } const float difa = (chra * fliab - original->a[y][x]) * localFactor; const float difb = (chrb * fliab - original->b[y][x]) * localFactor; @@ -6314,7 +6314,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } - if (lp.expchroma != 0.f) { constexpr float ampli = 70.f; const float ch = (1.f + 0.02f * lp.expchroma); const float chprosl = ch <= 1.f ? 99.f * ch - 99.f : CLIPCHRO(ampli * ch - ampli); @@ -6327,11 +6326,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o for (int jr = 0; jr < bfw; jr++) { const float epsi = bufexporig->L[ir][jr] == 0.f ? 0.001f : 0.f; const float rapexp = bufexpfin->L[ir][jr] / (bufexporig->L[ir][jr] + epsi); - - bufl_ab[ir][jr] = chprosl * rapexp; + if(rapexp >= 1.f) { + bufl_ab[ir][jr] = chprosl * rapexp; + } else { + bufl_ab[ir][jr] = chprosl * rapexp; + } } } - } if (lp.softradiusexp > 0.f) { softproc(bufexporig.get(), bufexpfin.get(), lp.softradiusexp, bfh, bfw, 0.0001, 0.00001, 0.0001f, sk, multiThread); diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index 1e283eed4..c3f6459ad 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -873,7 +873,7 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b float threslum = loc.spots.at(sp).limd; const float elogt = 2.71828f; - if (scal <= 3) { + if (scal < 3) { useHslLin = true; } @@ -1386,7 +1386,7 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b delete [] outBuffer; outBuffer = nullptr; // delete [] srcBuffer; - float str = strength * (chrome == 0 ? 1.f : chrT); + float str = strength * (chrome == 0 ? 1.f : 0.8f * chrT); if (scal != 1) { mean = 0.f; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index fc3fe0059..dd95eff82 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2488,7 +2488,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : chromaskreti(0.0), gammaskreti(1.0), slomaskreti(0.0), - scalereti(4.0), + scalereti(3.0), darkness(1.0), lightnessreti(1.0), limd(8.0), diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index e47fb3bf0..a20df8edb 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -161,7 +161,7 @@ Locallab::Locallab(): chromaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), slomaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), - scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 1.0, 10.0, 1., 4.))), + scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 1.0, 10.0, 1., 3.))), darkness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DARKRETI"), 0.01, 3.0, 0.01, 1.))), lightnessreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTRETI"), 0.01, 3.0, 0.01, 1.))), limd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESRETI"), 1.2, 100.0, 0.1, 8.))),