Bugfix for Directional Pyramid Denoising. Adding a Directional Pyramid Equalizer tool. This one serves the same function as the existing Wavelet Equalizer, but has much less artifacting; though it is a little slower to execute and has not yet been adapted for OpenMP implementation. There are also fewer levels on which the tool operates, though of course if there was a demand that could be altered. The controls are similar, though have been given separate luma and chroma controls. Each slider adjusts the factor by which a given detail band is amplified; factors larger than one increase contrast, while values smaller than one decrease contrast. The luma control alters contrast on various scales, each successive one twice as large as the previous one. The chroma control is similar, but does less since there is typically less chroma contrast on fine scales. One might use this to restore some of the color contrast lost in NR, or to remove color fringing by making the fine scale enhancement factor much less than one.
This commit is contained in:
@@ -172,6 +172,11 @@ void ProcParams::setDefaults () {
|
||||
{
|
||||
equalizer.c[i] = 0;
|
||||
}
|
||||
dirpyrequalizer.enabled = false;
|
||||
for(int i = 0; i < 8; i ++)
|
||||
{
|
||||
dirpyrequalizer.mult[i] = 1.0;
|
||||
}
|
||||
|
||||
exif.clear ();
|
||||
iptc.clear ();
|
||||
@@ -338,6 +343,15 @@ int ProcParams::save (Glib::ustring fname) const {
|
||||
ss << "C" << i;
|
||||
keyFile.set_integer("Equalizer", ss.str(), equalizer.c[i]);
|
||||
}
|
||||
|
||||
// save directional pyramid equalizer parameters
|
||||
keyFile.set_boolean ("Directional Pyramid Equalizer", "Enabled", dirpyrequalizer.enabled);
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Mult" << i;
|
||||
keyFile.set_integer("Directional Pyramid Equalizer", ss.str(), dirpyrequalizer.mult[i]);
|
||||
}
|
||||
|
||||
// save exif change list
|
||||
for (int i=0; i<(int)exif.size(); i++)
|
||||
@@ -589,6 +603,17 @@ if (keyFile.has_group ("Equalizer")) {
|
||||
if(keyFile.has_key ("Equalizer", ss.str())) equalizer.c[i] = keyFile.get_integer ("Equalizer", ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
// load directional pyramid equalizer parameters
|
||||
if (keyFile.has_group ("Directional Pyramid Equalizer")) {
|
||||
if (keyFile.has_key ("Directional Pyramid Equalizer", "Enabled")) equalizer.enabled = keyFile.get_boolean ("Directional Pyramid Equalizer", "Enabled");
|
||||
for(int i = 0; i < 8; i ++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Mult" << i;
|
||||
if(keyFile.has_key ("Directional Pyramid Equalizer", ss.str())) dirpyrequalizer.mult[i] = keyFile.get_integer ("Directional Pyramid Equalizer", ss.str());
|
||||
}
|
||||
}
|
||||
|
||||
// load exif change settings
|
||||
if (keyFile.has_group ("Exif")) {
|
||||
@@ -633,6 +658,17 @@ bool operator==(const EqualizerParams & a, const EqualizerParams & b) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator==(const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b) {
|
||||
if(a.enabled != b.enabled)
|
||||
return false;
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
if(a.mult[i] != b.mult[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool operator==(const ExifPair& a, const ExifPair& b) {
|
||||
|
||||
@@ -739,6 +775,7 @@ bool ProcParams::operator== (const ProcParams& other) {
|
||||
&& icm.working == other.icm.working
|
||||
&& icm.output == other.icm.output
|
||||
&& equalizer == other.equalizer
|
||||
&& dirpyrequalizer == other.dirpyrequalizer
|
||||
&& exif==other.exif
|
||||
&& iptc==other.iptc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user