diff --git a/rtdata/languages/default b/rtdata/languages/default index fd2f62ae3..1469281db 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2189,7 +2189,7 @@ TP_LOCALLAB_NOISECHROFINE;Chroma fine (Wav) TP_LOCALLAB_NOISECHROCOARSE;Chroma coarse (Wav) TP_LOCALLAB_NOISECHRODETAIL;Chroma detail recovery(DCT) TP_LOCALLAB_DETAILTHR;Detail threshold Luminance Chroma (DCT) -TP_LOCALLAB_NOISECHROC_TOOLTIP;If superior to zero, high quality algorithm is enabled.\nCoarse is for slider >=2 +TP_LOCALLAB_NOISECHROC_TOOLTIP;If superior to zero, high quality algorithm is enabled.\nCoarse is for slider >=0.02 TP_LOCALLAB_PREVIEWSEL;Preview selection deltaE TP_LOCALLAB_PDEFRA;PDE IPOL - Contrast attenuator TP_LOCALLAB_FATFRA;PDE Fattal - Dynamic Range Compression diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 070b01735..2bea8a263 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -5531,7 +5531,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } - if (lp.noisecf >= 0.1f || lp.noisecc >= 0.1f || aut == 1 || aut == 2) { + if (lp.noisecf >= 0.01f || lp.noisecc >= 0.01f || aut == 1 || aut == 2) { noiscfactiv = false; levred = 7; } @@ -5724,7 +5724,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f printf("j=%i variL=%f\n", j, vari[j]); } */ - if ((lp.noiselc < 1.f && aut == 0) || (mxsl < 1.f && (aut == 1 || aut == 2))) { + if ((lp.noiselc < 0.02f && aut == 0) || (mxsl < 1.f && (aut == 1 || aut == 2))) { WaveletDenoiseAllL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); } else { WaveletDenoiseAll_BiShrinkL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); @@ -5938,7 +5938,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f float k5 = 0.f; float k6 = 0.f; - if ((lp.noisecc == 0.1f && aut == 0) || (maxccoarse == 0.1f && aut == 1)) { + if ((lp.noisecc == 0.01f && aut == 0) || (maxccoarse == 0.1f && aut == 1)) { k4 = 0.f; k5 = 0.0f; } else if ((lp.noisecc < 0.2f && aut == 0) || (maxccoarse < 0.2f && aut == 1)) { @@ -6026,7 +6026,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f printf("j=%i variC=%f\n", j, variC[j]); } */ - if ((lp.noisecc < 0.1f && aut == 0) || (maxccoarse < 0.1f && (aut == 1 || aut == 2))) { + if ((lp.noisecc < 0.02f && aut == 0) || (maxccoarse < 0.1f && (aut == 1 || aut == 2))) { // printf("SANS SANS\n"); WaveletDenoiseAllAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); WaveletDenoiseAllAB(Ldecomp, bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, numThreads); @@ -6062,7 +6062,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } if (!Ldecomp.memoryAllocationFailed && aut == 0) { - if ((lp.noiself >= 0.1f || lp.noiself0 >= 0.1f || lp.noiself2 >= 0.1f || lp.noiselc >= 0.1f) && levred == 7 && lp.noiseldetail != 100.f) { + if ((lp.noiself >= 0.01f || lp.noiself0 >= 0.01f || lp.noiself2 >= 0.01f || lp.noiselc >= 0.01f) && levred == 7 && lp.noiseldetail != 100.f) { fftw_denoise(GW, GH, max_numblox_W, min_numblox_W, tmp1.L, Lin, numThreads, lp, 0); } } @@ -6085,7 +6085,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!adecomp.memoryAllocationFailed && aut == 0) { - if ((lp.noisecf >= 0.1f || lp.noisecc >= 0.1f) && levred == 7 && lp.noisechrodetail != 100.f) { + if ((lp.noisecf >= 0.01f || lp.noisecc >= 0.01f) && levred == 7 && lp.noisechrodetail != 100.f) { fftw_denoise(GW, GH, max_numblox_W, min_numblox_W, tmp1.a, Ain, numThreads, lp, 1); } } @@ -6110,7 +6110,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!bdecomp.memoryAllocationFailed && aut == 0) { - if ((lp.noisecf >= 0.1f || lp.noisecc >= 0.1f) && levred == 7 && lp.noisechrodetail != 100.f) { + if ((lp.noisecf >= 0.01f || lp.noisecc >= 0.01f) && levred == 7 && lp.noisechrodetail != 100.f) { fftw_denoise(GW, GH, max_numblox_W, min_numblox_W, tmp1.b, Bin, numThreads, lp, 1); } @@ -6300,7 +6300,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } - if ((lp.noiselc < 1.f && aut == 0) || (mxsl < 1.f && (aut == 1 || aut == 2))) { + if ((lp.noiselc < 0.02f && aut == 0) || (mxsl < 1.f && (aut == 1 || aut == 2))) { WaveletDenoiseAllL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); } else { WaveletDenoiseAll_BiShrinkL(Ldecomp, noisevarlum, madL, vari, edge, numThreads); @@ -6513,7 +6513,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f float k5 = 0.f; float k6 = 0.f; - if ((lp.noisecc == 0.1f && aut == 0) || (maxccoarse == 0.1f && aut == 1)) { + if ((lp.noisecc == 0.01f && aut == 0) || (maxccoarse == 0.1f && aut == 1)) { k4 = 0.f; k5 = 0.0f; } else if ((lp.noisecc < 0.2f && aut == 0) || (maxccoarse < 0.2f && aut == 1)) { @@ -6595,7 +6595,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f float noisevarab_r = 100.f; //SQR(lp.noisecc / 10.0); // printf("OK CHRO\n"); - if ((lp.noisecc < 0.1f && aut == 0) || (maxccoarse < 0.1f && (aut == 1 || aut == 2))) { + if ((lp.noisecc < 0.02f && aut == 0) || (maxccoarse < 0.1f && (aut == 1 || aut == 2))) { // printf("SANS Shrink\n"); WaveletDenoiseAllAB(Ldecomp, adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, numThreads); WaveletDenoiseAllAB(Ldecomp, bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, numThreads); @@ -6633,7 +6633,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f if (!Ldecomp.memoryAllocationFailed && aut == 0) { - if ((lp.noiself >= 0.1f || lp.noiself0 >= 0.1f || lp.noiself2 >= 0.1f || lp.noiselc >= 0.1f) && levred == 7 && lp.noiseldetail != 100.f) { + if ((lp.noiself >= 0.01f || lp.noiself0 >= 0.01f || lp.noiself2 >= 0.01f || lp.noiselc >= 0.01f) && levred == 7 && lp.noiseldetail != 100.f) { fftw_denoise(bfw, bfh, max_numblox_W, min_numblox_W, bufwv.L, Lin, numThreads, lp, 0); } } @@ -6656,7 +6656,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } if (!adecomp.memoryAllocationFailed && aut == 0) { - if ((lp.noisecf >= 0.1f || lp.noisecc >= 0.1f) && levred == 7 && lp.noisechrodetail != 100.f) { + if ((lp.noisecf >= 0.01f || lp.noisecc >= 0.01f) && levred == 7 && lp.noisechrodetail != 100.f) { fftw_denoise(bfw, bfh, max_numblox_W, min_numblox_W, bufwv.a, Ain, numThreads, lp, 1); } } @@ -6679,7 +6679,7 @@ void ImProcFunctions::DeNoise(int call, int del, float * slidL, float * slida, f } if (!bdecomp.memoryAllocationFailed && aut == 0) { - if ((lp.noisecf >= 0.1f || lp.noisecc >= 0.1f) && levred == 7 && lp.noisechrodetail != 100.f) { + if ((lp.noisecf >= 0.01f || lp.noisecc >= 0.01f) && levred == 7 && lp.noisechrodetail != 100.f) { fftw_denoise(bfw, bfh, max_numblox_W, min_numblox_W, bufwv.b, Bin, numThreads, lp, 1); } } diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index eb2adef92..d26fa33dc 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2666,15 +2666,15 @@ LocallabParams::LocallabSpot::LocallabSpot() : lapmaskcb(0.0), // Denoise expdenoi(false), - noiselumf(0), - noiselumf0(0), - noiselumf2(0), - noiselumc(0), - noiselumdetail(0), + noiselumf(0.), + noiselumf0(0.), + noiselumf2(0.), + noiselumc(0.), + noiselumdetail(0.), noiselequal(7), - noisechrof(0), - noisechroc(0), - noisechrodetail(0), + noisechrof(0.), + noisechroc(0.), + noisechrodetail(0.), adjblur(0), bilateral(0), sensiden(20), diff --git a/rtengine/procparams.h b/rtengine/procparams.h index ce7fd008c..2f86a6e80 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1215,15 +1215,15 @@ struct LocallabParams { double lapmaskcb; // Denoise bool expdenoi; - int noiselumf; - int noiselumf0; - int noiselumf2; - int noiselumc; - int noiselumdetail; + double noiselumf; + double noiselumf0; + double noiselumf2; + double noiselumc; + double noiselumdetail; int noiselequal; - int noisechrof; - int noisechroc; - int noisechrodetail; + double noisechrof; + double noisechroc; + double noisechrodetail; int adjblur; int bilateral; int sensiden; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 24f583a62..c61a2bbb5 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -34,8 +34,8 @@ #include "labgrid.h" #define MINCHRO 0. -#define MAXCHRO 150 -#define MAXCHROCC 100 +#define MAXCHRO 150. +#define MAXCHROCC 100. #define MINNEIGH 0.1 #define MAXNEIGH 1500 #define CENTERNEIGH 200 @@ -327,15 +327,15 @@ Locallab::Locallab(): slomaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), lapmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), // Denoise - noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 1, 0))), - noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 1, 0))), - noiselumf2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINETWO"), MINCHRO, MAXCHRO, 1, 0))), - noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), MINCHRO, MAXCHROCC, 1, 0))), - noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0, 100, 1, 0))), + noiselumf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), + noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 0.01, 0.))), + noiselumf2(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINETWO"), MINCHRO, MAXCHRO, 0.01, 0.))), + noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), + noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0., 100., 0.01, 0.))), noiselequal(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELEQUAL"), -2, 10, 1, 7, Gtk::manage(new RTImage("circle-white-small.png")), Gtk::manage(new RTImage("circle-black-small.png"))))), - noisechrof(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROFINE"), MINCHRO, MAXCHRO, 1, 0))), - noisechroc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROCOARSE"), MINCHRO, MAXCHROCC, 1, 0))), - noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0, 100, 1, 0))), + noisechrof(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROFINE"), MINCHRO, MAXCHRO, 0.01, 0.))), + noisechroc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROCOARSE"), MINCHRO, MAXCHROCC, 0.01, 0.))), + noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0., 100., 0.01, 0.))), adjblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_ADJ"), -100., 100., 1., 0., Gtk::manage(new RTImage("circle-blue-small.png")), Gtk::manage(new RTImage("circle-red-small.png"))))), bilateral(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BILATERAL"), 0, 100, 1, 0))), sensiden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIDEN"), 0, 100, 1, 20))), @@ -3378,15 +3378,15 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) // Denoise pp->locallab.spots.at(pp->locallab.selspot).expdenoi = expdenoi->getEnabled(); - pp->locallab.spots.at(pp->locallab.selspot).noiselumf = noiselumf->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).noiselumf0 = noiselumf0->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).noiselumf2 = noiselumf2->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).noiselumc = noiselumc->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).noiselumdetail = noiselumdetail->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).noiselumf = noiselumf->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).noiselumf0 = noiselumf0->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).noiselumf2 = noiselumf2->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).noiselumc = noiselumc->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).noiselumdetail = noiselumdetail->getValue(); pp->locallab.spots.at(pp->locallab.selspot).noiselequal = noiselequal->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).noisechrof = noisechrof->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).noisechroc = noisechroc->getIntValue(); - pp->locallab.spots.at(pp->locallab.selspot).noisechrodetail = noisechrodetail->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).noisechrof = noisechrof->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).noisechroc = noisechroc->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).noisechrodetail = noisechrodetail->getValue(); pp->locallab.spots.at(pp->locallab.selspot).adjblur = adjblur->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).bilateral = bilateral->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).sensiden = sensiden->getIntValue();