GUI update, thanks Michael!
This commit is contained in:
@@ -817,7 +817,7 @@ TP_DETAIL_AMOUNT;Amount
|
||||
TP_DIRPYRDENOISE_CHROMA;Chroma noise reduction
|
||||
TP_DIRPYRDENOISE_GAMMA;Gamma
|
||||
TP_DIRPYRDENOISE_LABEL;Noise reduction
|
||||
TP_DIRPYRDENOISE_LAMT;Luma noise amount
|
||||
TP_DIRPYRDENOISE_LDETAIL;Luma detail recovery
|
||||
TP_DIRPYRDENOISE_LUMA;Luma noise reduction
|
||||
TP_DIRPYREQUALIZER_LABEL;Contrast by detail levels
|
||||
TP_DIRPYREQUALIZER_LUMACOARSEST;Coarsest
|
||||
|
@@ -195,7 +195,7 @@ namespace rtengine {
|
||||
const short int height=src->height, width=src->width;
|
||||
const short int hfh=(height+1)/2, hfw=(width+1)/2;
|
||||
|
||||
if (dnparams.Lamt==0) {//nothing to do; copy src to dst
|
||||
if (dnparams.luma==0) {//nothing to do; copy src to dst
|
||||
for (int i=0; i<height; i++) {
|
||||
for (int j=0; j<width; j++) {
|
||||
dst->r[i][j] = src->r[i][j];
|
||||
@@ -207,7 +207,7 @@ namespace rtengine {
|
||||
}
|
||||
|
||||
//const int blkrad=2;
|
||||
float noisevar_L = SQR((100-dnparams.luma) * TS * 100.0f);
|
||||
float noisevar_L = SQR((100-dnparams.Ldetail) * TS * 100.0f);
|
||||
float noisevar_ab = SQR(dnparams.chroma * TS * 150.0f);
|
||||
|
||||
// calculation for tiling
|
||||
@@ -260,7 +260,7 @@ namespace rtengine {
|
||||
wavelet_decomposition adecomp(labin->data+datalen, labin->W, labin->H, 5, 1 );//last args are maxlevels, subsampling
|
||||
wavelet_decomposition bdecomp(labin->data+2*datalen, labin->W, labin->H, 5, 1 );//last args are maxlevels, subsampling
|
||||
|
||||
float noisevarL = SQR(dnparams.Lamt/25.0f);//TODO: clean up naming confusion about params
|
||||
float noisevarL = SQR(dnparams.luma/25.0f);//TODO: clean up naming confusion about params
|
||||
float noisevarab = SQR(dnparams.chroma/10.0f);
|
||||
|
||||
WaveletDenoiseAll_BiShrink(Ldecomp, adecomp, bdecomp, noisevarL, noisevarab);
|
||||
|
@@ -188,7 +188,7 @@ enum ProcEvent {
|
||||
EvRGBgCurve=163,
|
||||
EvRGBbCurve=164,
|
||||
EvNeutralExp=165,
|
||||
EvDPDNLamt=166,
|
||||
EvDPDNLdetail=166,
|
||||
NUMOFEVENTS=167
|
||||
};
|
||||
}
|
||||
|
@@ -216,8 +216,8 @@ void ProcParams::setDefaults () {
|
||||
defringe.threshold = 25;
|
||||
|
||||
dirpyrDenoise.enabled = false;
|
||||
dirpyrDenoise.Lamt = 10;
|
||||
dirpyrDenoise.luma = 10;
|
||||
dirpyrDenoise.Ldetail = 10;
|
||||
dirpyrDenoise.chroma = 10;
|
||||
dirpyrDenoise.gamma = 2.0;
|
||||
dirpyrDenoise.expcomp = 0.0;
|
||||
@@ -465,9 +465,9 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2) const {
|
||||
|
||||
// save dirpyrDenoise
|
||||
keyFile.set_boolean ("Directional Pyramid Denoising", "Enabled", dirpyrDenoise.enabled);
|
||||
keyFile.set_integer ("Directional Pyramid Denoising", "Lamt", dirpyrDenoise.Lamt);
|
||||
keyFile.set_integer ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma);
|
||||
keyFile.set_integer ("Directional Pyramid Denoising", "Chroma", dirpyrDenoise.chroma);
|
||||
keyFile.set_double ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma);
|
||||
keyFile.set_double ("Directional Pyramid Denoising", "Ldetail", dirpyrDenoise.Ldetail);
|
||||
keyFile.set_double ("Directional Pyramid Denoising", "Chroma", dirpyrDenoise.chroma);
|
||||
keyFile.set_double ("Directional Pyramid Denoising", "Gamma", dirpyrDenoise.gamma);
|
||||
|
||||
//Save edgePreservingDecompositionUI.
|
||||
@@ -817,10 +817,10 @@ if (keyFile.has_group ("Impulse Denoising")) {
|
||||
// load dirpyrDenoise
|
||||
if (keyFile.has_group ("Directional Pyramid Denoising")) {
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Enabled")) dirpyrDenoise.enabled = keyFile.get_boolean ("Directional Pyramid Denoising", "Enabled");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Lamt")) dirpyrDenoise.Lamt = keyFile.get_integer ("Directional Pyramid Denoising", "Lamt");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Luma")) dirpyrDenoise.luma = keyFile.get_integer ("Directional Pyramid Denoising", "Luma");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Chroma")) dirpyrDenoise.chroma = keyFile.get_integer ("Directional Pyramid Denoising", "Chroma");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Gamma")) dirpyrDenoise.gamma = keyFile.get_double ("Directional Pyramid Denoising", "Gamma");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Luma")) dirpyrDenoise.luma = keyFile.get_double ("Directional Pyramid Denoising", "Luma");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Ldetail")) dirpyrDenoise.Ldetail = keyFile.get_double ("Directional Pyramid Denoising", "Ldetail");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Chroma")) dirpyrDenoise.chroma = keyFile.get_double ("Directional Pyramid Denoising", "Chroma");
|
||||
if (keyFile.has_key ("Directional Pyramid Denoising", "Gamma")) dirpyrDenoise.gamma = keyFile.get_double ("Directional Pyramid Denoising", "Gamma");
|
||||
}
|
||||
|
||||
//Load EPD.
|
||||
@@ -1126,8 +1126,8 @@ bool ProcParams::operator== (const ProcParams& other) {
|
||||
&& impulseDenoise.enabled == other.impulseDenoise.enabled
|
||||
&& impulseDenoise.thresh == other.impulseDenoise.thresh
|
||||
&& dirpyrDenoise.enabled == other.dirpyrDenoise.enabled
|
||||
&& dirpyrDenoise.Lamt == other.dirpyrDenoise.Lamt
|
||||
&& dirpyrDenoise.luma == other.dirpyrDenoise.luma
|
||||
&& dirpyrDenoise.Ldetail == other.dirpyrDenoise.Ldetail
|
||||
&& dirpyrDenoise.chroma == other.dirpyrDenoise.chroma
|
||||
&& dirpyrDenoise.gamma == other.dirpyrDenoise.gamma
|
||||
&& edgePreservingDecompositionUI.enabled == other.edgePreservingDecompositionUI.enabled
|
||||
|
@@ -240,9 +240,9 @@ class ColorDenoiseParams {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
int Lamt;
|
||||
int luma;
|
||||
int chroma;
|
||||
double luma;
|
||||
double Ldetail;
|
||||
double chroma;
|
||||
float gamma;
|
||||
double expcomp;
|
||||
};
|
||||
|
@@ -186,7 +186,7 @@ RGBCURVE, // EvRGBrCurve
|
||||
RGBCURVE, // EvRGBgCurve
|
||||
RGBCURVE, // EvRGBbCurve
|
||||
RGBCURVE, // EvNeutralExp
|
||||
ALLNORAW // EvDPDNLamt
|
||||
ALLNORAW // EvDPDNLdetail
|
||||
|
||||
};
|
||||
|
||||
|
@@ -212,7 +212,7 @@ void BatchToolPanelCoordinator::initSession () {
|
||||
if (options.baBehav[ADDSET_VIGN_AMOUNT]) pparams.vignetting.amount = 0;
|
||||
|
||||
if (options.baBehav[ADDSET_DIRPYREQ]) for (int i=0; i<5; i++) pparams.dirpyrequalizer.mult[i] = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_CHLUM]) pparams.dirpyrDenoise.Lamt = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_CHLUM]) pparams.dirpyrDenoise.Ldetail = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_GAMMA]) pparams.dirpyrDenoise.gamma = 0;
|
||||
|
||||
if (options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]) pparams.raw.greenthresh = 0;
|
||||
|
@@ -36,23 +36,23 @@ DirPyrDenoise::DirPyrDenoise () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::enabledChanged) );
|
||||
|
||||
Lamt = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LAMT"), 0, 100, 1, 10));
|
||||
luma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LUMA"), 0, 100, 1, 10));
|
||||
chroma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMA"), 0, 100, 1, 10));
|
||||
luma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LUMA"), 0, 100, 0.01, 10));
|
||||
Ldetail = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LDETAIL"), 0, 100, 0.01, 10));
|
||||
chroma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMA"), 0, 100, 0.01, 10));
|
||||
gamma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_GAMMA"), 1.0, 3.0, 0.01, 0.10));
|
||||
|
||||
Lamt->setAdjusterListener (this);
|
||||
luma->setAdjusterListener (this);
|
||||
Ldetail->setAdjusterListener (this);
|
||||
chroma->setAdjusterListener (this);
|
||||
gamma->setAdjusterListener (this);
|
||||
|
||||
Lamt->show();
|
||||
luma->show();
|
||||
chroma->show();
|
||||
luma->show();
|
||||
Ldetail->show();
|
||||
chroma->show();
|
||||
gamma->show();
|
||||
|
||||
pack_start (*Lamt);
|
||||
pack_start (*luma);
|
||||
pack_start (*Ldetail);
|
||||
pack_start (*chroma);
|
||||
pack_start (*gamma);
|
||||
|
||||
@@ -63,9 +63,9 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
Lamt->setEditedState (pedited->dirpyrDenoise.Lamt ? Edited : UnEdited);
|
||||
luma->setEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
chroma->setEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
Ldetail->setEditedState (pedited->dirpyrDenoise.Ldetail ? Edited : UnEdited);
|
||||
chroma->setEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
enabled->set_inconsistent (!pedited->dirpyrDenoise.enabled);
|
||||
}
|
||||
@@ -76,8 +76,8 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
lastEnabled = pp->dirpyrDenoise.enabled;
|
||||
|
||||
Lamt->setValue (pp->dirpyrDenoise.Lamt);
|
||||
luma->setValue (pp->dirpyrDenoise.luma);
|
||||
Ldetail->setValue (pp->dirpyrDenoise.Ldetail);
|
||||
chroma->setValue (pp->dirpyrDenoise.chroma);
|
||||
gamma->setValue (pp->dirpyrDenoise.gamma);
|
||||
|
||||
@@ -86,15 +86,15 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->dirpyrDenoise.Lamt = Lamt->getValue ();
|
||||
pp->dirpyrDenoise.luma = luma->getValue ();
|
||||
pp->dirpyrDenoise.Ldetail = Ldetail->getValue ();
|
||||
pp->dirpyrDenoise.chroma = chroma->getValue ();
|
||||
pp->dirpyrDenoise.gamma = gamma->getValue ();
|
||||
pp->dirpyrDenoise.enabled = enabled->get_active();
|
||||
|
||||
if (pedited) {
|
||||
pedited->dirpyrDenoise.Lamt = Lamt->getEditedState ();
|
||||
pedited->dirpyrDenoise.luma = luma->getEditedState ();
|
||||
pedited->dirpyrDenoise.Ldetail = Ldetail->getEditedState ();
|
||||
pedited->dirpyrDenoise.chroma = chroma->getEditedState ();
|
||||
pedited->dirpyrDenoise.gamma = gamma->getEditedState ();
|
||||
pedited->dirpyrDenoise.enabled = !enabled->get_inconsistent();
|
||||
@@ -103,21 +103,21 @@ void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
void DirPyrDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
Lamt->setDefault (defParams->dirpyrDenoise.Lamt);
|
||||
luma->setDefault (defParams->dirpyrDenoise.luma);
|
||||
chroma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
luma->setDefault (defParams->dirpyrDenoise.luma);
|
||||
Ldetail->setDefault (defParams->dirpyrDenoise.Ldetail);
|
||||
chroma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
gamma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
|
||||
if (pedited) {
|
||||
Lamt->setDefaultEditedState (pedited->dirpyrDenoise.Lamt ? Edited : UnEdited);
|
||||
luma->setDefaultEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
chroma->setDefaultEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
luma->setDefaultEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
Ldetail->setDefaultEditedState (pedited->dirpyrDenoise.Ldetail ? Edited : UnEdited);
|
||||
chroma->setDefaultEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setDefaultEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
}
|
||||
else {
|
||||
Lamt->setDefaultEditedState (Irrelevant);
|
||||
luma->setDefaultEditedState (Irrelevant);
|
||||
chroma->setDefaultEditedState (Irrelevant);
|
||||
Ldetail->setDefaultEditedState (Irrelevant);
|
||||
chroma->setDefaultEditedState (Irrelevant);
|
||||
gamma->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
@@ -126,8 +126,8 @@ void DirPyrDenoise::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (listener && enabled->get_active()) {
|
||||
|
||||
if (a==Lamt)
|
||||
listener->panelChanged (EvDPDNLamt, Glib::ustring::format ((int)a->getValue()));
|
||||
if (a==Ldetail)
|
||||
listener->panelChanged (EvDPDNLdetail, Glib::ustring::format ((int)a->getValue()));
|
||||
else if (a==luma)
|
||||
listener->panelChanged (EvDPDNLuma, Glib::ustring::format ((int)a->getValue()));
|
||||
else if (a==chroma)
|
||||
@@ -163,23 +163,23 @@ void DirPyrDenoise::enabledChanged () {
|
||||
void DirPyrDenoise::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
Lamt->showEditedCB ();
|
||||
luma->showEditedCB ();
|
||||
Ldetail->showEditedCB ();
|
||||
chroma->showEditedCB ();
|
||||
}
|
||||
|
||||
void DirPyrDenoise::setAdjusterBehavior (bool chrolumaadd, bool gammaadd) {
|
||||
|
||||
Lamt->setAddMode(chrolumaadd);
|
||||
luma->setAddMode(chrolumaadd);
|
||||
Ldetail->setAddMode(chrolumaadd);
|
||||
chroma->setAddMode(chrolumaadd);
|
||||
gamma->setAddMode(gammaadd);
|
||||
}
|
||||
|
||||
void DirPyrDenoise::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
|
||||
Lamt->trimValue(pp->dirpyrDenoise.Lamt);
|
||||
luma->trimValue(pp->dirpyrDenoise.luma);
|
||||
Ldetail->trimValue(pp->dirpyrDenoise.Ldetail);
|
||||
chroma->trimValue(pp->dirpyrDenoise.chroma);
|
||||
gamma->trimValue(pp->dirpyrDenoise.gamma);
|
||||
}
|
||||
|
@@ -26,9 +26,9 @@
|
||||
class DirPyrDenoise : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||
|
||||
protected:
|
||||
Adjuster* Lamt;
|
||||
Adjuster* luma;
|
||||
Adjuster* chroma;
|
||||
Adjuster* luma;
|
||||
Adjuster* Ldetail;
|
||||
Adjuster* chroma;
|
||||
Adjuster* gamma;
|
||||
|
||||
Gtk::CheckButton* enabled;
|
||||
|
@@ -100,8 +100,8 @@ void ParamsEdited::set (bool v) {
|
||||
impulseDenoise.enabled = v;
|
||||
impulseDenoise.thresh = v;
|
||||
dirpyrDenoise.enabled = v;
|
||||
dirpyrDenoise.Lamt = v;
|
||||
dirpyrDenoise.luma = v;
|
||||
dirpyrDenoise.Ldetail = v;
|
||||
dirpyrDenoise.chroma = v;
|
||||
dirpyrDenoise.gamma = v;
|
||||
edgePreservingDecompositionUI.enabled = v;
|
||||
@@ -290,8 +290,8 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
impulseDenoise.thresh = impulseDenoise.thresh && p.impulseDenoise.thresh == other.impulseDenoise.thresh;
|
||||
|
||||
dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled;
|
||||
dirpyrDenoise.Lamt = dirpyrDenoise.Lamt && p.dirpyrDenoise.Lamt == other.dirpyrDenoise.Lamt;
|
||||
dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma;
|
||||
dirpyrDenoise.Ldetail = dirpyrDenoise.Ldetail && p.dirpyrDenoise.Ldetail == other.dirpyrDenoise.Ldetail;
|
||||
dirpyrDenoise.chroma = dirpyrDenoise.chroma && p.dirpyrDenoise.chroma == other.dirpyrDenoise.chroma;
|
||||
dirpyrDenoise.gamma = dirpyrDenoise.gamma && p.dirpyrDenoise.gamma == other.dirpyrDenoise.gamma;
|
||||
|
||||
@@ -478,8 +478,8 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
if (impulseDenoise.thresh) toEdit.impulseDenoise.thresh = mods.impulseDenoise.thresh;
|
||||
|
||||
if (dirpyrDenoise.enabled) toEdit.dirpyrDenoise.enabled = mods.dirpyrDenoise.enabled;
|
||||
if (dirpyrDenoise.Lamt) toEdit.dirpyrDenoise.Lamt = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.Lamt + mods.dirpyrDenoise.Lamt : mods.dirpyrDenoise.Lamt;
|
||||
if (dirpyrDenoise.luma) toEdit.dirpyrDenoise.luma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.luma + mods.dirpyrDenoise.luma : mods.dirpyrDenoise.luma;
|
||||
if (dirpyrDenoise.Ldetail) toEdit.dirpyrDenoise.Ldetail = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.Ldetail + mods.dirpyrDenoise.Ldetail : mods.dirpyrDenoise.Ldetail;
|
||||
if (dirpyrDenoise.chroma) toEdit.dirpyrDenoise.chroma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.chroma + mods.dirpyrDenoise.chroma : mods.dirpyrDenoise.chroma;
|
||||
if (dirpyrDenoise.gamma) toEdit.dirpyrDenoise.gamma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_GAMMA] ? toEdit.dirpyrDenoise.gamma + mods.dirpyrDenoise.gamma : mods.dirpyrDenoise.gamma;
|
||||
|
||||
|
@@ -170,7 +170,7 @@ class DirPyrDenoiseParamsEdited {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
bool Lamt;
|
||||
bool Ldetail;
|
||||
bool luma;
|
||||
bool chroma;
|
||||
bool gamma;
|
||||
|
Reference in New Issue
Block a user