Added slider sigmabl - disactivated blurcbdl

This commit is contained in:
Desmis 2020-04-21 10:32:38 +02:00
parent 266b219f0a
commit f2d867bef1
10 changed files with 35 additions and 3 deletions

View File

@ -1151,6 +1151,7 @@ HISTORY_MSG_910;Local - Wavelet Edge performance
HISTORY_MSG_911;Local - Blur Chroma Luma HISTORY_MSG_911;Local - Blur Chroma Luma
HISTORY_MSG_912;Local - Blur Guide filter strength HISTORY_MSG_912;Local - Blur Guide filter strength
HISTORY_MSG_913;Local - Contrast Wavelet Sigma DR HISTORY_MSG_913;Local - Contrast Wavelet Sigma DR
HISTORY_MSG_914;Local - Blur Wavelet Sigma BL
HISTORY_MSG_CAT02PRESET;Cat02 automatic preset HISTORY_MSG_CAT02PRESET;Cat02 automatic preset
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction

View File

@ -864,7 +864,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
int local_sensicb = locallab.spots.at(sp).sensicb; int local_sensicb = locallab.spots.at(sp).sensicb;
float local_clarityml = (float) locallab.spots.at(sp).clarityml; float local_clarityml = (float) locallab.spots.at(sp).clarityml;
float local_contresid = (float) locallab.spots.at(sp).contresid; float local_contresid = (float) locallab.spots.at(sp).contresid;
int local_blurcbdl = (float) locallab.spots.at(sp).blurcbdl; int local_blurcbdl = 0; //(float) locallab.spots.at(sp).blurcbdl;
int local_contrast = locallab.spots.at(sp).contrast; int local_contrast = locallab.spots.at(sp).contrast;
float local_lightness = (float) locallab.spots.at(sp).lightness; float local_lightness = (float) locallab.spots.at(sp).lightness;
float labgridALowloc = locallab.spots.at(sp).labgridALow; float labgridALowloc = locallab.spots.at(sp).labgridALow;

View File

@ -936,6 +936,7 @@ enum ProcEventCode {
EvlocallabchroMethod = 910, EvlocallabchroMethod = 910,
Evlocallabstrbl = 911, Evlocallabstrbl = 911,
Evlocallabsigmadr = 912, Evlocallabsigmadr = 912,
Evlocallabsigmabl = 913,
NUMOFEVENTS NUMOFEVENTS
}; };

View File

@ -2822,6 +2822,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
residcont(0.0), residcont(0.0),
residblur(0.0), residblur(0.0),
levelblur(0.0), levelblur(0.0),
sigmabl(1.0),
residchro(0.0), residchro(0.0),
residcomp(0.0), residcomp(0.0),
sigma(1.0), sigma(1.0),
@ -3265,6 +3266,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& residcont == other.residcont && residcont == other.residcont
&& residblur == other.residblur && residblur == other.residblur
&& levelblur == other.levelblur && levelblur == other.levelblur
&& sigmabl == other.sigmabl
&& residchro == other.residchro && residchro == other.residchro
&& residcomp == other.residcomp && residcomp == other.residcomp
&& sigma == other.sigma && sigma == other.sigma
@ -4704,6 +4706,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residcont, "Locallab", "Residcont_" + std::to_string(i), spot.residcont, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residcont, "Locallab", "Residcont_" + std::to_string(i), spot.residcont, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residblur, "Locallab", "Residblur_" + std::to_string(i), spot.residblur, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residblur, "Locallab", "Residblur_" + std::to_string(i), spot.residblur, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).levelblur, "Locallab", "Levelblur_" + std::to_string(i), spot.levelblur, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).levelblur, "Locallab", "Levelblur_" + std::to_string(i), spot.levelblur, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sigmabl, "Locallab", "Sigmabl_" + std::to_string(i), spot.sigmabl, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residchro, "Locallab", "Residchro_" + std::to_string(i), spot.residchro, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residchro, "Locallab", "Residchro_" + std::to_string(i), spot.residchro, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residcomp, "Locallab", "Residcomp_" + std::to_string(i), spot.residcomp, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).residcomp, "Locallab", "Residcomp_" + std::to_string(i), spot.residcomp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sigma, "Locallab", "Sigma_" + std::to_string(i), spot.sigma, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).sigma, "Locallab", "Sigma_" + std::to_string(i), spot.sigma, keyFile);
@ -6348,6 +6351,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Residcont_" + std::to_string(i), pedited, spot.residcont, spotEdited.residcont); assignFromKeyfile(keyFile, "Locallab", "Residcont_" + std::to_string(i), pedited, spot.residcont, spotEdited.residcont);
assignFromKeyfile(keyFile, "Locallab", "Residblur_" + std::to_string(i), pedited, spot.residblur, spotEdited.residblur); assignFromKeyfile(keyFile, "Locallab", "Residblur_" + std::to_string(i), pedited, spot.residblur, spotEdited.residblur);
assignFromKeyfile(keyFile, "Locallab", "Levelblur_" + std::to_string(i), pedited, spot.levelblur, spotEdited.levelblur); assignFromKeyfile(keyFile, "Locallab", "Levelblur_" + std::to_string(i), pedited, spot.levelblur, spotEdited.levelblur);
assignFromKeyfile(keyFile, "Locallab", "Sigmabl_" + std::to_string(i), pedited, spot.sigmabl, spotEdited.sigmabl);
assignFromKeyfile(keyFile, "Locallab", "Residchro_" + std::to_string(i), pedited, spot.residchro, spotEdited.residchro); assignFromKeyfile(keyFile, "Locallab", "Residchro_" + std::to_string(i), pedited, spot.residchro, spotEdited.residchro);
assignFromKeyfile(keyFile, "Locallab", "Residcomp_" + std::to_string(i), pedited, spot.residcomp, spotEdited.residcomp); assignFromKeyfile(keyFile, "Locallab", "Residcomp_" + std::to_string(i), pedited, spot.residcomp, spotEdited.residcomp);
assignFromKeyfile(keyFile, "Locallab", "Sigma_" + std::to_string(i), pedited, spot.sigma, spotEdited.sigma); assignFromKeyfile(keyFile, "Locallab", "Sigma_" + std::to_string(i), pedited, spot.sigma, spotEdited.sigma);

