diff --git a/rtdata/languages/default b/rtdata/languages/default index a2d1edc6b..7540be8f5 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2071,7 +2071,7 @@ TP_LOCALLAB_BALAN;Balance deltaE ab-L TP_LOCALLAB_BILATERAL;Bilateral filter TP_LOCALLAB_BLENDMASKCOL;Blend TP_LOCALLAB_BLUR;Gaussian Blur and Noise -TP_LOCALLAB_BLUMETHOD_TOOLTIP;To blur the background and isolate the foreground:\nBlur the background by a RT-spot fully covering the image (scope #100).\nIsolate the foreground by an excluding RT-spot with the tools you want, you can use a mask to enhance and amplify the effects +TP_LOCALLAB_BLUMETHOD_TOOLTIP;To blur the background and isolate the foreground:\n*Blur the background by a RT-spot fully covering the image (high values for scope and transition) - normal or inverse.\n*Isolate the foreground by one or more excluding RT-spot with the tools you want (increse scope), you can use a mask to enhance and amplify the effects TP_LOCALLAB_BLMED;Median TP_LOCALLAB_BLGUID;Guided Filter Luminance TP_LOCALLAB_GUIDBL;Soft radius diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 96a5f2add..29bd894b0 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -6929,7 +6929,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } - if (((radius >= 1.5 * GAUSS_SKIP && lp.rad > 1.) || lp.stren > 0.1 || lp.blmet == 1 || lp.guidb > 1 || lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image + if (((radius >= 5. * GAUSS_SKIP && lp.rad > 1.) || lp.stren > 0.1 || lp.blmet == 1 || lp.guidb > 1 || lp.showmaskblmet == 2 || lp.enablMask || lp.showmaskblmet == 3 || lp.showmaskblmet == 4) && lp.blurena) { // radius < GAUSS_SKIP means no gauss, just copy of original image std::unique_ptr tmp1; std::unique_ptr tmp2; const int ystart = std::max(static_cast(lp.yc - lp.lyT) - cy, 0); @@ -6984,26 +6984,38 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o } - if (lp.blurmet == 0 && lp.blmet == 0) { + if (lp.blurmet == 0 && lp.blmet == 0 && radius >= (5. * GAUSS_SKIP)) { #ifdef _OPENMP #pragma omp parallel #endif { - gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius); - gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius); - gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius); + if(radius > 200.f) {//to test not optimize + ImProcFunctions::fftw_convol_blur2(tmp1->L, tmp1->L, bfw, bfh, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(tmp1->a, tmp1->a, bfw, bfh, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(tmp1->b, tmp1->b, bfw, bfh, radius, 0, 0); + } else { + gaussianBlur(tmp1->L, tmp1->L, bfw, bfh, radius); + gaussianBlur(tmp1->a, tmp1->a, bfw, bfh, radius); + gaussianBlur(tmp1->b, tmp1->b, bfw, bfh, radius); + } } - } else if (lp.blurmet == 1 && lp.blmet == 0) { + } else if (lp.blurmet == 1 && lp.blmet == 0 && radius >= (5. * GAUSS_SKIP)) { #ifdef _OPENMP #pragma omp parallel #endif { - gaussianBlur(original->L, tmp1->L, GW, GH, radius); - gaussianBlur(original->a, tmp1->a, GW, GH, radius); - gaussianBlur(original->b, tmp1->b, GW, GH, radius); + if(radius > 200.f) {//to test not optimize + ImProcFunctions::fftw_convol_blur2(tmp1->L, tmp1->L, GW, GH, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(tmp1->a, tmp1->a, GW, GH, radius, 0, 0); + ImProcFunctions::fftw_convol_blur2(tmp1->b, tmp1->b, GW, GH, radius, 0, 0); + } else { + gaussianBlur(original->L, tmp1->L, GW, GH, radius); + gaussianBlur(original->a, tmp1->a, GW, GH, radius); + gaussianBlur(original->b, tmp1->b, GW, GH, radius); + } } } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 986103f64..214b1535e 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2537,7 +2537,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : softMethod("soft"), // Blur & Noise expblur(false), - radius(1.0), + radius(5.0), strength(0), sensibn(40), itera(1), diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 50412f508..24e56624a 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -240,7 +240,7 @@ Locallab::Locallab(): laplace(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACE"), 0., 100., 0.5, 25.))), sensisf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 1, 100, 1, 15))), // Blur & Noise - radius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADIUS"), 1.0, 300.0, 0.1, 1.0))), + radius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADIUS"), 5.0, 1000.0, 0.1, 5.0))), strength(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENGTH"), 0, 100, 1, 0))), itera(Gtk::manage(new Adjuster(M("TP_DIRPYRDENOISE_MEDIAN_PASSES"), 1, 4, 1, 1))), guidbl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GUIDBL"), 1, 300, 1, 1))),