Local adjustments - improvment Dehaze with black (#6860)
* Local Dehaze black * Enable black * Change threshold black - publish_pre_dev_labels ladehazeblack
This commit is contained in:
@@ -796,6 +796,7 @@ LocallabRetinex::LocallabRetinex():
|
||||
dehaz(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZ"), -100, 100, 1, 0))),
|
||||
depth(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEPTH"), 0, 100, 1, 25))),
|
||||
dehazeSaturation(Gtk::manage(new Adjuster(M("TP_DEHAZE_SATURATION"), 0, 100, 1, 50))),
|
||||
dehazeblack(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DEHAZE_BLACK"), -65., 100., 1., 0.))),
|
||||
retiFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RETIFRA")))),
|
||||
str(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STR"), 0., 100., 0.2, 0.))),
|
||||
loglin(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LOGLIN")))),
|
||||
@@ -848,6 +849,10 @@ LocallabRetinex::LocallabRetinex():
|
||||
Lmaskretishape(static_cast<DiagonalCurveEditor*>(mask2retiCurveEditorG->addCurve(CT_Diagonal, "L(L)"))),
|
||||
inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS"))))
|
||||
{
|
||||
|
||||
auto m = ProcEventMapper::getInstance();
|
||||
Evlocallabdehazeblack = m->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_DEHAZE_BLACK");
|
||||
|
||||
set_orientation(Gtk::ORIENTATION_VERTICAL);
|
||||
|
||||
const LocallabParams::LocallabSpot defSpot;
|
||||
@@ -857,6 +862,7 @@ LocallabRetinex::LocallabRetinex():
|
||||
|
||||
dehazeSaturation->setAdjusterListener(this);
|
||||
depth->setAdjusterListener(this);
|
||||
dehazeblack->setAdjusterListener(this);
|
||||
|
||||
retiFrame->set_label_align(0.025, 0.5);
|
||||
|
||||
@@ -991,6 +997,7 @@ LocallabRetinex::LocallabRetinex():
|
||||
dehaBox->pack_start(*dehaz);
|
||||
dehaBox->pack_start(*depth);
|
||||
dehaBox->pack_start(*dehazeSaturation);
|
||||
dehaBox->pack_start(*dehazeblack);
|
||||
dehaFrame->add(*dehaBox);
|
||||
auxBox->add(*dehaFrame);
|
||||
ToolParamBlock* const deharetiBox = Gtk::manage(new ToolParamBlock());
|
||||
@@ -1247,6 +1254,7 @@ void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const Par
|
||||
dehaz->setValue((double)spot.dehaz);
|
||||
depth->setValue((double)spot.depth);
|
||||
dehazeSaturation->setValue((double)spot.dehazeSaturation);
|
||||
dehazeblack->setValue((double)spot.dehazeblack);
|
||||
str->setValue(spot.str);
|
||||
loglin->set_active(spot.loglin);
|
||||
sensih->setValue((double)spot.sensih);
|
||||
@@ -1325,6 +1333,7 @@ void LocallabRetinex::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
||||
spot.dehaz = dehaz->getIntValue();
|
||||
spot.depth = depth->getIntValue();
|
||||
spot.dehazeSaturation = dehazeSaturation->getIntValue();
|
||||
spot.dehazeblack = dehazeblack->getValue();
|
||||
spot.str = str->getValue();
|
||||
spot.loglin = loglin->get_active();
|
||||
spot.sensih = sensih->getIntValue();
|
||||
@@ -1383,6 +1392,7 @@ void LocallabRetinex::setDefaults(const rtengine::procparams::ProcParams* defPar
|
||||
// Set default values for adjuster widgets
|
||||
dehaz->setDefault((double)defSpot.dehaz);
|
||||
dehazeSaturation->setDefault((double)defSpot.dehazeSaturation);
|
||||
dehazeblack->setDefault((double)defSpot.dehazeblack);
|
||||
depth->setDefault((double)defSpot.depth);
|
||||
str->setDefault(defSpot.str);
|
||||
sensih->setDefault((double)defSpot.sensih);
|
||||
@@ -1438,6 +1448,13 @@ void LocallabRetinex::adjusterChanged(Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
if (a == dehazeblack) {
|
||||
if (listener) {
|
||||
listener->panelChanged(Evlocallabdehazeblack,
|
||||
dehazeblack->getTextValue() + " (" + escapeHtmlChars(getSpotName()) + ")");
|
||||
}
|
||||
}
|
||||
|
||||
if (a == depth) {
|
||||
if (listener) {
|
||||
listener->panelChanged(Evlocallabdepth,
|
||||
|
Reference in New Issue
Block a user