Added a threshold slider to the impulse denoise tool. At large values it can lead to a bit of cratering, but otherwise it allows some flexibility that is useful as a precursor to the pyramid denoise filter. Small values on the slider are less impulse NR, larger values yield more NR.
This commit is contained in:
parent
1820978df4
commit
d556f04ddb
@ -566,10 +566,7 @@ TP_ICM_OUTPUTPROFILE;Output Profile
|
||||
TP_ICM_SAVEREFERENCE;Save reference image for profiling
|
||||
TP_ICM_WORKINGPROFILE;Working Profile
|
||||
TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction
|
||||
<<<<<<< local
|
||||
TP_IMPULSEDENOISE_THRESH;Threshold
|
||||
=======
|
||||
>>>>>>> other
|
||||
TP_LENSGEOM_AUTOCROP;Auto Crop
|
||||
TP_LENSGEOM_FILL;Auto Fill
|
||||
TP_LENSGEOM_LABEL;Lens / Geometry
|
||||
|
@ -177,10 +177,7 @@ void Crop::update (int todo, bool internal) {
|
||||
if (skip==1) {
|
||||
parent->ipf.colordenoise (labnCrop, cbuffer);
|
||||
parent->ipf.dirpyrdenoise (labnCrop);
|
||||
<<<<<<< local
|
||||
parent->ipf.sharpening (labnCrop, (unsigned short**)cbuffer);
|
||||
=======
|
||||
>>>>>>> other
|
||||
parent->ipf.waveletEqualizer(labnCrop, false, true);
|
||||
}
|
||||
}
|
||||
|
@ -434,11 +434,8 @@ void ImProcFunctions::colorCurve (LabImage* lold, LabImage* lnew) {
|
||||
|
||||
if (params->impulseDenoise.enabled && lab->W>=8 && lab->H>=8)
|
||||
|
||||
<<<<<<< local
|
||||
impulse_nr (lab->L, lab->L, lab->W, lab->H, (float)params->impulseDenoise.thresh/20.0 /*1024*/);
|
||||
=======
|
||||
impulse_nr (lab->L, lab->L, lab->W, lab->H, 1024);
|
||||
>>>>>>> other
|
||||
}
|
||||
|
||||
void ImProcFunctions::dirpyrdenoise (LabImage* lab) {
|
||||
|
@ -21,11 +21,8 @@
|
||||
|
||||
#include <rtengine.h>
|
||||
|
||||
<<<<<<< local
|
||||
#define NUMOFEVENTS 91
|
||||
=======
|
||||
#define NUMOFEVENTS 90
|
||||
>>>>>>> other
|
||||
|
||||
|
||||
namespace rtengine {
|
||||
|
||||
@ -117,16 +114,10 @@ enum ProcEvent {
|
||||
EvEqualizer=84,
|
||||
EvEqlEnabled=85,
|
||||
EvIDNEnabled=86,
|
||||
<<<<<<< local
|
||||
EvIDNThresh=87,
|
||||
EvDPDNEnabled=88,
|
||||
EvDPDNLuma=89,
|
||||
EvDPDNChroma=90
|
||||
=======
|
||||
EvDPDNEnabled=87,
|
||||
EvDPDNLuma=88,
|
||||
EvDPDNChroma=89
|
||||
>>>>>>> other
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
@ -96,10 +96,7 @@ void ProcParams::setDefaults () {
|
||||
colorDenoise.edgetolerance = 2000;
|
||||
|
||||
impulseDenoise.enabled = false;
|
||||
<<<<<<< local
|
||||
impulseDenoise.thresh = 50;
|
||||
=======
|
||||
>>>>>>> other
|
||||
|
||||
dirpyrDenoise.enabled = false;
|
||||
dirpyrDenoise.luma = 10;
|
||||
@ -249,12 +246,9 @@ int ProcParams::save (Glib::ustring fname) const {
|
||||
|
||||
// save impulseDenoise
|
||||
keyFile.set_boolean ("Impulse Denoising", "Enabled", impulseDenoise.enabled);
|
||||
<<<<<<< local
|
||||
keyFile.set_integer ("Impulse Denoising", "Threshold", impulseDenoise.thresh);
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> other
|
||||
// save dirpyrDenoise
|
||||
keyFile.set_boolean ("Directional Pyramid Denoising", "Enabled", dirpyrDenoise.enabled);
|
||||
keyFile.set_integer ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma);
|
||||
@ -470,10 +464,7 @@ if (keyFile.has_group ("Color Shift")) {
|
||||
// load impulseDenoise
|
||||
if (keyFile.has_group ("Impulse Denoising")) {
|
||||
if (keyFile.has_key ("Impulse Denoising", "Enabled")) impulseDenoise.enabled = keyFile.get_boolean ("Impulse Denoising", "Enabled");
|
||||
<<<<<<< local
|
||||
if (keyFile.has_key ("Impulse Denoising", "Threshold")) impulseDenoise.thresh = keyFile.get_integer ("Impulse Denoising", "Threshold");
|
||||
=======
|
||||
>>>>>>> other
|
||||
}
|
||||
|
||||
// load dirpyrDenoise
|
||||
@ -688,10 +679,7 @@ bool ProcParams::operator== (const ProcParams& other) {
|
||||
&& colorShift.a == other.colorShift.a
|
||||
&& colorShift.b == other.colorShift.b
|
||||
&& impulseDenoise.enabled == other.impulseDenoise.enabled
|
||||
<<<<<<< local
|
||||
&& impulseDenoise.thresh == other.impulseDenoise.thresh
|
||||
=======
|
||||
>>>>>>> other
|
||||
&& dirpyrDenoise.enabled == other.dirpyrDenoise.enabled
|
||||
&& dirpyrDenoise.luma == other.dirpyrDenoise.luma
|
||||
&& dirpyrDenoise.chroma == other.dirpyrDenoise.chroma
|
||||
|
@ -140,10 +140,8 @@ class ColorDenoiseParams {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
<<<<<<< local
|
||||
int thresh;
|
||||
=======
|
||||
>>>>>>> other
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -106,10 +106,7 @@ TRANSFORM, // EvPerspCorr
|
||||
EQUALIZER, // EvEqualizer
|
||||
EQUALIZER, // EvEqlEnabled
|
||||
IMPULSEDENOISE, // EvIDNEnabled,
|
||||
<<<<<<< local
|
||||
IMPULSEDENOISE, // EvIDNThresh,
|
||||
=======
|
||||
>>>>>>> other
|
||||
DIRPYRDENOISE, // EvDPDNEnabled,
|
||||
DIRPYRDENOISE, // EvDPDNLuma,
|
||||
DIRPYRDENOISE // EvDPDNChroma,
|
||||
|
@ -28,23 +28,12 @@
|
||||
#define AUTOEXP 31
|
||||
#define RGBCURVE 15
|
||||
#define LUMINANCECURVE 6
|
||||
<<<<<<< local
|
||||
#define SHARPENING 3//2
|
||||
#define IMPULSEDENOISE 3//2
|
||||
#define LUMADENOISE 3//2
|
||||
=======
|
||||
#define SHARPENING 2
|
||||
#define IMPULSEDENOISE 2
|
||||
#define LUMADENOISE 2
|
||||
>>>>>>> other
|
||||
#define WHITEBALANCE 255
|
||||
<<<<<<< local
|
||||
#define COLORBOOST 3//1
|
||||
#define COLORDENOISE 3//1
|
||||
=======
|
||||
#define COLORBOOST 1
|
||||
#define COLORDENOISE 1
|
||||
>>>>>>> other
|
||||
#define DIRPYRDENOISE 3
|
||||
#define CROP 16384
|
||||
#define EXIF 32768
|
||||
|
@ -69,10 +69,7 @@ void ParamsEdited::set (bool v) {
|
||||
colorDenoise.enabled = v;
|
||||
colorDenoise.amount = v;
|
||||
impulseDenoise.enabled = v;
|
||||
<<<<<<< local
|
||||
impulseDenoise.thresh = v;
|
||||
=======
|
||||
>>>>>>> other
|
||||
dirpyrDenoise.enabled = v;
|
||||
dirpyrDenoise.luma = v;
|
||||
dirpyrDenoise.chroma = v;
|
||||
@ -190,10 +187,7 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
colorDenoise.amount = colorDenoise.amount && p.colorDenoise.amount == other.colorDenoise.amount;
|
||||
|
||||
impulseDenoise.enabled = impulseDenoise.enabled && p.impulseDenoise.enabled == other.impulseDenoise.enabled;
|
||||
<<<<<<< local
|
||||
impulseDenoise.thresh = impulseDenoise.thresh && p.impulseDenoise.thresh == other.impulseDenoise.thresh;
|
||||
=======
|
||||
>>>>>>> other
|
||||
|
||||
dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled;
|
||||
dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma;
|
||||
@ -303,10 +297,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
if (colorDenoise.amount) toEdit.colorDenoise.amount = mods.colorDenoise.amount;
|
||||
|
||||
if (impulseDenoise.enabled) toEdit.impulseDenoise.enabled = mods.impulseDenoise.enabled;
|
||||
<<<<<<< local
|
||||
if (impulseDenoise.thresh) toEdit.impulseDenoise.thresh = mods.impulseDenoise.thresh;
|
||||
=======
|
||||
>>>>>>> other
|
||||
|
||||
if (dirpyrDenoise.enabled) toEdit.dirpyrDenoise.enabled = mods.dirpyrDenoise.enabled;
|
||||
if (dirpyrDenoise.luma) toEdit.dirpyrDenoise.luma = mods.dirpyrDenoise.luma;
|
||||
|
@ -109,10 +109,8 @@ class ImpulseDenoiseParamsEdited {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
<<<<<<< local
|
||||
bool thresh;
|
||||
=======
|
||||
>>>>>>> other
|
||||
|
||||
};
|
||||
|
||||
class DirPyrDenoiseParamsEdited {
|
||||
|
Loading…
x
Reference in New Issue
Block a user