View File

@ -1298,6 +1298,7 @@ struct LocallabParams {
double residcont; double residcont;
double residblur; double residblur;
double levelblur; double levelblur;
double sigmabl;
double residchro; double residchro;
double residcomp; double residcomp;
double sigma; double sigma;

View File

@ -939,7 +939,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, // EvLocallabSpotwavMethod LUMINANCECURVE, // EvLocallabSpotwavMethod
LUMINANCECURVE, // EvlocallabchroMethod LUMINANCECURVE, // EvlocallabchroMethod
LUMINANCECURVE, // Evlocallabstrbl LUMINANCECURVE, // Evlocallabstrbl
LUMINANCECURVE // Evlocallabsigmadr LUMINANCECURVE, // Evlocallabsigmadr
LUMINANCECURVE // Evlocallabsigmabl
}; };

View File

@ -919,6 +919,7 @@ private:
Gtk::Frame* const blurlevelFrame; Gtk::Frame* const blurlevelFrame;
Gtk::CheckButton* const wavblur; Gtk::CheckButton* const wavblur;
Adjuster* const levelblur; Adjuster* const levelblur;
Adjuster* const sigmabl;
Adjuster* const chromablu; Adjuster* const chromablu;
CurveEditorGroup* const LocalcurveEditorwavlev; CurveEditorGroup* const LocalcurveEditorwavlev;
FlatCurveEditor* const wavshapelev; FlatCurveEditor* const wavshapelev;

View File

