New Vibrance tool from Jacques Desmis ; see issue 1065, and it's attached HTML document describing how to use it

This commit is contained in:
Hombre
2011-10-27 21:23:37 +02:00
parent 885308c2c8
commit 55541cff12
31 changed files with 3077 additions and 94 deletions

View File

@@ -42,57 +42,64 @@ void ParamsEdited::set (bool v) {
labCurve.lcurve = v;
labCurve.acurve = v;
labCurve.bcurve = v;
labCurve.brightness = v;
labCurve.contrast = v;
labCurve.saturation = v;
labCurve.avoidclip = v;
labCurve.brightness = v;
labCurve.contrast = v;
labCurve.saturation = v;
labCurve.avoidclip = v;
labCurve.enable_saturationlimiter = v;
labCurve.saturationlimit = v;
sharpening.enabled = v;
sharpening.radius = v;
sharpening.amount = v;
sharpening.threshold = v;
sharpening.edgesonly = v;
sharpening.edges_radius = v;
sharpening.edges_tolerance = v;
sharpening.halocontrol = v;
sharpening.halocontrol_amount= v;
sharpening.method = v;
sharpening.deconvamount = v;
sharpening.deconvradius = v;
sharpening.deconviter = v;
sharpening.deconvdamping = v;
labCurve.saturationlimit = v;
sharpening.enabled = v;
sharpening.radius = v;
sharpening.amount = v;
sharpening.threshold = v;
sharpening.edgesonly = v;
sharpening.edges_radius = v;
sharpening.edges_tolerance = v;
sharpening.halocontrol = v;
sharpening.halocontrol_amount = v;
sharpening.method = v;
sharpening.deconvamount = v;
sharpening.deconvradius = v;
sharpening.deconviter = v;
sharpening.deconvdamping = v;
sharpenEdge.enabled = v;
sharpenEdge.passes = v;
sharpenEdge.amount = v;
sharpenEdge.amount = v;
sharpenEdge.threechannels = v;
sharpenMicro.enabled = v;
sharpenMicro.matrix = v;
sharpenMicro.amount = v;
sharpenMicro.amount = v;
sharpenMicro.uniformity = v;
vibrance.enabled = v;
vibrance.pastels = v;
vibrance.saturated = v;
vibrance.psthreshold = v;
vibrance.protectskins = v;
vibrance.avoidcolorshift = v;
vibrance.pastsattog = v;
colorBoost.amount = v;
colorBoost.avoidclip = v;
colorBoost.enable_saturationlimiter = v;
colorBoost.saturationlimit = v;
wb.method = v;
wb.green = v;
wb.temperature = v;
colorShift.a = v;
colorShift.b = v;
lumaDenoise.enabled = v;
lumaDenoise.radius = v;
lumaDenoise.edgetolerance = v;
colorDenoise.enabled = v;
colorDenoise.amount = v;
defringe.enabled = v;
defringe.radius = v;
defringe.threshold = v;
impulseDenoise.enabled = v;
impulseDenoise.thresh = v;
dirpyrDenoise.enabled = v;
dirpyrDenoise.luma = v;
dirpyrDenoise.chroma = v;
dirpyrDenoise.gamma = v;
wb.method = v;
wb.green = v;
wb.temperature = v;
colorShift.a = v;
colorShift.b = v;
lumaDenoise.enabled = v;
lumaDenoise.radius = v;
lumaDenoise.edgetolerance = v;
colorDenoise.enabled = v;
colorDenoise.amount = v;
defringe.enabled = v;
defringe.radius = v;
defringe.threshold = v;
impulseDenoise.enabled = v;
impulseDenoise.thresh = v;
dirpyrDenoise.enabled = v;
dirpyrDenoise.luma = v;
dirpyrDenoise.chroma = v;
dirpyrDenoise.gamma = v;
sh.enabled = v;
sh.hq = v;
sh.highlights = v;
@@ -217,7 +224,7 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
labCurve.brightness = labCurve.brightness && p.labCurve.brightness == other.labCurve.brightness;
labCurve.contrast = labCurve.contrast && p.labCurve.contrast == other.labCurve.contrast;
labCurve.saturation = labCurve.saturation && p.labCurve.saturation == other.labCurve.saturation;
labCurve.avoidclip = labCurve.avoidclip && p.labCurve.avoidclip == other.labCurve.avoidclip;
labCurve.avoidclip = labCurve.avoidclip && p.labCurve.avoidclip == other.labCurve.avoidclip;
labCurve.enable_saturationlimiter = labCurve.enable_saturationlimiter && p.labCurve.enable_saturationlimiter == other.labCurve.enable_saturationlimiter;
labCurve.saturationlimit = labCurve.saturationlimit && p.labCurve.saturationlimit == other.labCurve.saturationlimit;
sharpenEdge.enabled = sharpenEdge.enabled && p.sharpenEdge.enabled == other.sharpenEdge.enabled;
@@ -242,6 +249,13 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
sharpening.deconvradius = sharpening.deconvradius && p.sharpening.deconvradius == other.sharpening.deconvradius;
sharpening.deconviter = sharpening.deconviter && p.sharpening.deconviter == other.sharpening.deconviter;
sharpening.deconvdamping = sharpening.deconvdamping && p.sharpening.deconvdamping == other.sharpening.deconvdamping;
vibrance.enabled = vibrance.enabled && p.vibrance.enabled == other.vibrance.enabled;
vibrance.pastels = vibrance.pastels && p.vibrance.pastels == other.vibrance.pastels;
vibrance.saturated = vibrance.saturated && p.vibrance.saturated == other.vibrance.saturated;
vibrance.psthreshold = vibrance.psthreshold && p.vibrance.psthreshold == other.vibrance.psthreshold;
vibrance.protectskins = vibrance.protectskins && p.vibrance.protectskins == other.vibrance.protectskins;
vibrance.avoidcolorshift = vibrance.avoidcolorshift && p.vibrance.avoidcolorshift == other.vibrance.avoidcolorshift;
vibrance.pastsattog = vibrance.pastsattog && p.vibrance.pastsattog == other.vibrance.pastsattog;
colorBoost.amount = colorBoost.amount && p.colorBoost.amount == other.colorBoost.amount;
colorBoost.avoidclip = colorBoost.avoidclip && p.colorBoost.avoidclip == other.colorBoost.avoidclip;
colorBoost.enable_saturationlimiter = colorBoost.enable_saturationlimiter && p.colorBoost.enable_saturationlimiter == other.colorBoost.enable_saturationlimiter;
@@ -259,7 +273,7 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
defringe.enabled = defringe.enabled && p.defringe.enabled == other.defringe.enabled;
defringe.radius = defringe.radius && p.defringe.radius == other.defringe.radius;
defringe.threshold = defringe.threshold && p.defringe.threshold == other.defringe.threshold;
impulseDenoise.enabled = impulseDenoise.enabled && p.impulseDenoise.enabled == other.impulseDenoise.enabled;
impulseDenoise.thresh = impulseDenoise.thresh && p.impulseDenoise.thresh == other.impulseDenoise.thresh;
@@ -390,7 +404,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if (labCurve.saturationlimit) toEdit.labCurve.saturationlimit = mods.labCurve.saturationlimit;
if (sharpenEdge.enabled) toEdit.sharpenEdge.enabled = mods.sharpenEdge.enabled;
if (sharpenEdge.passes) toEdit.sharpenEdge.passes = dontforceSet && options.baBehav[ADDSET_SHARPENEDGE_PASS] ? toEdit.sharpenEdge.passes + mods.sharpenEdge.passes : mods.sharpenEdge.passes;
if (sharpenEdge.amount) toEdit.sharpenEdge.amount = dontforceSet && options.baBehav[ADDSET_SHARPENEDGE_AMOUNT] ? toEdit.sharpenEdge.amount + mods.sharpenEdge.amount : mods.sharpenEdge.amount;
if (sharpenEdge.amount) toEdit.sharpenEdge.amount = dontforceSet && options.baBehav[ADDSET_SHARPENEDGE_AMOUNT] ? toEdit.sharpenEdge.amount + mods.sharpenEdge.amount : mods.sharpenEdge.amount;
if (sharpenEdge.threechannels) toEdit.sharpenEdge.threechannels = mods.sharpenEdge.threechannels;
if (sharpenMicro.enabled) toEdit.sharpenMicro.enabled = mods.sharpenMicro.enabled;
if (sharpenMicro.matrix) toEdit.sharpenMicro.matrix = mods.sharpenMicro.matrix;
@@ -402,15 +416,22 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if (sharpening.threshold) toEdit.sharpening.threshold = mods.sharpening.threshold;
if (sharpening.edgesonly) toEdit.sharpening.edgesonly = mods.sharpening.edgesonly;
if (sharpening.edges_radius) toEdit.sharpening.edges_radius = mods.sharpening.edges_radius;
if (sharpening.edges_tolerance) toEdit.sharpening.edges_tolerance = mods.sharpening.edges_tolerance;
if (sharpening.halocontrol) toEdit.sharpening.halocontrol = mods.sharpening.halocontrol;
if (sharpening.halocontrol_amount) toEdit.sharpening.halocontrol_amount = mods.sharpening.halocontrol_amount;
if (sharpening.method) toEdit.sharpening.method = mods.sharpening.method;
if (sharpening.edges_tolerance) toEdit.sharpening.edges_tolerance = mods.sharpening.edges_tolerance;
if (sharpening.halocontrol) toEdit.sharpening.halocontrol = mods.sharpening.halocontrol;
if (sharpening.halocontrol_amount) toEdit.sharpening.halocontrol_amount = mods.sharpening.halocontrol_amount;
if (sharpening.method) toEdit.sharpening.method = mods.sharpening.method;
if (sharpening.deconvamount) toEdit.sharpening.deconvamount = dontforceSet && options.baBehav[ADDSET_SHARP_AMOUNT] ? toEdit.sharpening.deconvamount + mods.sharpening.deconvamount : mods.sharpening.deconvamount;
if (sharpening.deconvradius) toEdit.sharpening.deconvradius = mods.sharpening.deconvradius;
if (sharpening.deconviter) toEdit.sharpening.deconviter = mods.sharpening.deconviter;
if (sharpening.deconvdamping) toEdit.sharpening.deconvdamping = mods.sharpening.deconvdamping;
if (colorBoost.amount) toEdit.colorBoost.amount = dontforceSet && options.baBehav[ADDSET_CBOOST_AMOUNT] ? toEdit.colorBoost.amount + mods.colorBoost.amount : mods.colorBoost.amount;
if (sharpening.deconvdamping) toEdit.sharpening.deconvdamping = mods.sharpening.deconvdamping;
if (vibrance.enabled) toEdit.vibrance.enabled = mods.vibrance.enabled;
if (vibrance.pastels) toEdit.vibrance.pastels = dontforceSet && options.baBehav[ADDSET_VIBRANCE_PASTELS] ? toEdit.vibrance.pastels + mods.vibrance.pastels : mods.vibrance.pastels;
if (vibrance.saturated) toEdit.vibrance.saturated = dontforceSet && options.baBehav[ADDSET_VIBRANCE_SATURATED] ? toEdit.vibrance.saturated + mods.vibrance.saturated : mods.vibrance.saturated;
if (vibrance.psthreshold) toEdit.vibrance.psthreshold = dontforceSet && options.baBehav[ADDSET_VIBRANCE_PSTHRESHOLD] ? toEdit.vibrance.psthreshold + mods.vibrance.psthreshold : mods.vibrance.psthreshold;
if (vibrance.protectskins) toEdit.vibrance.protectskins = mods.vibrance.protectskins;
if (vibrance.avoidcolorshift) toEdit.vibrance.avoidcolorshift = mods.vibrance.avoidcolorshift;
if (vibrance.pastsattog) toEdit.vibrance.pastsattog = mods.vibrance.pastsattog;
if (colorBoost.amount) toEdit.colorBoost.amount = dontforceSet && options.baBehav[ADDSET_CBOOST_AMOUNT] ? toEdit.colorBoost.amount + mods.colorBoost.amount : mods.colorBoost.amount;
if (colorBoost.avoidclip) toEdit.colorBoost.avoidclip = mods.colorBoost.avoidclip;
if (colorBoost.enable_saturationlimiter)toEdit.colorBoost.enable_saturationlimiter = mods.colorBoost.enable_saturationlimiter;
if (colorBoost.saturationlimit) toEdit.colorBoost.saturationlimit = mods.colorBoost.saturationlimit;
@@ -428,7 +449,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if (defringe.enabled) toEdit.defringe.enabled = mods.defringe.enabled;
if (defringe.radius) toEdit.defringe.radius = mods.defringe.radius;
if (defringe.threshold) toEdit.defringe.threshold = mods.defringe.threshold;
if (impulseDenoise.enabled) toEdit.impulseDenoise.enabled = mods.impulseDenoise.enabled;
if (impulseDenoise.thresh) toEdit.impulseDenoise.thresh = mods.impulseDenoise.thresh;