From e8ac6fb09f3ea8dee50e93f4862de8067e82a030 Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 16 Apr 2019 13:57:22 +0200 Subject: [PATCH] Small changes to blur cbdl --- rtdata/languages/default | 2 +- rtengine/dirpyr_equalizer.cc | 4 +++- rtengine/procparams.cc | 2 +- rtgui/locallab.cc | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index ddf45853e..adbdf68e6 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1976,7 +1976,7 @@ TP_LOCALLAB_BLUFR;Blur & Noise TP_LOCALLAB_BLURDE;Blur Shape detection TP_LOCALLAB_BLNORM;Normal TP_LOCALLAB_BLINV;Inverse -TP_LOCALLAB_BLURCBDL;Blur +TP_LOCALLAB_BLURCBDL;Blur levels TP_LOCALLAB_BLSYM;Symmetric TP_LOCALLAB_CENTER_X;Center X TP_LOCALLAB_CENTER_Y;Center Y diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index 85b9c2bd6..c0b10202d 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -425,8 +425,10 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid } float clar = 0.01f * mergeL; + + if(clar == 0.f) { - clar = 0.001f; + clar = 0.0005f; } #pragma omp parallel for diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 8c411ce05..9b8bbce07 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2499,7 +2499,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : sensicb(15), clarityml(0), contresid(0), - blurcbdl(0), + blurcbdl(0.), softradiuscb(0.0), enacbMask(false), CCmaskcbcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35 }, diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 7e882a688..557f3b92e 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -170,7 +170,7 @@ Locallab::Locallab(): threshold(Gtk::manage(new Adjuster(M("TP_DIRPYREQUALIZER_THRESHOLD"), 0, 1., 0.01, 0.2))), clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0, 100, 1, 0))), contresid(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTRESID"), -100, 100, 1, 0))), - blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0, 100, 1, 0))), + blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.))), sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))), blendmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), @@ -1968,7 +1968,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).sensicb = sensicb->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).clarityml = clarityml->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue(); pp->locallab.spots.at(pp->locallab.selspot).enacbMask = enacbMask->get_active(); @@ -3317,7 +3317,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe sensicb->setDefault((double)defSpot->sensicb); clarityml->setDefault((double)defSpot->clarityml); contresid->setDefault((double)defSpot->contresid); - blurcbdl->setDefault((double)defSpot->blurcbdl); + blurcbdl->setDefault(defSpot->blurcbdl); softradiuscb->setDefault(defSpot->softradiuscb); blendmaskcb->setDefault((double)defSpot->blendmaskcb); radmaskcb->setDefault(defSpot->radmaskcb);