Improve TM with normalize luminance - improve skip for Retinex
This commit is contained in:
parent
3a2d0c4dc6
commit
b3714b3181
@ -940,6 +940,7 @@ HISTORY_MSG_693;Local - Retinex threshold
|
|||||||
HISTORY_MSG_694;Local - Retinex Laplacian threshold
|
HISTORY_MSG_694;Local - Retinex Laplacian threshold
|
||||||
HISTORY_MSG_695;Local - Soft method
|
HISTORY_MSG_695;Local - Soft method
|
||||||
HISTORY_MSG_696;Local - Retinex Normalize
|
HISTORY_MSG_696;Local - Retinex Normalize
|
||||||
|
HISTORY_MSG_697;Local - TM Normalize
|
||||||
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
|
||||||
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
|
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
|
||||||
|
@ -236,6 +236,7 @@ struct local_params {
|
|||||||
bool invrad;
|
bool invrad;
|
||||||
bool invret;
|
bool invret;
|
||||||
bool equret;
|
bool equret;
|
||||||
|
bool equtm;
|
||||||
bool invshar;
|
bool invshar;
|
||||||
bool actsp;
|
bool actsp;
|
||||||
float str;
|
float str;
|
||||||
@ -580,6 +581,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
|
|||||||
int local_sensisf = locallab.spots.at(sp).sensisf;
|
int local_sensisf = locallab.spots.at(sp).sensisf;
|
||||||
bool inverseex = locallab.spots.at(sp).inversex;
|
bool inverseex = locallab.spots.at(sp).inversex;
|
||||||
bool inversesh = locallab.spots.at(sp).inverssh;
|
bool inversesh = locallab.spots.at(sp).inverssh;
|
||||||
|
bool equiltm = locallab.spots.at(sp).equiltm;
|
||||||
|
|
||||||
bool equilret = locallab.spots.at(sp).equilret;
|
bool equilret = locallab.spots.at(sp).equilret;
|
||||||
bool inverserad = false; // Provision
|
bool inverserad = false; // Provision
|
||||||
@ -687,6 +689,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
|
|||||||
lp.invrad = inverserad;
|
lp.invrad = inverserad;
|
||||||
lp.invret = inverseret;
|
lp.invret = inverseret;
|
||||||
lp.equret = equilret;
|
lp.equret = equilret;
|
||||||
|
lp.equtm = equiltm;
|
||||||
lp.invshar = inversesha;
|
lp.invshar = inversesha;
|
||||||
lp.str = str;
|
lp.str = str;
|
||||||
lp.shrad = sharradius;
|
lp.shrad = sharradius;
|
||||||
@ -2622,6 +2625,30 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
|
|||||||
gaussianBlur(originalmask->b, origblurmask->b, bfw, bfh, radius);
|
gaussianBlur(originalmask->b, origblurmask->b, bfw, bfh, radius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(lp.equtm && senstype == 8) {//normalize luminance for Tone mapping
|
||||||
|
float *datain = new float[bfh * bfw];
|
||||||
|
float *data = new float[bfh * bfw];
|
||||||
|
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp parallel for
|
||||||
|
#endif
|
||||||
|
for (int y = ystart; y < yend; y++)
|
||||||
|
for (int x = xstart; x < xend; x++) {
|
||||||
|
datain[(y - ystart) * bfw + (x - xstart)] = original->L[y][x];
|
||||||
|
data[(y - ystart)* bfw + (x - xstart)] = bufexporig->L[y - ystart][x - xstart];
|
||||||
|
}
|
||||||
|
normalize_mean_dt(data, datain, bfh * bfw);
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp parallel for
|
||||||
|
#endif
|
||||||
|
for (int y = ystart; y < yend; y++)
|
||||||
|
for (int x = xstart; x < xend; x++) {
|
||||||
|
bufexporig->L[y - ystart][x - xstart] = data[(y - ystart) * bfw + x - xstart];
|
||||||
|
}
|
||||||
|
delete [] datain;
|
||||||
|
delete [] data;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel if (multiThread)
|
#pragma omp parallel if (multiThread)
|
||||||
@ -5770,6 +5797,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
|||||||
// itera = 5;
|
// itera = 5;
|
||||||
}
|
}
|
||||||
ImProcFunctions::EPDToneMaplocal(sp, bufgb.get(), tmp1.get(), itera, sk);//iterate to 0 calculate with edgstopping, improve result, call=1 dcrop we can put iterate to 5
|
ImProcFunctions::EPDToneMaplocal(sp, bufgb.get(), tmp1.get(), itera, sk);//iterate to 0 calculate with edgstopping, improve result, call=1 dcrop we can put iterate to 5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* //to reactivate if we change transit_shapedetct parameters
|
/* //to reactivate if we change transit_shapedetct parameters
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for schedule(dynamic,16)
|
#pragma omp parallel for schedule(dynamic,16)
|
||||||
|
@ -887,12 +887,17 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b
|
|||||||
// scal
|
// scal
|
||||||
// variance vart
|
// variance vart
|
||||||
//not too bad proposition
|
//not too bad proposition
|
||||||
|
float divsca = 1.f;
|
||||||
|
if(scal >=3) divsca = sqrt(scal / 3.f);
|
||||||
|
|
||||||
if (skip >= 4) {
|
if (skip >= 4) {
|
||||||
nei = (int)(nei / (1.5f * skip) + 2.f)/ sqrt(scal / 3.f);
|
//nei = (int)(0.1f * nei + 2.f); //not too bad
|
||||||
vart *= skip;
|
nei = (int)(nei / (1.5f * skip))/ divsca;
|
||||||
|
vart *= sqrt(skip);
|
||||||
} else if (skip > 1 && skip < 4) {
|
} else if (skip > 1 && skip < 4) {
|
||||||
nei = (int)(nei / skip + 3.f) / sqrt(scal / 3.f);
|
//nei = (int)(0.3f * nei + 2.f);
|
||||||
vart *= skip;
|
nei = (int)(nei / skip) / divsca;
|
||||||
|
vart *= sqrt(skip);
|
||||||
}
|
}
|
||||||
|
|
||||||
int moderetinex = 0;
|
int moderetinex = 0;
|
||||||
|
@ -723,6 +723,7 @@ enum ProcEventCode {
|
|||||||
Evlocallablaplace = 693,
|
Evlocallablaplace = 693,
|
||||||
EvlocallabsoftMethod = 694,
|
EvlocallabsoftMethod = 694,
|
||||||
Evlocallabequilret = 695,
|
Evlocallabequilret = 695,
|
||||||
|
Evlocallabequiltm = 696,
|
||||||
NUMOFEVENTS
|
NUMOFEVENTS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2468,6 +2468,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
|||||||
sensitm(19),
|
sensitm(19),
|
||||||
softradiustm(0.0),
|
softradiustm(0.0),
|
||||||
amount(95.),
|
amount(95.),
|
||||||
|
equiltm(true),
|
||||||
// Retinex
|
// Retinex
|
||||||
expreti(false),
|
expreti(false),
|
||||||
retinexMethod("high"),
|
retinexMethod("high"),
|
||||||
@ -2684,6 +2685,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
|
|||||||
&& sensitm == other.sensitm
|
&& sensitm == other.sensitm
|
||||||
&& softradiustm == other.softradiustm
|
&& softradiustm == other.softradiustm
|
||||||
&& amount == other.amount
|
&& amount == other.amount
|
||||||
|
&& equiltm == other.equiltm
|
||||||
// Retinex
|
// Retinex
|
||||||
&& expreti == other.expreti
|
&& expreti == other.expreti
|
||||||
&& retinexMethod == other.retinexMethod
|
&& retinexMethod == other.retinexMethod
|
||||||
@ -3859,6 +3861,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
|||||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmaskreticurve, "Locallab", "CCmaskretiCurve_" + std::to_string(i), spot.CCmaskreticurve, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).CCmaskreticurve, "Locallab", "CCmaskretiCurve_" + std::to_string(i), spot.CCmaskreticurve, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskreticurve, "Locallab", "LLmaskretiCurve_" + std::to_string(i), spot.LLmaskreticurve, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskreticurve, "Locallab", "LLmaskretiCurve_" + std::to_string(i), spot.LLmaskreticurve, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskreticurve, "Locallab", "HHmaskretiCurve_" + std::to_string(i), spot.HHmaskreticurve, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskreticurve, "Locallab", "HHmaskretiCurve_" + std::to_string(i), spot.HHmaskreticurve, keyFile);
|
||||||
|
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).equiltm, "Locallab", "Equiltm_" + std::to_string(i), spot.equiltm, keyFile);
|
||||||
// Retinex
|
// Retinex
|
||||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expreti, "Locallab", "Expreti_" + std::to_string(i), spot.expreti, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expreti, "Locallab", "Expreti_" + std::to_string(i), spot.expreti, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).retinexMethod, "Locallab", "retinexMethod_" + std::to_string(i), spot.retinexMethod, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).retinexMethod, "Locallab", "retinexMethod_" + std::to_string(i), spot.retinexMethod, keyFile);
|
||||||
@ -5169,6 +5172,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
|||||||
assignFromKeyfile(keyFile, "Locallab", "Sensitm_" + std::to_string(i), pedited, spot.sensitm, spotEdited.sensitm);
|
assignFromKeyfile(keyFile, "Locallab", "Sensitm_" + std::to_string(i), pedited, spot.sensitm, spotEdited.sensitm);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Softradiustm_" + std::to_string(i), pedited, spot.softradiustm, spotEdited.softradiustm);
|
assignFromKeyfile(keyFile, "Locallab", "Softradiustm_" + std::to_string(i), pedited, spot.softradiustm, spotEdited.softradiustm);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Amount_" + std::to_string(i), pedited, spot.amount, spotEdited.amount);
|
assignFromKeyfile(keyFile, "Locallab", "Amount_" + std::to_string(i), pedited, spot.amount, spotEdited.amount);
|
||||||
|
assignFromKeyfile(keyFile, "Locallab", "Equiltm_" + std::to_string(i), pedited, spot.equiltm, spotEdited.equiltm);
|
||||||
// Retinex
|
// Retinex
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Expreti_" + std::to_string(i), pedited, spot.expreti, spotEdited.expreti);
|
assignFromKeyfile(keyFile, "Locallab", "Expreti_" + std::to_string(i), pedited, spot.expreti, spotEdited.expreti);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "retinexMethod_" + std::to_string(i), pedited, spot.retinexMethod, spotEdited.retinexMethod);
|
assignFromKeyfile(keyFile, "Locallab", "retinexMethod_" + std::to_string(i), pedited, spot.retinexMethod, spotEdited.retinexMethod);
|
||||||
|
@ -1069,6 +1069,7 @@ struct LocallabParams {
|
|||||||
int sensitm;
|
int sensitm;
|
||||||
double softradiustm;
|
double softradiustm;
|
||||||
double amount;
|
double amount;
|
||||||
|
bool equiltm;
|
||||||
// Retinex
|
// Retinex
|
||||||
bool expreti;
|
bool expreti;
|
||||||
Glib::ustring retinexMethod;
|
Glib::ustring retinexMethod;
|
||||||
|
@ -722,7 +722,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
|||||||
LUMINANCECURVE, //Evlocallablimd
|
LUMINANCECURVE, //Evlocallablimd
|
||||||
LUMINANCECURVE, //Evlocallablaplace
|
LUMINANCECURVE, //Evlocallablaplace
|
||||||
LUMINANCECURVE, //EvlocallabsoftMethod
|
LUMINANCECURVE, //EvlocallabsoftMethod
|
||||||
LUMINANCECURVE // Evlocallabequilret
|
LUMINANCECURVE, // Evlocallabequilret
|
||||||
|
LUMINANCECURVE // Evlocallabequiltm
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,6 +224,8 @@ Locallab::Locallab():
|
|||||||
pastSatTog(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PASTSATTOG")))),
|
pastSatTog(Gtk::manage(new Gtk::CheckButton(M("TP_VIBRANCE_PASTSATTOG")))),
|
||||||
// Blur & Noise
|
// Blur & Noise
|
||||||
activlum(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ACTIV")))),
|
activlum(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_ACTIV")))),
|
||||||
|
//TM
|
||||||
|
equiltm(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))),
|
||||||
// Retinex
|
// Retinex
|
||||||
equilret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))),
|
equilret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))),
|
||||||
inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))),
|
inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))),
|
||||||
@ -814,10 +816,12 @@ Locallab::Locallab():
|
|||||||
softradiustm->setAdjusterListener(this);
|
softradiustm->setAdjusterListener(this);
|
||||||
if(showtooltip) estop->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP"));
|
if(showtooltip) estop->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP"));
|
||||||
if(showtooltip) rewei->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP"));
|
if(showtooltip) rewei->set_tooltip_text(M("TP_LOCALLAB_TONEMAPESTOP_TOOLTIP"));
|
||||||
|
equiltmConn = equiltm->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::equiltmChanged));
|
||||||
|
|
||||||
ToolParamBlock* const tmBox = Gtk::manage(new ToolParamBlock());
|
ToolParamBlock* const tmBox = Gtk::manage(new ToolParamBlock());
|
||||||
// tmBox->pack_start(*amount);//to use if we change transit_shapedetect parameters
|
// tmBox->pack_start(*amount);//to use if we change transit_shapedetect parameters
|
||||||
tmBox->pack_start(*stren);
|
tmBox->pack_start(*stren);
|
||||||
|
tmBox->pack_start(*equiltm);
|
||||||
tmBox->pack_start(*gamma);
|
tmBox->pack_start(*gamma);
|
||||||
tmBox->pack_start(*satur);
|
tmBox->pack_start(*satur);
|
||||||
tmBox->pack_start(*estop);
|
tmBox->pack_start(*estop);
|
||||||
@ -2142,6 +2146,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pp->locallab.spots.at(pp->locallab.selspot).sensitm = sensitm->getIntValue();
|
pp->locallab.spots.at(pp->locallab.selspot).sensitm = sensitm->getIntValue();
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).softradiustm = softradiustm->getValue();
|
pp->locallab.spots.at(pp->locallab.selspot).softradiustm = softradiustm->getValue();
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).amount = amount->getValue();
|
pp->locallab.spots.at(pp->locallab.selspot).amount = amount->getValue();
|
||||||
|
pp->locallab.spots.at(pp->locallab.selspot).equiltm = equiltm->get_active();
|
||||||
// Retinex
|
// Retinex
|
||||||
pp->locallab.spots.at(pp->locallab.selspot).expreti = expreti->getEnabled();
|
pp->locallab.spots.at(pp->locallab.selspot).expreti = expreti->getEnabled();
|
||||||
|
|
||||||
@ -2369,6 +2374,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pe->locallab.spots.at(pp->locallab.selspot).sensitm = pe->locallab.spots.at(pp->locallab.selspot).sensitm || sensitm->getEditedState();
|
pe->locallab.spots.at(pp->locallab.selspot).sensitm = pe->locallab.spots.at(pp->locallab.selspot).sensitm || sensitm->getEditedState();
|
||||||
pe->locallab.spots.at(pp->locallab.selspot).softradiustm = pe->locallab.spots.at(pp->locallab.selspot).softradiustm || softradiustm->getEditedState();
|
pe->locallab.spots.at(pp->locallab.selspot).softradiustm = pe->locallab.spots.at(pp->locallab.selspot).softradiustm || softradiustm->getEditedState();
|
||||||
pe->locallab.spots.at(pp->locallab.selspot).amount = pe->locallab.spots.at(pp->locallab.selspot).amount || amount->getEditedState();
|
pe->locallab.spots.at(pp->locallab.selspot).amount = pe->locallab.spots.at(pp->locallab.selspot).amount || amount->getEditedState();
|
||||||
|
pe->locallab.spots.at(pp->locallab.selspot).equiltm = pe->locallab.spots.at(pp->locallab.selspot).equiltm || !equiltm->get_inconsistent();
|
||||||
// Retinex
|
// Retinex
|
||||||
pe->locallab.spots.at(pp->locallab.selspot).expreti = pe->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent();
|
pe->locallab.spots.at(pp->locallab.selspot).expreti = pe->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent();
|
||||||
pe->locallab.spots.at(pp->locallab.selspot).retinexMethod = pe->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
|
pe->locallab.spots.at(pp->locallab.selspot).retinexMethod = pe->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
|
||||||
@ -2591,6 +2597,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pedited->locallab.spots.at(pp->locallab.selspot).amount = pedited->locallab.spots.at(pp->locallab.selspot).amount || amount->getEditedState();
|
pedited->locallab.spots.at(pp->locallab.selspot).amount = pedited->locallab.spots.at(pp->locallab.selspot).amount || amount->getEditedState();
|
||||||
pedited->locallab.spots.at(pp->locallab.selspot).enaretiMask = pedited->locallab.spots.at(pp->locallab.selspot).enaretiMask || !enaretiMask->get_inconsistent();
|
pedited->locallab.spots.at(pp->locallab.selspot).enaretiMask = pedited->locallab.spots.at(pp->locallab.selspot).enaretiMask || !enaretiMask->get_inconsistent();
|
||||||
pedited->locallab.spots.at(pp->locallab.selspot).enaretiMasktmap = pedited->locallab.spots.at(pp->locallab.selspot).enaretiMasktmap || !enaretiMasktmap->get_inconsistent();
|
pedited->locallab.spots.at(pp->locallab.selspot).enaretiMasktmap = pedited->locallab.spots.at(pp->locallab.selspot).enaretiMasktmap || !enaretiMasktmap->get_inconsistent();
|
||||||
|
pedited->locallab.spots.at(pp->locallab.selspot).equiltm = pedited->locallab.spots.at(pp->locallab.selspot).equiltm || !equiltm->get_inconsistent();
|
||||||
// Retinex
|
// Retinex
|
||||||
pedited->locallab.spots.at(pp->locallab.selspot).expreti = pedited->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent();
|
pedited->locallab.spots.at(pp->locallab.selspot).expreti = pedited->locallab.spots.at(pp->locallab.selspot).expreti || !expreti->get_inconsistent();
|
||||||
pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod = pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
|
pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod = pedited->locallab.spots.at(pp->locallab.selspot).retinexMethod || retinexMethod->get_active_text() != M("GENERAL_UNCHANGED");
|
||||||
@ -3497,6 +3504,33 @@ void Locallab::inversshaChanged()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Locallab::equiltmChanged()
|
||||||
|
{
|
||||||
|
// printf("inversretChanged\n");
|
||||||
|
|
||||||
|
if (multiImage) {
|
||||||
|
if (equiltm->get_inconsistent()) {
|
||||||
|
equiltm->set_inconsistent(false);
|
||||||
|
equiltmConn.block(true);
|
||||||
|
equiltm->set_active(false);
|
||||||
|
equiltmConn.block(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (getEnabled() && exptonemap->getEnabled()) {
|
||||||
|
if (listener) {
|
||||||
|
if (inversret->get_active()) {
|
||||||
|
listener->panelChanged(Evlocallabequiltm, M("GENERAL_ENABLED"));
|
||||||
|
} else {
|
||||||
|
listener->panelChanged(Evlocallabequiltm, M("GENERAL_DISABLED"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Locallab::equilretChanged()
|
void Locallab::equilretChanged()
|
||||||
{
|
{
|
||||||
// printf("inversretChanged\n");
|
// printf("inversretChanged\n");
|
||||||
@ -5167,6 +5201,7 @@ void Locallab::enableListener()
|
|||||||
activlumConn.block(false);
|
activlumConn.block(false);
|
||||||
// Tone Mapping
|
// Tone Mapping
|
||||||
enabletonemapConn.block(false);
|
enabletonemapConn.block(false);
|
||||||
|
equiltmConn.block(false);
|
||||||
// Retinex
|
// Retinex
|
||||||
enableretiConn.block(false);
|
enableretiConn.block(false);
|
||||||
retinexMethodConn.block(false);
|
retinexMethodConn.block(false);
|
||||||
@ -5225,6 +5260,7 @@ void Locallab::disableListener()
|
|||||||
activlumConn.block(true);
|
activlumConn.block(true);
|
||||||
// Tone Mapping
|
// Tone Mapping
|
||||||
enabletonemapConn.block(true);
|
enabletonemapConn.block(true);
|
||||||
|
equiltmConn.block(true);
|
||||||
// Retinex
|
// Retinex
|
||||||
enableretiConn.block(true);
|
enableretiConn.block(true);
|
||||||
retinexMethodConn.block(true);
|
retinexMethodConn.block(true);
|
||||||
@ -5395,6 +5431,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
sensitm->setValue(pp->locallab.spots.at(index).sensitm);
|
sensitm->setValue(pp->locallab.spots.at(index).sensitm);
|
||||||
softradiustm->setValue(pp->locallab.spots.at(index).softradiustm);
|
softradiustm->setValue(pp->locallab.spots.at(index).softradiustm);
|
||||||
amount->setValue(pp->locallab.spots.at(index).amount);
|
amount->setValue(pp->locallab.spots.at(index).amount);
|
||||||
|
equiltm->set_active(pp->locallab.spots.at(index).equiltm);
|
||||||
|
|
||||||
// Retinex
|
// Retinex
|
||||||
expreti->setEnabled(pp->locallab.spots.at(index).expreti);
|
expreti->setEnabled(pp->locallab.spots.at(index).expreti);
|
||||||
@ -5653,6 +5690,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
|
|||||||
sensitm->setEditedState(spotState->sensitm ? Edited : UnEdited);
|
sensitm->setEditedState(spotState->sensitm ? Edited : UnEdited);
|
||||||
softradiustm->setEditedState(spotState->softradiustm ? Edited : UnEdited);
|
softradiustm->setEditedState(spotState->softradiustm ? Edited : UnEdited);
|
||||||
amount->setEditedState(spotState->amount ? Edited : UnEdited);
|
amount->setEditedState(spotState->amount ? Edited : UnEdited);
|
||||||
|
equiltm->set_inconsistent(multiImage && !spotState->equiltm);
|
||||||
|
|
||||||
// Retinex
|
// Retinex
|
||||||
expreti->set_inconsistent(!spotState->expreti);
|
expreti->set_inconsistent(!spotState->expreti);
|
||||||
|
@ -260,6 +260,9 @@ private:
|
|||||||
// Blur & Noise
|
// Blur & Noise
|
||||||
Gtk::CheckButton* const activlum;
|
Gtk::CheckButton* const activlum;
|
||||||
sigc::connection activlumConn;
|
sigc::connection activlumConn;
|
||||||
|
//Tone mapping
|
||||||
|
Gtk::CheckButton* const equiltm;
|
||||||
|
sigc::connection equiltmConn;
|
||||||
// Retinex
|
// Retinex
|
||||||
Gtk::CheckButton* const equilret;
|
Gtk::CheckButton* const equilret;
|
||||||
sigc::connection equilretConn;
|
sigc::connection equilretConn;
|
||||||
@ -355,6 +358,8 @@ private:
|
|||||||
void pastsattog_toggled();
|
void pastsattog_toggled();
|
||||||
// Blur & Noise
|
// Blur & Noise
|
||||||
void activlumChanged();
|
void activlumChanged();
|
||||||
|
//TM
|
||||||
|
void equiltmChanged();
|
||||||
// Retinex
|
// Retinex
|
||||||
void equilretChanged();
|
void equilretChanged();
|
||||||
void inversretChanged();
|
void inversretChanged();
|
||||||
|
@ -1058,6 +1058,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
|||||||
locallab.spots.at(j).sensitm = locallab.spots.at(j).sensitm && pSpot.sensitm == otherSpot.sensitm;
|
locallab.spots.at(j).sensitm = locallab.spots.at(j).sensitm && pSpot.sensitm == otherSpot.sensitm;
|
||||||
locallab.spots.at(j).softradiustm = locallab.spots.at(j).softradiustm && pSpot.softradiustm == otherSpot.softradiustm;
|
locallab.spots.at(j).softradiustm = locallab.spots.at(j).softradiustm && pSpot.softradiustm == otherSpot.softradiustm;
|
||||||
locallab.spots.at(j).amount = locallab.spots.at(j).amount && pSpot.amount == otherSpot.amount;
|
locallab.spots.at(j).amount = locallab.spots.at(j).amount && pSpot.amount == otherSpot.amount;
|
||||||
|
locallab.spots.at(j).equiltm = locallab.spots.at(j).equiltm && pSpot.equiltm == otherSpot.equiltm;
|
||||||
// Retinex
|
// Retinex
|
||||||
locallab.spots.at(j).expreti = locallab.spots.at(j).expreti && pSpot.expreti == otherSpot.expreti;
|
locallab.spots.at(j).expreti = locallab.spots.at(j).expreti && pSpot.expreti == otherSpot.expreti;
|
||||||
locallab.spots.at(j).retinexMethod = locallab.spots.at(j).retinexMethod && pSpot.retinexMethod == otherSpot.retinexMethod;
|
locallab.spots.at(j).retinexMethod = locallab.spots.at(j).retinexMethod && pSpot.retinexMethod == otherSpot.retinexMethod;
|
||||||
@ -3036,6 +3037,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
|||||||
toEdit.locallab.spots.at(i).gamma = mods.locallab.spots.at(i).gamma;
|
toEdit.locallab.spots.at(i).gamma = mods.locallab.spots.at(i).gamma;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (locallab.spots.at(i).equiltm) {
|
||||||
|
toEdit.locallab.spots.at(i).equiltm = mods.locallab.spots.at(i).equiltm;
|
||||||
|
}
|
||||||
|
|
||||||
if (locallab.spots.at(i).estop) {
|
if (locallab.spots.at(i).estop) {
|
||||||
toEdit.locallab.spots.at(i).estop = mods.locallab.spots.at(i).estop;
|
toEdit.locallab.spots.at(i).estop = mods.locallab.spots.at(i).estop;
|
||||||
}
|
}
|
||||||
@ -4431,6 +4436,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
|
|||||||
sensitm(v),
|
sensitm(v),
|
||||||
softradiustm(v),
|
softradiustm(v),
|
||||||
amount(v),
|
amount(v),
|
||||||
|
equiltm(v),
|
||||||
// Retinex
|
// Retinex
|
||||||
expreti(v),
|
expreti(v),
|
||||||
retinexMethod(v),
|
retinexMethod(v),
|
||||||
@ -4644,6 +4650,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
|
|||||||
sensitm = v;
|
sensitm = v;
|
||||||
softradiustm = v;
|
softradiustm = v;
|
||||||
amount = v;
|
amount = v;
|
||||||
|
equiltm = v;
|
||||||
// Retinex
|
// Retinex
|
||||||
expreti = v;
|
expreti = v;
|
||||||
retinexMethod = v;
|
retinexMethod = v;
|
||||||
|
@ -485,6 +485,7 @@ public:
|
|||||||
bool sensitm;
|
bool sensitm;
|
||||||
bool softradiustm;
|
bool softradiustm;
|
||||||
bool amount;
|
bool amount;
|
||||||
|
bool equiltm;
|
||||||
// Retinex
|
// Retinex
|
||||||
bool expreti;
|
bool expreti;
|
||||||
bool retinexMethod;
|
bool retinexMethod;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user