Fixed provisory crash and bug in retinex
This commit is contained in:
parent
9566907887
commit
1435a2e5e0
@ -932,6 +932,7 @@ HISTORY_MSG_685;Local - Retinex mask chroma
|
||||
HISTORY_MSG_686;Local - Retinex mask gamma
|
||||
HISTORY_MSG_687;Local - Retinex mask slope
|
||||
HISTORY_MSG_689;Local - Retinex mask transmission map
|
||||
HISTORY_MSG_690;Local - Retinex blend with original
|
||||
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
|
||||
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
|
||||
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
|
||||
@ -1986,6 +1987,7 @@ TP_LOCALLAB_AVOID;Avoid color shift
|
||||
TP_LOCALLAB_BALAN;Balance deltaE ab-L
|
||||
TP_LOCALLAB_BILATERAL;Bilateral filter
|
||||
TP_LOCALLAB_BLENDMASKCOL;Blend
|
||||
TP_LOCALLAB_BLENDRETI;Blend Luminance with original
|
||||
TP_LOCALLAB_BLMETHOD_TOOLTIP;Normal - direct blur and noise with all settings.\nInverse - Inverse blur and noise without scope and whithout enhanced algorithm.\nSymmetric - inverse blur and noise with all settings. Be careful some results may be curious
|
||||
TP_LOCALLAB_BLUFR;Blur & Noise
|
||||
TP_LOCALLAB_BLURDE;Blur Shape detection
|
||||
|
@ -2322,7 +2322,6 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
|
||||
std::unique_ptr<LabImage> origblur(new LabImage(GW, GH));
|
||||
const float radius = 3.f / sk;
|
||||
const bool usemaskreti = (lp.showmaskretimet == 2 || lp.enaretiMask || lp.showmaskretimet == 4) && senstype == 4 && !lp.enaretiMasktmap;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
@ -2342,6 +2341,7 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
|
||||
const float maxdE = 5.f + MAXSCOPE * varsens * (1 + 0.1f * lp.thr);
|
||||
const float mindElim = 2.f + MINSCOPE * limscope * lp.thr;
|
||||
const float maxdElim = 5.f + MAXSCOPE * limscope * (1 + 0.1f * lp.thr);
|
||||
printf("OK use3\n");
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for schedule(dynamic,16)
|
||||
@ -2377,11 +2377,11 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
|
||||
|
||||
float rL = origblur->L[y][x] / 327.68f;
|
||||
float dE;
|
||||
if(!usemaskreti) {
|
||||
// if(!usemaskreti) {
|
||||
dE = sqrt(kab * SQR(refa - origblur->a[y][x] / 327.68f) + kab * SQR(refb - origblur->b[y][x] / 327.68f) + kL * SQR(lumaref - rL));
|
||||
} else {
|
||||
dE = sqrt(kab * SQR(refa - buforigmas->a[loy - begy][lox - begx] / 327.68f) + kab * SQR(refb - buforigmas->b[loy - begy][lox - begx] / 327.68f) + kL * SQR(lumaref - buforigmas->L[loy - begy][lox - begx] / 327.68f));
|
||||
}
|
||||
// } else {
|
||||
// dE = sqrt(kab * SQR(refa - buforigmas->a[loy - begy][lox - begx] / 327.68f) + kab * SQR(refb - buforigmas->b[loy - begy][lox - begx] / 327.68f) + kL * SQR(lumaref - buforigmas->L[loy - begy][lox - begx] / 327.68f));
|
||||
// }
|
||||
float cli = buflight[loy - begy][lox - begx];
|
||||
//float clc = bufchro[loy - begy][lox - begx];
|
||||
float clc = previewreti ? settings->previewselection * 100.f : bufchro[loy - begy][lox - begx];
|
||||
@ -2391,21 +2391,23 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
|
||||
calcreducdE(dE, maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, varsens , reducdE);
|
||||
const float realstrdE = reducdE * cli;
|
||||
|
||||
// reducdE /= 100.f;
|
||||
// cli *= reducdE;
|
||||
clc *= reducdE / 100.f;
|
||||
reducdE /= 100.f;
|
||||
cli *= reducdE;
|
||||
clc *= reducdE;
|
||||
|
||||
if (rL > 0.1f) { //to avoid crash with very low gamut in rare cases ex : L=0.01 a=0.5 b=-0.9
|
||||
if (senstype == 4) {//all except color and light (TODO) and exposure
|
||||
// float lightc = bufexporig->L[loy - begy][lox - begx];
|
||||
// float fli = 1.f + cli;
|
||||
float diflc;// = lightc * fli - original->L[y][x];
|
||||
diflc = 328.f * realstrdE;
|
||||
float lightc = bufexporig->L[loy - begy][lox - begx];
|
||||
float fli = 1.f + cli;
|
||||
float diflc = lightc * fli - original->L[y][x];
|
||||
float diflc2 = 328.f * realstrdE;
|
||||
diflc *= localFactor;
|
||||
diflc2 *= localFactor;
|
||||
|
||||
if(!showmas) transformed->L[y][x] = CLIP(original->L[y][x] + diflc);
|
||||
else transformed->L[y][x] = bufmask->L[loy - begy][lox - begx]; ; //bufexporig->L[loy - begy][lox - begx];
|
||||
if(retishow) {
|
||||
transformed->L[y][x] = CLIP(12000.f + diflc);
|
||||
transformed->L[y][x] = CLIP(12000.f + diflc2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2438,7 +2440,7 @@ void ImProcFunctions::transit_shapedetect_retinex(int senstype, LabImage * bufex
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(showmas) return;
|
||||
if(showmas || retishow || previewreti) return;
|
||||
|
||||
}
|
||||
}
|
||||
@ -5851,6 +5853,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
}
|
||||
|
||||
|
||||
|
||||
LabImage *tmpl = nullptr;
|
||||
|
||||
if (!lp.invret && call <= 3) {
|
||||
@ -5919,6 +5922,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax;
|
||||
ImProcFunctions::MSRLocal(sp, 1, bufreti, bufmask, buforig, buforigmas, orig, tmpl->L, orig1, Wd, Hd, params->locallab, sk, locRETgainCcurve, 0, 4, 0.8f, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, llretiMask, transformed, lp.enaretiMasktmap, lp.enaretiMask);
|
||||
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
#endif
|
||||
|
@ -1267,6 +1267,8 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b
|
||||
// float absciss;
|
||||
float cdmax = -999999.f, cdmin = 999999.f;
|
||||
float gan = 0.5f;
|
||||
float blreti = 0.01f * loc.spots.at(sp).blendreti;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for schedule(dynamic,16)
|
||||
#endif
|
||||
@ -1292,6 +1294,7 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b
|
||||
cdmax = cd > cdmax ? cd : cdmax;
|
||||
cdmin = cd < cdmin ? cd : cdmin;
|
||||
luminance[i][j] = LIM(cd, 0.f, maxclip) * str + (1.f - str) * originalLuminance[i][j];
|
||||
// luminance[i][j] = blreti * luminance[i][j] + (1.f - blreti) * originalLuminance[i][j];
|
||||
}
|
||||
|
||||
#ifdef _OPENMP
|
||||
@ -1303,6 +1306,7 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b
|
||||
}
|
||||
|
||||
}
|
||||
//printf("OK useretinex\n");
|
||||
|
||||
Tmean = mean;
|
||||
Tsigma = stddv;
|
||||
|
@ -716,6 +716,7 @@ enum ProcEventCode {
|
||||
Evlocallabslomaskreti = 686,
|
||||
EvlocallabshowmaskretiMethod = 687,
|
||||
EvLocallabEnaretiMasktmap = 688,
|
||||
Evlocallabblendreti = 689,
|
||||
NUMOFEVENTS
|
||||
};
|
||||
|
||||
|
@ -2469,7 +2469,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
// Retinex
|
||||
expreti(false),
|
||||
retinexMethod("high"),
|
||||
str(0),
|
||||
str(0.0),
|
||||
chrrt(0),
|
||||
neigh(170),
|
||||
vart(70),
|
||||
@ -2488,6 +2488,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
chromaskreti(0.0),
|
||||
gammaskreti(1.0),
|
||||
slomaskreti(0.0),
|
||||
blendreti(80.0),
|
||||
// Sharpening
|
||||
expsharp(false),
|
||||
sharcontrast(20),
|
||||
@ -2697,6 +2698,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
|
||||
&& chromaskreti == other.chromaskreti
|
||||
&& gammaskreti == other.gammaskreti
|
||||
&& slomaskreti == other.slomaskreti
|
||||
&& blendreti == other.blendreti
|
||||
// Sharpening
|
||||
&& expsharp == other.expsharp
|
||||
&& sharcontrast == other.sharcontrast
|
||||
@ -3862,6 +3864,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskreti, "Locallab", "Chromaskreti_" + std::to_string(i), spot.chromaskreti, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskreti, "Locallab", "Gammaskreti_" + std::to_string(i), spot.gammaskreti, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskreti, "Locallab", "Slomaskreti_" + std::to_string(i), spot.slomaskreti, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendreti, "Locallab", "Blendreti_" + std::to_string(i), spot.blendreti, keyFile);
|
||||
// Sharpening
|
||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expsharp, "Locallab", "Expsharp_" + std::to_string(i), spot.expsharp, keyFile);
|
||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sharcontrast, "Locallab", "Sharcontrast_" + std::to_string(i), spot.sharcontrast, keyFile);
|
||||
@ -5168,6 +5171,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "Locallab", "Chromaskreti_" + std::to_string(i), pedited, spot.chromaskreti, spotEdited.chromaskreti);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Gammaskreti_" + std::to_string(i), pedited, spot.gammaskreti, spotEdited.gammaskreti);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Slomaskreti_" + std::to_string(i), pedited, spot.slomaskreti, spotEdited.slomaskreti);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Blendreti_" + std::to_string(i), pedited, spot.blendreti, spotEdited.blendreti);
|
||||
// Sharpening
|
||||
assignFromKeyfile(keyFile, "Locallab", "Expsharp_" + std::to_string(i), pedited, spot.expsharp, spotEdited.expsharp);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Sharcontrast_" + std::to_string(i), pedited, spot.sharcontrast, spotEdited.sharcontrast);
|
||||
|
@ -1070,7 +1070,7 @@ struct LocallabParams {
|
||||
// Retinex
|
||||
bool expreti;
|
||||
Glib::ustring retinexMethod;
|
||||
int str;
|
||||
double str;
|
||||
int chrrt;
|
||||
int neigh;
|
||||
int vart;
|
||||
@ -1089,6 +1089,7 @@ struct LocallabParams {
|
||||
double chromaskreti;
|
||||
double gammaskreti;
|
||||
double slomaskreti;
|
||||
double blendreti;
|
||||
// Sharpening
|
||||
bool expsharp;
|
||||
int sharcontrast;
|
||||
|
@ -715,7 +715,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
LUMINANCECURVE, //Evlocallabgammaskreti
|
||||
LUMINANCECURVE, //Evlocallabslomaskreti
|
||||
LUMINANCECURVE, //EvlocallabshowmaskretiMethod
|
||||
LUMINANCECURVE //EvLocallabEnaretiMasktmap
|
||||
LUMINANCECURVE, //EvLocallabEnaretiMasktmap
|
||||
LUMINANCECURVE //Evlocallabblendreti
|
||||
};
|
||||
|
||||
|
||||
|
@ -149,9 +149,9 @@ Locallab::Locallab():
|
||||
amount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AMOUNT"), 50., 100.0, 0.5, 95.))),
|
||||
satur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SATUR"), -100., 100., 0.1, 0.))),//by default satur = 0 ==> use Mantiuk value
|
||||
// Retinex
|
||||
str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0, 100, 1, 0))),
|
||||
str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0., 100., 0.1, 0.0))),
|
||||
chrrt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHRRT"), 0, 100, 1, 0))),
|
||||
neigh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NEIGH"), 14, 200, 1, 150))),
|
||||
neigh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NEIGH"), 4, 200, 1, 150))),
|
||||
vart(Gtk::manage(new Adjuster(M("TP_LOCALLAB_VART"), 50, 500, 1, 70))),
|
||||
dehaz(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZ"), 0, 100, 1, 0))),
|
||||
sensih(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIH"), 0, 100, 1, 30))),
|
||||
@ -161,6 +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.1, 5.0, 0.01, 1.))),
|
||||
slomaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
|
||||
blendreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDRETI"), 0.0, 100.0, 0.1, 80.))),//not used
|
||||
// Sharpening
|
||||
sharcontrast(Gtk::manage(new Adjuster(M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 20))),
|
||||
sharradius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARRADIUS"), 0.4, 2.5, 0.01, 0.75))),
|
||||
@ -908,6 +909,7 @@ Locallab::Locallab():
|
||||
chromaskreti->setAdjusterListener(this);
|
||||
gammaskreti->setAdjusterListener(this);
|
||||
slomaskreti->setAdjusterListener(this);
|
||||
blendreti->setAdjusterListener(this);
|
||||
|
||||
ToolParamBlock* const maskretiBox = Gtk::manage(new ToolParamBlock());
|
||||
maskretiBox->pack_start(*showmaskretiMethod, Gtk::PACK_SHRINK, 4);
|
||||
@ -923,6 +925,7 @@ Locallab::Locallab():
|
||||
|
||||
ToolParamBlock* const retiBox = Gtk::manage(new ToolParamBlock());
|
||||
retiBox->pack_start(*retinexMethod);
|
||||
//retiBox->pack_start(*blendreti);
|
||||
retiBox->pack_start(*str);
|
||||
retiBox->pack_start(*chrrt);
|
||||
retiBox->pack_start(*neigh);
|
||||
@ -2113,7 +2116,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->locallab.spots.at(pp->locallab.selspot).retinexMethod = "high";
|
||||
}
|
||||
|
||||
pp->locallab.spots.at(pp->locallab.selspot).str = str->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).str = str->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).chrrt = chrrt->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).neigh = neigh->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).vart = vart->getIntValue();
|
||||
@ -2133,6 +2136,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->locallab.spots.at(pp->locallab.selspot).chromaskreti = chromaskreti->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).gammaskreti = gammaskreti->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).slomaskreti = slomaskreti->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).blendreti = blendreti->getValue();
|
||||
// Sharpening
|
||||
pp->locallab.spots.at(pp->locallab.selspot).expsharp = expsharp->getEnabled();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sharcontrast = sharcontrast->getIntValue();
|
||||
@ -2344,6 +2348,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pe->locallab.spots.at(pp->locallab.selspot).chromaskreti = pe->locallab.spots.at(pp->locallab.selspot).chromaskreti || chromaskreti->getEditedState();
|
||||
pe->locallab.spots.at(pp->locallab.selspot).gammaskreti = pe->locallab.spots.at(pp->locallab.selspot).gammaskreti || gammaskreti->getEditedState();
|
||||
pe->locallab.spots.at(pp->locallab.selspot).slomaskreti = pe->locallab.spots.at(pp->locallab.selspot).slomaskreti || slomaskreti->getEditedState();
|
||||
pe->locallab.spots.at(pp->locallab.selspot).blendreti = pe->locallab.spots.at(pp->locallab.selspot).blendreti || blendreti->getEditedState();
|
||||
// Sharpening
|
||||
pe->locallab.spots.at(pp->locallab.selspot).expsharp = pe->locallab.spots.at(pp->locallab.selspot).expsharp || !expsharp->get_inconsistent();
|
||||
pe->locallab.spots.at(pp->locallab.selspot).sharcontrast = pe->locallab.spots.at(pp->locallab.selspot).sharcontrast || sharcontrast->getEditedState();
|
||||
@ -2559,6 +2564,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->locallab.spots.at(pp->locallab.selspot).chromaskreti = pedited->locallab.spots.at(pp->locallab.selspot).chromaskreti || chromaskreti->getEditedState();
|
||||
pedited->locallab.spots.at(pp->locallab.selspot).gammaskreti = pedited->locallab.spots.at(pp->locallab.selspot).gammaskreti || gammaskreti->getEditedState();
|
||||
pedited->locallab.spots.at(pp->locallab.selspot).slomaskreti = pedited->locallab.spots.at(pp->locallab.selspot).slomaskreti || slomaskreti->getEditedState();
|
||||
pedited->locallab.spots.at(pp->locallab.selspot).blendreti = pedited->locallab.spots.at(pp->locallab.selspot).blendreti || blendreti->getEditedState();
|
||||
// Sharpening
|
||||
pedited->locallab.spots.at(pp->locallab.selspot).expsharp = pedited->locallab.spots.at(pp->locallab.selspot).expsharp || !expsharp->get_inconsistent();
|
||||
pedited->locallab.spots.at(pp->locallab.selspot).sharcontrast = pedited->locallab.spots.at(pp->locallab.selspot).sharcontrast || sharcontrast->getEditedState();
|
||||
@ -3599,7 +3605,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
||||
softradiustm->setDefault(defSpot->softradiustm);
|
||||
amount->setDefault(defSpot->amount);
|
||||
// Retinex
|
||||
str->setDefault((double)defSpot->str);
|
||||
str->setDefault(defSpot->str);
|
||||
chrrt->setDefault((double)defSpot->chrrt);
|
||||
neigh->setDefault((double)defSpot->neigh);
|
||||
vart->setDefault((double)defSpot->vart);
|
||||
@ -3611,6 +3617,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
||||
chromaskreti->setDefault(defSpot->chromaskreti);
|
||||
gammaskreti->setDefault(defSpot->gammaskreti);
|
||||
slomaskreti->setDefault(defSpot->slomaskreti);
|
||||
blendreti->setDefault(defSpot->blendreti);
|
||||
// Sharpening
|
||||
sharcontrast->setDefault((double)defSpot->sharcontrast);
|
||||
sharradius->setDefault(defSpot->sharradius);
|
||||
@ -3739,6 +3746,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
||||
chromaskreti->setDefaultEditedState(Irrelevant);
|
||||
gammaskreti->setDefaultEditedState(Irrelevant);
|
||||
slomaskreti->setDefaultEditedState(Irrelevant);
|
||||
blendreti->setDefaultEditedState(Irrelevant);
|
||||
// Sharpening
|
||||
sharcontrast->setDefaultEditedState(Irrelevant);
|
||||
sharradius->setDefaultEditedState(Irrelevant);
|
||||
@ -3871,6 +3879,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
||||
chromaskreti->setDefaultEditedState(defSpotState->chromaskreti ? Edited : UnEdited);
|
||||
gammaskreti->setDefaultEditedState(defSpotState->gammaskreti ? Edited : UnEdited);
|
||||
slomaskreti->setDefaultEditedState(defSpotState->slomaskreti ? Edited : UnEdited);
|
||||
blendreti->setDefaultEditedState(defSpotState->blendreti ? Edited : UnEdited);
|
||||
// Sharpening
|
||||
sharcontrast->setDefaultEditedState(defSpotState->sharcontrast ? Edited : UnEdited);
|
||||
sharradius->setDefaultEditedState(defSpotState->sharradius ? Edited : UnEdited);
|
||||
@ -4420,6 +4429,12 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
if (a == blendreti) {
|
||||
if (listener) {
|
||||
listener->panelChanged(Evlocallabblendreti, blendreti->getTextValue());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Sharpening
|
||||
@ -4777,6 +4792,7 @@ void Locallab::setBatchMode(bool batchMode)
|
||||
chromaskreti->showEditedCB();
|
||||
gammaskreti->showEditedCB();
|
||||
slomaskreti->showEditedCB();
|
||||
blendreti->showEditedCB();
|
||||
// Sharpening
|
||||
sharradius->showEditedCB();
|
||||
sharamount->showEditedCB();
|
||||
@ -5240,6 +5256,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
||||
chromaskreti->setValue(pp->locallab.spots.at(index).chromaskreti);
|
||||
gammaskreti->setValue(pp->locallab.spots.at(index).gammaskreti);
|
||||
slomaskreti->setValue(pp->locallab.spots.at(index).slomaskreti);
|
||||
blendreti->setValue(pp->locallab.spots.at(index).blendreti);
|
||||
|
||||
// Sharpening
|
||||
expsharp->setEnabled(pp->locallab.spots.at(index).expsharp);
|
||||
@ -5485,6 +5502,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
||||
chromaskreti->setEditedState(spotState->chromaskreti ? Edited : UnEdited);
|
||||
gammaskreti->setEditedState(spotState->gammaskreti ? Edited : UnEdited);
|
||||
slomaskreti->setEditedState(spotState->slomaskreti ? Edited : UnEdited);
|
||||
blendreti->setEditedState(spotState->blendreti ? Edited : UnEdited);
|
||||
|
||||
// Sharpening
|
||||
expsharp->set_inconsistent(!spotState->expsharp);
|
||||
|
@ -187,6 +187,7 @@ private:
|
||||
Adjuster* const chromaskreti;
|
||||
Adjuster* const gammaskreti;
|
||||
Adjuster* const slomaskreti;
|
||||
Adjuster* const blendreti;
|
||||
|
||||
// Sharpening
|
||||
Adjuster* const sharcontrast;
|
||||
|
@ -1078,6 +1078,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
||||
locallab.spots.at(j).chromaskreti = locallab.spots.at(j).chromaskreti && pSpot.chromaskreti == otherSpot.chromaskreti;
|
||||
locallab.spots.at(j).gammaskreti = locallab.spots.at(j).gammaskreti && pSpot.gammaskreti == otherSpot.gammaskreti;
|
||||
locallab.spots.at(j).slomaskreti = locallab.spots.at(j).slomaskreti && pSpot.slomaskreti == otherSpot.slomaskreti;
|
||||
locallab.spots.at(j).blendreti = locallab.spots.at(j).blendreti && pSpot.blendreti == otherSpot.blendreti;
|
||||
// Sharpening
|
||||
locallab.spots.at(j).expsharp = locallab.spots.at(j).expsharp && pSpot.expsharp == otherSpot.expsharp;
|
||||
locallab.spots.at(j).sharcontrast = locallab.spots.at(j).sharcontrast && pSpot.sharcontrast == otherSpot.sharcontrast;
|
||||
@ -3134,6 +3135,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
||||
toEdit.locallab.spots.at(i).slomaskreti = mods.locallab.spots.at(i).slomaskreti;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).blendreti) {
|
||||
toEdit.locallab.spots.at(i).blendreti = mods.locallab.spots.at(i).blendreti;
|
||||
}
|
||||
|
||||
// Sharpening
|
||||
if (locallab.spots.at(i).expsharp) {
|
||||
toEdit.locallab.spots.at(i).expsharp = mods.locallab.spots.at(i).expsharp;
|
||||
@ -4416,6 +4421,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
|
||||
chromaskreti(v),
|
||||
gammaskreti(v),
|
||||
slomaskreti(v),
|
||||
blendreti(v),
|
||||
// Sharpening
|
||||
expsharp(v),
|
||||
sharcontrast(v),
|
||||
@ -4622,6 +4628,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
|
||||
chromaskreti = v;
|
||||
gammaskreti = v;
|
||||
slomaskreti = v;
|
||||
blendreti = v;
|
||||
// Sharpening
|
||||
expsharp = v;
|
||||
sharcontrast = v;
|
||||
|
@ -505,6 +505,7 @@ public:
|
||||
bool chromaskreti;
|
||||
bool gammaskreti;
|
||||
bool slomaskreti;
|
||||
bool blendreti;
|
||||
// Sharpening
|
||||
bool expsharp;
|
||||
bool sharcontrast;
|
||||
|
Loading…
x
Reference in New Issue
Block a user