Fixed small bug in CBDL clarity
This commit is contained in:
parent
e8ac6fb09f
commit
5ea56b6611
@ -426,16 +426,25 @@ void ImProcFunctions::cbdl_local_temp(float ** src, float ** loctemp, int srcwid
|
||||
|
||||
float clar = 0.01f * mergeL;
|
||||
|
||||
|
||||
/*
|
||||
if(clar == 0.f) {
|
||||
clar = 0.0005f;
|
||||
clar = 0.0f;
|
||||
}
|
||||
|
||||
// printf("clar=%f \n", clar);
|
||||
*/
|
||||
if(clar > 0.f) {
|
||||
#pragma omp parallel for
|
||||
for (int i = 0; i < srcheight; i++)
|
||||
for (int j = 0; j < srcwidth; j++) {
|
||||
loctemp[i][j] = CLIPLL((1.f + clar) * loct[i][j] - clar * resid5[i][j]);
|
||||
}
|
||||
} else {
|
||||
#pragma omp parallel for
|
||||
for (int i = 0; i < srcheight; i++)
|
||||
for (int j = 0; j < srcwidth; j++) {
|
||||
loctemp[i][j] = CLIPLL(loct[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -602,6 +602,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
|
||||
lp.dehaze = local_dehaze;
|
||||
lp.senscb = local_sensicb;
|
||||
lp.clarityml = local_clarityml;
|
||||
//printf("lpclari=%f \n", lp.clarityml);
|
||||
lp.contresid = local_contresid;
|
||||
lp.blurcbdl = local_blurcbdl;
|
||||
lp.cont = local_contrast;
|
||||
|
@ -2497,7 +2497,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
chromacbdl(0),
|
||||
threshold(0.2),
|
||||
sensicb(15),
|
||||
clarityml(0),
|
||||
clarityml(0.),
|
||||
contresid(0),
|
||||
blurcbdl(0.),
|
||||
softradiuscb(0.0),
|
||||
|
@ -1098,9 +1098,9 @@ struct LocallabParams {
|
||||
int chromacbdl;
|
||||
double threshold;
|
||||
int sensicb;
|
||||
int clarityml;
|
||||
double clarityml;
|
||||
int contresid;
|
||||
int blurcbdl;
|
||||
double blurcbdl;
|
||||
double softradiuscb;
|
||||
bool enacbMask;
|
||||
std::vector<double> CCmaskcbcurve;
|
||||
|
@ -168,7 +168,7 @@ Locallab::Locallab():
|
||||
// Contrast by detail levels
|
||||
chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0, 300, 1, 0))),
|
||||
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))),
|
||||
clarityml(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CLARITYML"), 0.0, 100., 0.1, 0.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., 0.1, 0.))),
|
||||
sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))),
|
||||
@ -1966,7 +1966,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->locallab.spots.at(pp->locallab.selspot).chromacbdl = chromacbdl->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).threshold = threshold->getValue();
|
||||
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).clarityml = clarityml->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).contresid = contresid->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).blurcbdl = blurcbdl->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).softradiuscb = softradiuscb->getValue();
|
||||
@ -3315,7 +3315,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
||||
chromacbdl->setDefault((double)defSpot->chromacbdl);
|
||||
threshold->setDefault(defSpot->threshold);
|
||||
sensicb->setDefault((double)defSpot->sensicb);
|
||||
clarityml->setDefault((double)defSpot->clarityml);
|
||||
clarityml->setDefault(defSpot->clarityml);
|
||||
contresid->setDefault((double)defSpot->contresid);
|
||||
blurcbdl->setDefault(defSpot->blurcbdl);
|
||||
softradiuscb->setDefault(defSpot->softradiuscb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user