add Contrast Threshold (sharp) - Local Contrast - Dehaze (retinex)

This commit is contained in:
Desmis
2018-12-19 19:33:33 +01:00
parent c3bd22f337
commit 0c40abf126
14 changed files with 584 additions and 31 deletions

View File

@@ -52,6 +52,7 @@ Locallab::Locallab():
exptonemap(new MyExpander(true, M("TP_LOCALLAB_TM"))),
expreti(new MyExpander(true, M("TP_LOCALLAB_RETI"))),
expsharp(new MyExpander(true, M("TP_LOCALLAB_SHARP"))),
expcontrast(new MyExpander(true, M("TP_LOCALLAB_LOC_CONTRAST"))),
expcbdl(new MyExpander(true, M("TP_LOCALLAB_CBDL"))),
expdenoi(new MyExpander(true, M("TP_LOCALLAB_DENOIS"))),
@@ -99,13 +100,22 @@ Locallab::Locallab():
chrrt(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHRRT"), 0, 100, 1, 0))),
neigh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NEIGH"), 14, 150, 1, 50))),
vart(Gtk::manage(new Adjuster(M("TP_LOCALLAB_VART"), 50, 500, 1, 200))),
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, 19))),
// Sharpening
sharcontrast(Gtk::manage(new Adjuster(M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 20))),
sharradius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARRADIUS"), 42, 500, 1, 4))),
sharamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARAMOUNT"), 0, 100, 1, 75))),
sharamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARAMOUNT"), 0, 100, 1, 100))),
shardamping(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARDAMPING"), 0, 100, 1, 75))),
shariter(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARITER"), 5, 100, 1, 30))),
sensisha(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))),
//local contrast
lcradius(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_RADIUS"), 20, 200, 1, 80))),
lcamount(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_AMOUNT"), 0, 100, 1, 0))),
lcdarkness(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_DARKNESS"), 0, 300, 1, 100))),
lclightness(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_LIGHTNESS"), 0, 300, 1, 100))),
sensilc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))),
// 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, 100, 1, 20))),
@@ -449,6 +459,7 @@ Locallab::Locallab():
neigh->setAdjusterListener(this);
vart->setAdjusterListener(this);
dehaz->setAdjusterListener(this);
chrrt->setAdjusterListener(this);
@@ -472,6 +483,7 @@ Locallab::Locallab():
retiBox->pack_start(*chrrt);
retiBox->pack_start(*neigh);
retiBox->pack_start(*vart);
retiBox->pack_start(*dehaz);
retiBox->pack_start(*sensih);
retiBox->pack_start(*LocalcurveEditorgainT, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
retiBox->pack_start(*inversret);
@@ -484,6 +496,8 @@ Locallab::Locallab():
expsharp->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expsharp));
enablesharpConn = expsharp->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expsharp));
sharcontrast->setAdjusterListener(this);
sharradius->setAdjusterListener(this);
sharamount->setAdjusterListener(this);
@@ -498,6 +512,7 @@ Locallab::Locallab():
inversshaConn = inverssha->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::inversshaChanged));
ToolParamBlock* const sharpBox = Gtk::manage(new ToolParamBlock());
sharpBox->pack_start(*sharcontrast);
sharpBox->pack_start(*sharradius);
sharpBox->pack_start(*sharamount);
sharpBox->pack_start(*shardamping);
@@ -509,6 +524,26 @@ Locallab::Locallab():
panel->pack_start(*expsharp, false, false);
//local contrast
expcontrast->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expcontrast));
enablecontrastConn = expcontrast->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcontrast));
lcradius->setAdjusterListener(this);
lcamount->setAdjusterListener(this);
lcdarkness->setAdjusterListener(this);
lclightness->setAdjusterListener(this);
sensilc->setAdjusterListener(this);
ToolParamBlock* const contrastBox = Gtk::manage(new ToolParamBlock());
contrastBox->pack_start(*lcradius);
contrastBox->pack_start(*lcamount);
contrastBox->pack_start(*lcdarkness);
contrastBox->pack_start(*lclightness);
contrastBox->pack_start(*sensilc);
expcontrast->add(*contrastBox);
expcontrast->setLevel(2);
panel->pack_start(*expcontrast, false, false);
// Contrast by detail levels
expcbdl->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expcbdl));
enablecbdlConn = expcbdl->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expcbdl));
@@ -631,6 +666,7 @@ void Locallab::foldAllButMe(GdkEventButton* event, MyExpander *expander)
exptonemap->set_expanded(exptonemap == expander);
expreti->set_expanded(expreti == expander);
expsharp->set_expanded(expsharp == expander);
expcontrast->set_expanded(expcontrast == expander);
expcbdl->set_expanded(expcbdl == expander);
expdenoi->set_expanded(expdenoi == expander);
@@ -659,6 +695,8 @@ void Locallab::enableToggled(MyExpander *expander)
event = EvLocenareti;
} else if (expander == expsharp) {
event = EvLocenasharp;
} else if (expander == expcontrast) {
event = EvLocenacontrast;
} else if (expander == expcbdl) {
event = EvLocenacbdl;
} else if (expander == expdenoi) {
@@ -688,6 +726,7 @@ void Locallab::writeOptions(std::vector<int> &tpOpen)
tpOpen.push_back(exptonemap->get_expanded());
tpOpen.push_back(expreti->get_expanded());
tpOpen.push_back(expsharp->get_expanded());
tpOpen.push_back(expcontrast->get_expanded());
tpOpen.push_back(expcbdl->get_expanded());
tpOpen.push_back(expdenoi->get_expanded());
@@ -695,7 +734,7 @@ void Locallab::writeOptions(std::vector<int> &tpOpen)
void Locallab::updateToolState(std::vector<int> &tpOpen)
{
if (tpOpen.size() >= 10) {
if (tpOpen.size() >= 11) {
expsettings->setExpanded(tpOpen.at(0));
expcolor->set_expanded(tpOpen.at(1));
expexpose->set_expanded(tpOpen.at(2));
@@ -704,8 +743,9 @@ void Locallab::updateToolState(std::vector<int> &tpOpen)
exptonemap->set_expanded(tpOpen.at(5));
expreti->set_expanded(tpOpen.at(6));
expsharp->set_expanded(tpOpen.at(7));
expcbdl->set_expanded(tpOpen.at(8));
expdenoi->set_expanded(tpOpen.at(9));
expcontrast->set_expanded(tpOpen.at(8));
expcbdl->set_expanded(tpOpen.at(9));
expdenoi->set_expanded(tpOpen.at(10));
}
}
@@ -864,12 +904,14 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
chrrt->setEditedState(pedited->locallab.chrrt ? Edited : UnEdited);
neigh->setEditedState(pedited->locallab.neigh ? Edited : UnEdited);
vart->setEditedState(pedited->locallab.vart ? Edited : UnEdited);
dehaz->setEditedState(pedited->locallab.dehaz ? Edited : UnEdited);
sensih->setEditedState(pedited->locallab.sensih ? Edited : UnEdited);
cTgainshape->setUnChanged(!pedited->locallab.localTgaincurve);
inversret->set_inconsistent(multiImage && !pedited->locallab.inversret);
// Sharpening
expsharp->set_inconsistent(!pedited->locallab.expsharp);
sharcontrast->setEditedState(pedited->locallab.sharcontrast ? Edited : UnEdited);
sharradius->setEditedState(pedited->locallab.sharradius ? Edited : UnEdited);
sharamount->setEditedState(pedited->locallab.sharamount ? Edited : UnEdited);
shardamping->setEditedState(pedited->locallab.shardamping ? Edited : UnEdited);
@@ -877,6 +919,14 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
sensisha->setEditedState(pedited->locallab.sensisha ? Edited : UnEdited);
inverssha->set_inconsistent(multiImage && !pedited->locallab.inverssha);
// local contrast
expcontrast->set_inconsistent(!pedited->locallab.expcontrast);
lcradius->setEditedState(pedited->locallab.lcradius ? Edited : UnEdited);
lcamount->setEditedState(pedited->locallab.lcamount ? Edited : UnEdited);
lcdarkness->setEditedState(pedited->locallab.lcdarkness ? Edited : UnEdited);
lclightness->setEditedState(pedited->locallab.lclightness ? Edited : UnEdited);
sensilc->setEditedState(pedited->locallab.sensilc ? Edited : UnEdited);
// Contrast by detail levels
expcbdl->set_inconsistent(!pedited->locallab.expcbdl);
@@ -1110,17 +1160,26 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.chrrt.push_back(0);
pp->locallab.neigh.push_back(50);
pp->locallab.vart.push_back(200);
pp->locallab.dehaz.push_back(0);
pp->locallab.sensih.push_back(19);
pp->locallab.localTgaincurve.push_back({(double)FCT_MinMaxCPoints, 0.0, 0.12, 0.35, 0.35, 0.70, 0.50, 0.35, 0.35, 1.00, 0.12, 0.35, 0.35});
pp->locallab.inversret.push_back(0);
// Sharpening
pp->locallab.expsharp.push_back(0);
pp->locallab.sharcontrast.push_back(20);
pp->locallab.sharradius.push_back(40);
pp->locallab.sharamount.push_back(75);
pp->locallab.sharamount.push_back(100);
pp->locallab.shardamping.push_back(75);
pp->locallab.shariter.push_back(30);
pp->locallab.sensisha.push_back(19);
pp->locallab.inverssha.push_back(0);
//local contrast
pp->locallab.expcontrast.push_back(0);
pp->locallab.lcradius.push_back(80);
pp->locallab.lcamount.push_back(0);
pp->locallab.lcdarkness.push_back(100);
pp->locallab.lclightness.push_back(100);
pp->locallab.sensilc.push_back(19);
// Contrast by detail levels
pp->locallab.expcbdl.push_back(0);
@@ -1241,17 +1300,26 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.chrrt.erase(pp->locallab.chrrt.begin() + i);
pp->locallab.neigh.erase(pp->locallab.neigh.begin() + i);
pp->locallab.vart.erase(pp->locallab.vart.begin() + i);
pp->locallab.dehaz.erase(pp->locallab.dehaz.begin() + i);
pp->locallab.sensih.erase(pp->locallab.sensih.begin() + i);
pp->locallab.localTgaincurve.erase(pp->locallab.localTgaincurve.begin() + i);
pp->locallab.inversret.erase(pp->locallab.inversret.begin() + i);
// Sharpening
pp->locallab.expsharp.erase(pp->locallab.expsharp.begin() + i);
pp->locallab.sharcontrast.erase(pp->locallab.sharcontrast.begin() + i);
pp->locallab.sharradius.erase(pp->locallab.sharradius.begin() + i);
pp->locallab.sharamount.erase(pp->locallab.sharamount.begin() + i);
pp->locallab.shardamping.erase(pp->locallab.shardamping.begin() + i);
pp->locallab.shariter.erase(pp->locallab.shariter.begin() + i);
pp->locallab.sensisha.erase(pp->locallab.sensisha.begin() + i);
pp->locallab.inverssha.erase(pp->locallab.inverssha.begin() + i);
//local contrast
pp->locallab.expcontrast.erase(pp->locallab.expcontrast.begin() + i);
pp->locallab.lcradius.erase(pp->locallab.lcradius.begin() + i);
pp->locallab.lcamount.erase(pp->locallab.lcamount.begin() + i);
pp->locallab.lcdarkness.erase(pp->locallab.lcdarkness.begin() + i);
pp->locallab.lclightness.erase(pp->locallab.lcradius.begin() + i);
pp->locallab.sensilc.erase(pp->locallab.sensilc.begin() + i);
// Contrast by detail levels
pp->locallab.expcbdl.erase(pp->locallab.expcbdl.begin() + i);
@@ -1449,17 +1517,26 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.chrrt.at(pp->locallab.selspot) = chrrt->getIntValue();
pp->locallab.neigh.at(pp->locallab.selspot) = neigh->getIntValue();
pp->locallab.vart.at(pp->locallab.selspot) = vart->getIntValue();
pp->locallab.dehaz.at(pp->locallab.selspot) = dehaz->getIntValue();
pp->locallab.sensih.at(pp->locallab.selspot) = sensih->getIntValue();
pp->locallab.localTgaincurve.at(pp->locallab.selspot) = cTgainshape->getCurve();
pp->locallab.inversret.at(pp->locallab.selspot) = inversret->get_active();
// Sharpening
pp->locallab.expsharp.at(pp->locallab.selspot) = (int)expsharp->getEnabled();
pp->locallab.sharcontrast.at(pp->locallab.selspot) = sharcontrast->getIntValue();
pp->locallab.sharradius.at(pp->locallab.selspot) = sharradius->getIntValue();
pp->locallab.sharamount.at(pp->locallab.selspot) = sharamount->getIntValue();
pp->locallab.shardamping.at(pp->locallab.selspot) = shardamping->getIntValue();
pp->locallab.shariter.at(pp->locallab.selspot) = shariter->getIntValue();
pp->locallab.sensisha.at(pp->locallab.selspot) = sensisha->getIntValue();
pp->locallab.inverssha.at(pp->locallab.selspot) = (int)inverssha->get_active();
//local contrast
pp->locallab.expcontrast.at(pp->locallab.selspot) = (int)expcontrast->getEnabled();
pp->locallab.lcradius.at(pp->locallab.selspot) = lcradius->getIntValue();
pp->locallab.lcamount.at(pp->locallab.selspot) = lcamount->getIntValue();
pp->locallab.lcdarkness.at(pp->locallab.selspot) = lcdarkness->getIntValue();
pp->locallab.lclightness.at(pp->locallab.selspot) = lclightness->getIntValue();
pp->locallab.sensilc.at(pp->locallab.selspot) = sensilc->getIntValue();
// Contrast by detail levels
pp->locallab.expcbdl.at(pp->locallab.selspot) = (int)expcbdl->getEnabled();
@@ -1572,17 +1649,26 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.chrrt = chrrt->getEditedState();
pedited->locallab.neigh = neigh->getEditedState();
pedited->locallab.vart = vart->getEditedState();
pedited->locallab.dehaz = dehaz->getEditedState();
pedited->locallab.sensih = sensih->getEditedState();
pedited->locallab.localTgaincurve = !cTgainshape->isUnChanged();
pedited->locallab.inversret = !inversret->get_inconsistent();
// Sharpening
pedited->locallab.expsharp = !expsharp->get_inconsistent();
pedited->locallab.sharcontrast = sharcontrast->getEditedState();
pedited->locallab.sharradius = sharradius->getEditedState();
pedited->locallab.sharamount = sharamount->getEditedState();
pedited->locallab.shardamping = shardamping->getEditedState();
pedited->locallab.shariter = shariter->getEditedState();
pedited->locallab.sensisha = sensisha->getEditedState();
pedited->locallab.inverssha = !inverssha->get_inconsistent();
//local contrast
pedited->locallab.expcontrast = !expcontrast->get_inconsistent();
pedited->locallab.lcradius = lcradius->getEditedState();
pedited->locallab.lcamount = lcamount->getEditedState();
pedited->locallab.lcdarkness = lcdarkness->getEditedState();
pedited->locallab.lclightness = lclightness->getEditedState();
pedited->locallab.sensilc = sensilc->getEditedState();
// Contrast by detail levels
pedited->locallab.expcbdl = !expcbdl->get_inconsistent();
@@ -1986,8 +2072,10 @@ void Locallab::inversretChanged()
// Update Retinex GUI according to inversret button state (to be compliant with updateSpecificGUIState function)
if (inversret->get_active()) {
sensih->hide();
dehaz->hide();
} else {
sensih->show();
dehaz->show();
}
if (getEnabled() && expreti->getEnabled()) {
@@ -2443,6 +2531,12 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
}
}
if (a == dehaz) {
if (listener) {
listener->panelChanged(Evlocallabdehaz, dehaz->getTextValue());
}
}
if (a == sensih) {
if (listener) {
listener->panelChanged(Evlocallabsensih, sensih->getTextValue());
@@ -2452,6 +2546,12 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
// Sharpening
if (getEnabled() && expsharp->getEnabled()) {
if (a == sharcontrast) {
if (listener) {
listener->panelChanged(Evlocallabsharcontrast, sharcontrast->getTextValue());
}
}
if (a == sharradius) {
if (listener) {
listener->panelChanged(Evlocallabsharradius, sharradius->getTextValue());
@@ -2483,6 +2583,39 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
}
}
//local contrast
if (getEnabled() && expcontrast->getEnabled()) {
if (a == lcradius) {
if (listener) {
listener->panelChanged(Evlocallablcradius, lcradius->getTextValue());
}
}
if (a == lcamount) {
if (listener) {
listener->panelChanged(Evlocallablcamount, lcamount->getTextValue());
}
}
if (a == lcdarkness) {
if (listener) {
listener->panelChanged(Evlocallablcdarkness, lcdarkness->getTextValue());
}
}
if (a == lclightness) {
if (listener) {
listener->panelChanged(Evlocallablclightness, lclightness->getTextValue());
}
}
if (a == sensilc) {
if (listener) {
listener->panelChanged(Evlocallabsensilc, sensilc->getTextValue());
}
}
}
// Contrast by detail levels
if (getEnabled() && expcbdl->getEnabled()) {
if (a == multiplier[0] || a == multiplier[1] || a == multiplier[2] || a == multiplier[3] || a == multiplier[4]) {
@@ -2719,10 +2852,16 @@ void Locallab::setBatchMode(bool batchMode)
sensiden->showEditedCB();
noisechroc->showEditedCB();
noiselumf->showEditedCB();
sharcontrast->showEditedCB();
sharradius->showEditedCB();
sharamount->showEditedCB();
shardamping->showEditedCB();
shariter->showEditedCB();
lcradius->showEditedCB();
lcamount->showEditedCB();
lcdarkness->showEditedCB();
lclightness->showEditedCB();
sensilc->showEditedCB();
sensisha->showEditedCB();
sensi->showEditedCB();
sensiex->showEditedCB();
@@ -2740,6 +2879,7 @@ void Locallab::setBatchMode(bool batchMode)
str->showEditedCB();
neigh->showEditedCB();
vart->showEditedCB();
dehaz->showEditedCB();
LocalcurveEditorgainT->setBatchMode(batchMode);
llCurveEditorG->setBatchMode(batchMode);
chrrt->showEditedCB();
@@ -2907,6 +3047,8 @@ void Locallab::enableListener()
inversshaConn.block(false);
// Contrast by detail levels
enablecbdlConn.block(false);
//local contrast
enablecontrastConn.block(false);
// Denoise
enabledenoiConn.block(false);
avoidConn.block(false);
@@ -2944,6 +3086,8 @@ void Locallab::disableListener()
inversshaConn.block(true);
// Contrast by detail levels
enablecbdlConn.block(true);
//local contrast
enablecontrastConn.block(true);
// Denoise
enabledenoiConn.block(true);
avoidConn.block(true);
@@ -3045,12 +3189,14 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int
chrrt->setValue(pp->locallab.chrrt.at(index));
neigh->setValue(pp->locallab.neigh.at(index));
vart->setValue(pp->locallab.vart.at(index));
dehaz->setValue(pp->locallab.dehaz.at(index));
sensih->setValue(pp->locallab.sensih.at(index));
cTgainshape->setCurve(pp->locallab.localTgaincurve.at(index));
inversret->set_active((bool)pp->locallab.inversret.at(index));
// Sharpening
expsharp->setEnabled((bool)pp->locallab.expsharp.at(index));
sharcontrast->setValue(pp->locallab.sharcontrast.at(index));
sharradius->setValue(pp->locallab.sharradius.at(index));
sharamount->setValue(pp->locallab.sharamount.at(index));
shardamping->setValue(pp->locallab.shardamping.at(index));
@@ -3058,6 +3204,13 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int
sensisha->setValue(pp->locallab.sensisha.at(index));
inverssha->set_active((bool)pp->locallab.inverssha.at(index));
//local contrast
expcontrast->setEnabled((bool)pp->locallab.expcontrast.at(index));
lcradius->setValue(pp->locallab.lcradius.at(index));
lcamount->setValue(pp->locallab.lcamount.at(index));
lcdarkness->setValue(pp->locallab.lcdarkness.at(index));
lclightness->setValue(pp->locallab.lclightness.at(index));
sensilc->setValue(pp->locallab.sensilc.at(index));
// Contrast by detail levels
expcbdl->setEnabled((bool)pp->locallab.expcbdl.at(index));

View File

@@ -51,9 +51,10 @@ private:
MyExpander* const exptonemap;
MyExpander* const expreti;
MyExpander* const expsharp;
MyExpander* const expcontrast;
MyExpander* const expcbdl;
MyExpander* const expdenoi;
sigc::connection enablecolorConn, enableexposeConn, enablevibranceConn, enableblurConn, enabletonemapConn, enableretiConn, enablesharpConn, enablecbdlConn, enabledenoiConn;
sigc::connection enablecolorConn, enableexposeConn, enablevibranceConn, enableblurConn, enabletonemapConn, enableretiConn, enablesharpConn, enablecontrastConn, enablecbdlConn, enabledenoiConn;
// Curve widgets
// Color & Light
@@ -106,13 +107,21 @@ private:
Adjuster* const chrrt;
Adjuster* const neigh;
Adjuster* const vart;
Adjuster* const dehaz;
Adjuster* const sensih;
// Sharpening
Adjuster* const sharcontrast;
Adjuster* const sharradius;
Adjuster* const sharamount;
Adjuster* const shardamping;
Adjuster* const shariter;
Adjuster* const sensisha;
//local contrast
Adjuster* const lcradius;
Adjuster* const lcamount;
Adjuster* const lcdarkness;
Adjuster* const lclightness;
Adjuster* const sensilc;
// Contrast by detail levels
Adjuster* multiplier[5];
Adjuster* const chromacbdl;

View File

@@ -407,17 +407,26 @@ void ParamsEdited::set(bool v)
locallab.chrrt = v;
locallab.neigh = v;
locallab.vart = v;
locallab.dehaz = v;
locallab.sensih = v;
locallab.localTgaincurve = v;
locallab.inversret = v;
// Sharpening
locallab.expsharp = v;
locallab.sharcontrast = v;
locallab.sharradius = v;
locallab.sharamount = v;
locallab.shardamping = v;
locallab.shariter = v;
locallab.sensisha = v;
locallab.inverssha = v;
//local contrast
locallab.expcontrast = v;
locallab.lcradius = v;
locallab.lcamount = v;
locallab.lcdarkness = v;
locallab.lclightness = v;
locallab.sensilc = v;
// Contrast by detail levels
locallab.expcbdl = v;
@@ -1090,17 +1099,26 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.chrrt = locallab.chrrt && p.locallab.chrrt == other.locallab.chrrt;
locallab.neigh = locallab.neigh && p.locallab.neigh == other.locallab.neigh;
locallab.vart = locallab.vart && p.locallab.vart == other.locallab.vart;
locallab.dehaz = locallab.dehaz && p.locallab.dehaz == other.locallab.dehaz;
locallab.sensih = locallab.sensih && p.locallab.sensih == other.locallab.sensih;
locallab.localTgaincurve = locallab.localTgaincurve && p.locallab.localTgaincurve == other.locallab.localTgaincurve;
locallab.inversret = locallab.inversret && p.locallab.inversret == other.locallab.inversret;
// Sharpening
locallab.expsharp = locallab.expsharp && p.locallab.expsharp == other.locallab.expsharp;
locallab.sharcontrast = locallab.sharcontrast && p.locallab.sharcontrast == other.locallab.sharcontrast;
locallab.sharradius = locallab.sharradius && p.locallab.sharradius == other.locallab.sharradius;
locallab.sharamount = locallab.sharamount && p.locallab.sharamount == other.locallab.sharamount;
locallab.shardamping = locallab.shardamping && p.locallab.shardamping == other.locallab.shardamping;
locallab.shariter = locallab.shariter && p.locallab.shariter == other.locallab.shariter;
locallab.sensisha = locallab.sensisha && p.locallab.sensisha == other.locallab.sensisha;
locallab.inverssha = locallab.inverssha && p.locallab.inverssha == other.locallab.inverssha;
//local contrast
locallab.expcontrast = locallab.expcontrast && p.locallab.expcontrast == other.locallab.expcontrast;
locallab.lcradius = locallab.lcradius && p.locallab.lcradius == other.locallab.lcradius;
locallab.lcamount = locallab.lcamount && p.locallab.lcamount == other.locallab.lcamount;
locallab.lcdarkness = locallab.lcdarkness && p.locallab.lcdarkness == other.locallab.lcdarkness;
locallab.lclightness = locallab.lclightness && p.locallab.lclightness == other.locallab.lclightness;
locallab.sensilc = locallab.sensilc && p.locallab.sensilc == other.locallab.sensilc;
// Contrast by detail levels
locallab.expcbdl = locallab.expcbdl && p.locallab.expcbdl == other.locallab.expcbdl;
@@ -2792,6 +2810,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.vart = mods.locallab.vart;
}
if (locallab.dehaz) {
toEdit.locallab.dehaz = mods.locallab.dehaz;
}
if (locallab.sensih) {
toEdit.locallab.sensih = mods.locallab.sensih;
}
@@ -2809,6 +2831,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.expsharp = mods.locallab.expsharp;
}
if (locallab.sharcontrast) {
toEdit.locallab.sharcontrast = mods.locallab.sharcontrast;
}
if (locallab.sharradius) {
toEdit.locallab.sharradius = mods.locallab.sharradius;
}
@@ -2832,7 +2858,30 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
if (locallab.inverssha) {
toEdit.locallab.inverssha = mods.locallab.inverssha;
}
//local contrast
if (locallab.expcontrast) {
toEdit.locallab.expcontrast = mods.locallab.expcontrast;
}
if (locallab.lcradius) {
toEdit.locallab.lcradius = mods.locallab.lcradius;
}
if (locallab.lcamount) {
toEdit.locallab.lcamount = mods.locallab.lcamount;
}
if (locallab.lcdarkness) {
toEdit.locallab.lcdarkness = mods.locallab.lcdarkness;
}
if (locallab.lclightness) {
toEdit.locallab.lclightness = mods.locallab.lclightness;
}
if (locallab.sensilc) {
toEdit.locallab.sensilc = mods.locallab.sensilc;
}
// Contrast by detail levels
if (locallab.expcbdl) {
toEdit.locallab.expcbdl = mods.locallab.expcbdl;

View File

@@ -537,17 +537,26 @@ public:
bool chrrt;
bool neigh;
bool vart;
bool dehaz;
bool sensih;
bool localTgaincurve;
bool inversret;
// Sharpening
bool expsharp;
bool sharcontrast;
bool sharradius;
bool sharamount;
bool shardamping;
bool shariter;
bool sensisha;
bool inverssha;
//local contrast
bool expcontrast;
bool lcradius;
bool lcamount;
bool lcdarkness;
bool lclightness;
bool sensilc;
// Contrast by detail levels
bool expcbdl;
bool mult[5];