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_SAVEREFERENCE;Save reference image for profiling
|
||||||
TP_ICM_WORKINGPROFILE;Working Profile
|
TP_ICM_WORKINGPROFILE;Working Profile
|
||||||
TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction
|
TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction
|
||||||
<<<<<<< local
|
|
||||||
TP_IMPULSEDENOISE_THRESH;Threshold
|
TP_IMPULSEDENOISE_THRESH;Threshold
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
TP_LENSGEOM_AUTOCROP;Auto Crop
|
TP_LENSGEOM_AUTOCROP;Auto Crop
|
||||||
TP_LENSGEOM_FILL;Auto Fill
|
TP_LENSGEOM_FILL;Auto Fill
|
||||||
TP_LENSGEOM_LABEL;Lens / Geometry
|
TP_LENSGEOM_LABEL;Lens / Geometry
|
||||||
|
@ -177,10 +177,7 @@ void Crop::update (int todo, bool internal) {
|
|||||||
if (skip==1) {
|
if (skip==1) {
|
||||||
parent->ipf.colordenoise (labnCrop, cbuffer);
|
parent->ipf.colordenoise (labnCrop, cbuffer);
|
||||||
parent->ipf.dirpyrdenoise (labnCrop);
|
parent->ipf.dirpyrdenoise (labnCrop);
|
||||||
<<<<<<< local
|
|
||||||
parent->ipf.sharpening (labnCrop, (unsigned short**)cbuffer);
|
parent->ipf.sharpening (labnCrop, (unsigned short**)cbuffer);
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
parent->ipf.waveletEqualizer(labnCrop, false, true);
|
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)
|
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, (float)params->impulseDenoise.thresh/20.0 /*1024*/);
|
||||||
=======
|
|
||||||
impulse_nr (lab->L, lab->L, lab->W, lab->H, 1024);
|
impulse_nr (lab->L, lab->L, lab->W, lab->H, 1024);
|
||||||
>>>>>>> other
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImProcFunctions::dirpyrdenoise (LabImage* lab) {
|
void ImProcFunctions::dirpyrdenoise (LabImage* lab) {
|
||||||
|
@ -21,11 +21,8 @@
|
|||||||
|
|
||||||
#include <rtengine.h>
|
#include <rtengine.h>
|
||||||
|
|
||||||
<<<<<<< local
|
|
||||||
#define NUMOFEVENTS 91
|
#define NUMOFEVENTS 91
|
||||||
=======
|
|
||||||
#define NUMOFEVENTS 90
|
|
||||||
>>>>>>> other
|
|
||||||
|
|
||||||
namespace rtengine {
|
namespace rtengine {
|
||||||
|
|
||||||
@ -117,16 +114,10 @@ enum ProcEvent {
|
|||||||
EvEqualizer=84,
|
EvEqualizer=84,
|
||||||
EvEqlEnabled=85,
|
EvEqlEnabled=85,
|
||||||
EvIDNEnabled=86,
|
EvIDNEnabled=86,
|
||||||
<<<<<<< local
|
|
||||||
EvIDNThresh=87,
|
EvIDNThresh=87,
|
||||||
EvDPDNEnabled=88,
|
EvDPDNEnabled=88,
|
||||||
EvDPDNLuma=89,
|
EvDPDNLuma=89,
|
||||||
EvDPDNChroma=90
|
EvDPDNChroma=90
|
||||||
=======
|
|
||||||
EvDPDNEnabled=87,
|
|
||||||
EvDPDNLuma=88,
|
|
||||||
EvDPDNChroma=89
|
|
||||||
>>>>>>> other
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,10 +96,7 @@ void ProcParams::setDefaults () {
|
|||||||
colorDenoise.edgetolerance = 2000;
|
colorDenoise.edgetolerance = 2000;
|
||||||
|
|
||||||
impulseDenoise.enabled = false;
|
impulseDenoise.enabled = false;
|
||||||
<<<<<<< local
|
|
||||||
impulseDenoise.thresh = 50;
|
impulseDenoise.thresh = 50;
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
|
|
||||||
dirpyrDenoise.enabled = false;
|
dirpyrDenoise.enabled = false;
|
||||||
dirpyrDenoise.luma = 10;
|
dirpyrDenoise.luma = 10;
|
||||||
@ -249,12 +246,9 @@ int ProcParams::save (Glib::ustring fname) const {
|
|||||||
|
|
||||||
// save impulseDenoise
|
// save impulseDenoise
|
||||||
keyFile.set_boolean ("Impulse Denoising", "Enabled", impulseDenoise.enabled);
|
keyFile.set_boolean ("Impulse Denoising", "Enabled", impulseDenoise.enabled);
|
||||||
<<<<<<< local
|
|
||||||
keyFile.set_integer ("Impulse Denoising", "Threshold", impulseDenoise.thresh);
|
keyFile.set_integer ("Impulse Denoising", "Threshold", impulseDenoise.thresh);
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> other
|
|
||||||
// save dirpyrDenoise
|
// save dirpyrDenoise
|
||||||
keyFile.set_boolean ("Directional Pyramid Denoising", "Enabled", dirpyrDenoise.enabled);
|
keyFile.set_boolean ("Directional Pyramid Denoising", "Enabled", dirpyrDenoise.enabled);
|
||||||
keyFile.set_integer ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma);
|
keyFile.set_integer ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma);
|
||||||
@ -470,10 +464,7 @@ if (keyFile.has_group ("Color Shift")) {
|
|||||||
// load impulseDenoise
|
// load impulseDenoise
|
||||||
if (keyFile.has_group ("Impulse Denoising")) {
|
if (keyFile.has_group ("Impulse Denoising")) {
|
||||||
if (keyFile.has_key ("Impulse Denoising", "Enabled")) impulseDenoise.enabled = keyFile.get_boolean ("Impulse Denoising", "Enabled");
|
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");
|
if (keyFile.has_key ("Impulse Denoising", "Threshold")) impulseDenoise.thresh = keyFile.get_integer ("Impulse Denoising", "Threshold");
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load dirpyrDenoise
|
// load dirpyrDenoise
|
||||||
@ -688,10 +679,7 @@ bool ProcParams::operator== (const ProcParams& other) {
|
|||||||
&& colorShift.a == other.colorShift.a
|
&& colorShift.a == other.colorShift.a
|
||||||
&& colorShift.b == other.colorShift.b
|
&& colorShift.b == other.colorShift.b
|
||||||
&& impulseDenoise.enabled == other.impulseDenoise.enabled
|
&& impulseDenoise.enabled == other.impulseDenoise.enabled
|
||||||
<<<<<<< local
|
|
||||||
&& impulseDenoise.thresh == other.impulseDenoise.thresh
|
&& impulseDenoise.thresh == other.impulseDenoise.thresh
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
&& dirpyrDenoise.enabled == other.dirpyrDenoise.enabled
|
&& dirpyrDenoise.enabled == other.dirpyrDenoise.enabled
|
||||||
&& dirpyrDenoise.luma == other.dirpyrDenoise.luma
|
&& dirpyrDenoise.luma == other.dirpyrDenoise.luma
|
||||||
&& dirpyrDenoise.chroma == other.dirpyrDenoise.chroma
|
&& dirpyrDenoise.chroma == other.dirpyrDenoise.chroma
|
||||||
|
@ -140,10 +140,8 @@ class ColorDenoiseParams {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
bool enabled;
|
bool enabled;
|
||||||
<<<<<<< local
|
|
||||||
int thresh;
|
int thresh;
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,10 +106,7 @@ TRANSFORM, // EvPerspCorr
|
|||||||
EQUALIZER, // EvEqualizer
|
EQUALIZER, // EvEqualizer
|
||||||
EQUALIZER, // EvEqlEnabled
|
EQUALIZER, // EvEqlEnabled
|
||||||
IMPULSEDENOISE, // EvIDNEnabled,
|
IMPULSEDENOISE, // EvIDNEnabled,
|
||||||
<<<<<<< local
|
|
||||||
IMPULSEDENOISE, // EvIDNThresh,
|
IMPULSEDENOISE, // EvIDNThresh,
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
DIRPYRDENOISE, // EvDPDNEnabled,
|
DIRPYRDENOISE, // EvDPDNEnabled,
|
||||||
DIRPYRDENOISE, // EvDPDNLuma,
|
DIRPYRDENOISE, // EvDPDNLuma,
|
||||||
DIRPYRDENOISE // EvDPDNChroma,
|
DIRPYRDENOISE // EvDPDNChroma,
|
||||||
|
@ -28,23 +28,12 @@
|
|||||||
#define AUTOEXP 31
|
#define AUTOEXP 31
|
||||||
#define RGBCURVE 15
|
#define RGBCURVE 15
|
||||||
#define LUMINANCECURVE 6
|
#define LUMINANCECURVE 6
|
||||||
<<<<<<< local
|
|
||||||
#define SHARPENING 3//2
|
|
||||||
#define IMPULSEDENOISE 3//2
|
|
||||||
#define LUMADENOISE 3//2
|
|
||||||
=======
|
|
||||||
#define SHARPENING 2
|
#define SHARPENING 2
|
||||||
#define IMPULSEDENOISE 2
|
#define IMPULSEDENOISE 2
|
||||||
#define LUMADENOISE 2
|
#define LUMADENOISE 2
|
||||||
>>>>>>> other
|
|
||||||
#define WHITEBALANCE 255
|
#define WHITEBALANCE 255
|
||||||
<<<<<<< local
|
|
||||||
#define COLORBOOST 3//1
|
|
||||||
#define COLORDENOISE 3//1
|
|
||||||
=======
|
|
||||||
#define COLORBOOST 1
|
#define COLORBOOST 1
|
||||||
#define COLORDENOISE 1
|
#define COLORDENOISE 1
|
||||||
>>>>>>> other
|
|
||||||
#define DIRPYRDENOISE 3
|
#define DIRPYRDENOISE 3
|
||||||
#define CROP 16384
|
#define CROP 16384
|
||||||
#define EXIF 32768
|
#define EXIF 32768
|
||||||
|
@ -69,10 +69,7 @@ void ParamsEdited::set (bool v) {
|
|||||||
colorDenoise.enabled = v;
|
colorDenoise.enabled = v;
|
||||||
colorDenoise.amount = v;
|
colorDenoise.amount = v;
|
||||||
impulseDenoise.enabled = v;
|
impulseDenoise.enabled = v;
|
||||||
<<<<<<< local
|
|
||||||
impulseDenoise.thresh = v;
|
impulseDenoise.thresh = v;
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
dirpyrDenoise.enabled = v;
|
dirpyrDenoise.enabled = v;
|
||||||
dirpyrDenoise.luma = v;
|
dirpyrDenoise.luma = v;
|
||||||
dirpyrDenoise.chroma = 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;
|
colorDenoise.amount = colorDenoise.amount && p.colorDenoise.amount == other.colorDenoise.amount;
|
||||||
|
|
||||||
impulseDenoise.enabled = impulseDenoise.enabled && p.impulseDenoise.enabled == other.impulseDenoise.enabled;
|
impulseDenoise.enabled = impulseDenoise.enabled && p.impulseDenoise.enabled == other.impulseDenoise.enabled;
|
||||||
<<<<<<< local
|
|
||||||
impulseDenoise.thresh = impulseDenoise.thresh && p.impulseDenoise.thresh == other.impulseDenoise.thresh;
|
impulseDenoise.thresh = impulseDenoise.thresh && p.impulseDenoise.thresh == other.impulseDenoise.thresh;
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
|
|
||||||
dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled;
|
dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled;
|
||||||
dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma;
|
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 (colorDenoise.amount) toEdit.colorDenoise.amount = mods.colorDenoise.amount;
|
||||||
|
|
||||||
if (impulseDenoise.enabled) toEdit.impulseDenoise.enabled = mods.impulseDenoise.enabled;
|
if (impulseDenoise.enabled) toEdit.impulseDenoise.enabled = mods.impulseDenoise.enabled;
|
||||||
<<<<<<< local
|
|
||||||
if (impulseDenoise.thresh) toEdit.impulseDenoise.thresh = mods.impulseDenoise.thresh;
|
if (impulseDenoise.thresh) toEdit.impulseDenoise.thresh = mods.impulseDenoise.thresh;
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
|
|
||||||
if (dirpyrDenoise.enabled) toEdit.dirpyrDenoise.enabled = mods.dirpyrDenoise.enabled;
|
if (dirpyrDenoise.enabled) toEdit.dirpyrDenoise.enabled = mods.dirpyrDenoise.enabled;
|
||||||
if (dirpyrDenoise.luma) toEdit.dirpyrDenoise.luma = mods.dirpyrDenoise.luma;
|
if (dirpyrDenoise.luma) toEdit.dirpyrDenoise.luma = mods.dirpyrDenoise.luma;
|
||||||
|
@ -109,10 +109,8 @@ class ImpulseDenoiseParamsEdited {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
bool enabled;
|
bool enabled;
|
||||||
<<<<<<< local
|
|
||||||
bool thresh;
|
bool thresh;
|
||||||
=======
|
|
||||||
>>>>>>> other
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class DirPyrDenoiseParamsEdited {
|
class DirPyrDenoiseParamsEdited {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user