@ -2040,6 +2040,7 @@ LocallabContrast::LocallabContrast():
blurlevelFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_BLURLEVELFRA")))), blurlevelFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_BLURLEVELFRA")))),
wavblur(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLURLEVELFRA")))), wavblur(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_BLURLEVELFRA")))),
levelblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LEVELBLUR"), 0., 100., 0.5, 0.))), levelblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LEVELBLUR"), 0., 100., 0.5, 0.))),
sigmabl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 2.5, 0.01, 1.))),
chromablu(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMABLU"), 0.01, 5., 0.01, 1.))), chromablu(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMABLU"), 0.01, 5., 0.01, 1.))),
LocalcurveEditorwavlev(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVLEV"))), LocalcurveEditorwavlev(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVLEV"))),
wavshapelev(static_cast<FlatCurveEditor*>(LocalcurveEditorwavlev->addCurve(CT_Flat, "", nullptr, false, false))), wavshapelev(static_cast<FlatCurveEditor*>(LocalcurveEditorwavlev->addCurve(CT_Flat, "", nullptr, false, false))),
@ -2211,6 +2212,7 @@ LocallabContrast::LocallabContrast():
wavblurConn = wavblur->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavblurChanged)); wavblurConn = wavblur->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavblurChanged));
levelblur->setAdjusterListener(this); levelblur->setAdjusterListener(this);
sigmabl->setAdjusterListener(this);
chromablu->setAdjusterListener(this); chromablu->setAdjusterListener(this);
@ -2432,6 +2434,7 @@ LocallabContrast::LocallabContrast():
Gtk::VBox* const blurlevcontBox = Gtk::manage(new Gtk::VBox()); Gtk::VBox* const blurlevcontBox = Gtk::manage(new Gtk::VBox());
blurlevcontBox->set_spacing(2); blurlevcontBox->set_spacing(2);
blurlevcontBox->pack_start(*levelblur); blurlevcontBox->pack_start(*levelblur);
blurlevcontBox->pack_start(*sigmabl);
blurlevcontBox->pack_start(*chromablu); blurlevcontBox->pack_start(*chromablu);
blurlevcontBox->pack_start(*LocalcurveEditorwavlev, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor blurlevcontBox->pack_start(*LocalcurveEditorwavlev, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
Gtk::HSeparator* const separatorblu = Gtk::manage(new Gtk::HSeparator()); Gtk::HSeparator* const separatorblu = Gtk::manage(new Gtk::HSeparator());
@ -2638,6 +2641,7 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa
wavblur->set_active(pp->locallab.spots.at(index).wavblur); wavblur->set_active(pp->locallab.spots.at(index).wavblur);
levelblur->setValue(pp->locallab.spots.at(index).levelblur); levelblur->setValue(pp->locallab.spots.at(index).levelblur);
sigmabl->setValue(pp->locallab.spots.at(index).sigmabl);
chromablu->setValue(pp->locallab.spots.at(index).chromablu); chromablu->setValue(pp->locallab.spots.at(index).chromablu);
wavshapelev->setCurve(pp->locallab.spots.at(index).loclevwavcurve); wavshapelev->setCurve(pp->locallab.spots.at(index).loclevwavcurve);
residblur->setValue(pp->locallab.spots.at(index).residblur); residblur->setValue(pp->locallab.spots.at(index).residblur);
@ -2754,6 +2758,7 @@ void LocallabContrast::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
pp->locallab.spots.at(index).wavblur = wavblur->get_active(); pp->locallab.spots.at(index).wavblur = wavblur->get_active();
pp->locallab.spots.at(index).levelblur = levelblur->getValue(); pp->locallab.spots.at(index).levelblur = levelblur->getValue();
pp->locallab.spots.at(index).sigmabl = sigmabl->getValue();
pp->locallab.spots.at(index).chromablu = chromablu->getValue(); pp->locallab.spots.at(index).chromablu = chromablu->getValue();
pp->locallab.spots.at(index).loclevwavcurve = wavshapelev->getCurve(); pp->locallab.spots.at(index).loclevwavcurve = wavshapelev->getCurve();
pp->locallab.spots.at(index).residblur = residblur->getValue(); pp->locallab.spots.at(index).residblur = residblur->getValue();
@ -2818,6 +2823,7 @@ void LocallabContrast::setDefaults(const rtengine::procparams::ProcParams* defPa
edgw->setDefault(defSpot.edgw); edgw->setDefault(defSpot.edgw);
basew->setDefault(defSpot.basew); basew->setDefault(defSpot.basew);
levelblur->setDefault(defSpot.levelblur); levelblur->setDefault(defSpot.levelblur);
sigmabl->setDefault(defSpot.sigmabl);
chromablu->setDefault(defSpot.chromablu); chromablu->setDefault(defSpot.chromablu);
residblur->setDefault(defSpot.residblur); residblur->setDefault(defSpot.residblur);
sigma->setDefault(defSpot.sigma); sigma->setDefault(defSpot.sigma);
@ -2994,6 +3000,13 @@ void LocallabContrast::adjusterChanged(Adjuster* a, double newval)
} }
} }
if (a == sigmabl) {
if (listener) {
listener->panelChanged(Evlocallabsigmabl,
sigmabl->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
}
}
if (a == chromablu) { if (a == chromablu) {
if (listener) { if (listener) {
listener->panelChanged(Evlocallabchromablu, listener->panelChanged(Evlocallabchromablu,
@ -3457,6 +3470,7 @@ void LocallabContrast::updateContrastGUI1()
edgw->hide(); edgw->hide();
basew->hide(); basew->hide();
levelblur->hide(); levelblur->hide();
sigmabl->hide();
chromablu->hide(); chromablu->hide();
LocalcurveEditorwavlev->hide(); LocalcurveEditorwavlev->hide();
residblur->hide(); residblur->hide();
@ -3496,6 +3510,7 @@ void LocallabContrast::updateContrastGUI1()
edgw->show(); edgw->show();
basew->show(); basew->show();
levelblur->show(); levelblur->show();
sigmabl->show();
chromablu->show(); chromablu->show();
LocalcurveEditorwavlev->show(); LocalcurveEditorwavlev->show();
residblur->show(); residblur->show();
@ -3748,7 +3763,7 @@ LocallabCBDL::LocallabCBDL():
pack_start(*separator, Gtk::PACK_SHRINK, 2); pack_start(*separator, Gtk::PACK_SHRINK, 2);
pack_start(*chromacbdl); pack_start(*chromacbdl);
pack_start(*threshold); pack_start(*threshold);
pack_start(*blurcbdl); // pack_start(*blurcbdl);
ToolParamBlock* const residBox = Gtk::manage(new ToolParamBlock()); ToolParamBlock* const residBox = Gtk::manage(new ToolParamBlock());
residBox->pack_start(*clarityml); residBox->pack_start(*clarityml);
residBox->pack_start(*contresid); residBox->pack_start(*contresid);

View File

@ -1325,6 +1325,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).residcont = locallab.spots.at(j).residcont && pSpot.residcont == otherSpot.residcont; locallab.spots.at(j).residcont = locallab.spots.at(j).residcont && pSpot.residcont == otherSpot.residcont;
locallab.spots.at(j).residblur = locallab.spots.at(j).residblur && pSpot.residblur == otherSpot.residblur; locallab.spots.at(j).residblur = locallab.spots.at(j).residblur && pSpot.residblur == otherSpot.residblur;
locallab.spots.at(j).levelblur = locallab.spots.at(j).levelblur && pSpot.levelblur == otherSpot.levelblur; locallab.spots.at(j).levelblur = locallab.spots.at(j).levelblur && pSpot.levelblur == otherSpot.levelblur;
locallab.spots.at(j).sigmabl = locallab.spots.at(j).sigmabl && pSpot.sigmabl == otherSpot.sigmabl;
locallab.spots.at(j).residchro = locallab.spots.at(j).residchro && pSpot.residchro == otherSpot.residchro; locallab.spots.at(j).residchro = locallab.spots.at(j).residchro && pSpot.residchro == otherSpot.residchro;
locallab.spots.at(j).residcomp = locallab.spots.at(j).residcomp && pSpot.residcomp == otherSpot.residcomp; locallab.spots.at(j).residcomp = locallab.spots.at(j).residcomp && pSpot.residcomp == otherSpot.residcomp;
locallab.spots.at(j).sigma = locallab.spots.at(j).sigma && pSpot.sigma == otherSpot.sigma; locallab.spots.at(j).sigma = locallab.spots.at(j).sigma && pSpot.sigma == otherSpot.sigma;
@ -4223,6 +4224,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).levelblur = mods.locallab.spots.at(i).levelblur; toEdit.locallab.spots.at(i).levelblur = mods.locallab.spots.at(i).levelblur;
} }
if (locallab.spots.at(i).sigmabl) {
toEdit.locallab.spots.at(i).sigmabl = mods.locallab.spots.at(i).sigmabl;
}
if (locallab.spots.at(i).residchro) { if (locallab.spots.at(i).residchro) {
toEdit.locallab.spots.at(i).residchro = mods.locallab.spots.at(i).residchro; toEdit.locallab.spots.at(i).residchro = mods.locallab.spots.at(i).residchro;
} }
@ -5989,6 +5994,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
residcont(v), residcont(v),
residblur(v), residblur(v),
levelblur(v), levelblur(v),
sigmabl(v),
residchro(v), residchro(v),
residcomp(v), residcomp(v),
sigma(v), sigma(v),
@ -6425,6 +6431,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
residcont = v; residcont = v;
residblur = v; residblur = v;
levelblur = v; levelblur = v;
sigmabl = v;
residchro = v; residchro = v;
residcomp = v; residcomp = v;
sigma = v; sigma = v;

View File

@ -725,6 +725,7 @@ public:
bool residcont; bool residcont;
bool residblur; bool residblur;
bool levelblur; bool levelblur;
bool sigmabl;
bool residchro; bool residchro;
bool residcomp; bool residcomp;
bool sigma; bool sigma;