Dehaz enhancement HSL GUI bugs partialpaste...

This commit is contained in:
Desmis
2015-09-09 20:01:27 +02:00
parent 6cdc6e1fe4
commit 528d85b1f9
24 changed files with 273 additions and 40 deletions

View File

@@ -159,10 +159,27 @@ void DehazParams::getDefaultCDCurve(std::vector<double> &curve)
}
}
void DehazParams::getDefaultCDHCurve(std::vector<double> &curve)
{
double v[6] = { 0.00, 0.00,
0.5, 0.5,
1.0, 1.0,
};
curve.resize(7);
curve.at(0) = double(DCT_NURBS);
for (size_t i = 1; i < curve.size(); ++i) {
curve.at(i) = v[i - 1];
}
}
void DehazParams::setDefaults()
{
enabled = false;
str = 60;
str = 30;
scal = 3;
neigh = 80;
gain = 100;
@@ -171,6 +188,7 @@ void DehazParams::setDefaults()
limd = 8;
getDefaulttransmissionCurve(transmissionCurve);
getDefaultCDCurve(cdcurve);
getDefaultCDHCurve(cdHcurve);
dehazmet = "uni";
dehazcolorspace = "Lab";
retinex = false;
@@ -1502,6 +1520,11 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol
Glib::ArrayHandle<double> cdcurve = dehaz.cdcurve;
keyFile.set_double_list("Dehaz", "CDCurve", cdcurve);
}
if (!pedited || pedited->dehaz.cdHcurve) {
Glib::ArrayHandle<double> cdHcurve = dehaz.cdHcurve;
keyFile.set_double_list("Dehaz", "CDHCurve", cdHcurve);
}
if (!pedited || pedited->dehaz.transmissionCurve) {
Glib::ArrayHandle<double> transmissionCurve = dehaz.transmissionCurve;
@@ -3872,6 +3895,14 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited)
pedited->dehaz.cdcurve = true;
}
}
if (keyFile.has_key ("Dehaz", "CDHCurve")) {
dehaz.cdHcurve = keyFile.get_double_list ("Dehaz", "CDHCurve");
if (pedited) {
pedited->dehaz.cdHcurve = true;
}
}
if (keyFile.has_key ("Dehaz", "TransmissionCurve")) {
dehaz.transmissionCurve = keyFile.get_double_list ("Dehaz", "TransmissionCurve");
@@ -7243,6 +7274,7 @@ bool ProcParams::operator== (const ProcParams& other)
&& toneCurve.hrenabled == other.toneCurve.hrenabled
&& toneCurve.method == other.toneCurve.method
&& dehaz.cdcurve == other.dehaz.cdcurve
&& dehaz.cdHcurve == other.dehaz.cdHcurve
&& dehaz.transmissionCurve == other.dehaz.transmissionCurve
&& dehaz.str == other.dehaz.str
&& dehaz.scal == other.dehaz.scal