Added a "gamma" slider to pyramid NR. Noise reduction is carried out with L channel mapped to that gamma. Default value is 2.0; lower values increase shadow smoothing, higher values smooth highlights more. Unfortunately adjusting this slider interacts with the other two, so all three have to be iteratively adjusted to achieve a desired result.

This commit is contained in:
Emil Martinec
2010-09-14 12:55:56 -05:00
parent dbea6d601e
commit 8efac28819
12 changed files with 218 additions and 219 deletions

View File

@@ -73,7 +73,8 @@ void ParamsEdited::set (bool v) {
dirpyrDenoise.enabled = v;
dirpyrDenoise.luma = v;
dirpyrDenoise.chroma = v;
sh.enabled = v;
dirpyrDenoise.gamma = v;
sh.enabled = v;
sh.hq = v;
sh.highlights = v;
sh.htonalwidth = v;
@@ -192,7 +193,8 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled;
dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma;
dirpyrDenoise.chroma = dirpyrDenoise.chroma && p.dirpyrDenoise.chroma == other.dirpyrDenoise.chroma;
dirpyrDenoise.gamma = dirpyrDenoise.gamma && p.dirpyrDenoise.gamma == other.dirpyrDenoise.gamma;
sh.enabled = sh.enabled && p.sh.enabled == other.sh.enabled;
sh.hq = sh.hq && p.sh.hq == other.sh.hq;
sh.highlights = sh.highlights && p.sh.highlights == other.sh.highlights;
@@ -302,7 +304,8 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if (dirpyrDenoise.enabled) toEdit.dirpyrDenoise.enabled = mods.dirpyrDenoise.enabled;
if (dirpyrDenoise.luma) toEdit.dirpyrDenoise.luma = mods.dirpyrDenoise.luma;
if (dirpyrDenoise.chroma) toEdit.dirpyrDenoise.chroma = mods.dirpyrDenoise.chroma;
if (dirpyrDenoise.gamma) toEdit.dirpyrDenoise.gamma = mods.dirpyrDenoise.gamma;
if (sh.enabled) toEdit.sh.enabled = mods.sh.enabled;
if (sh.hq) toEdit.sh.hq = mods.sh.hq;
if (sh.highlights) toEdit.sh.highlights = options.baBehav[ADDSET_SH_HIGHLIGHTS] ? toEdit.sh.highlights + mods.sh.highlights : mods.sh.highlights;