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) {
|
||||
|
@ -1,132 +1,123 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* RawTherapee is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __PROCEVENT__
|
||||
#define __PROCEVENT__
|
||||
|
||||
#include <rtengine.h>
|
||||
|
||||
<<<<<<< local
|
||||
#define NUMOFEVENTS 91
|
||||
=======
|
||||
#define NUMOFEVENTS 90
|
||||
>>>>>>> other
|
||||
|
||||
namespace rtengine {
|
||||
|
||||
enum ProcEvent {
|
||||
EvPhotoLoaded=0,
|
||||
EvProfileLoaded=1,
|
||||
EvProfileChanged=2,
|
||||
EvHistoryBrowsed=3,
|
||||
EvBrightness=4,
|
||||
EvContrast=5,
|
||||
EvBlack=6,
|
||||
EvExpComp=7,
|
||||
EvHLCompr=8,
|
||||
EvSHCompr=9,
|
||||
EvToneCurve=10,
|
||||
EvAutoExp=11,
|
||||
EvClip=12,
|
||||
EvLBrightness=13,
|
||||
EvLContrast=14,
|
||||
EvLBlack=15,
|
||||
EvLHLCompr=16,
|
||||
EvLSHCompr=17,
|
||||
EvLCurve=18,
|
||||
EvShrEnabled=19,
|
||||
EvShrRadius=20,
|
||||
EvShrAmount=21,
|
||||
EvShrThresh=22,
|
||||
EvShrEdgeOnly=23,
|
||||
EvShrEdgeRadius=24,
|
||||
EvShrEdgeTolerance=25,
|
||||
EvShrHaloControl=26,
|
||||
EvShrHaloAmount=27,
|
||||
EvShrMethod=28,
|
||||
EvShrDRadius=29,
|
||||
EvShrDAmount=30,
|
||||
EvShrDDamping=31,
|
||||
EvShrDIterations=32,
|
||||
EvCBAvoidClip=33,
|
||||
EvCBSatLimiter=34,
|
||||
EvCBSatLimit=35,
|
||||
EvCBBoost=36,
|
||||
EvWBMethod=37,
|
||||
EvWBTemp=38,
|
||||
EvWBGreen=39,
|
||||
EvCShiftA=40,
|
||||
EvCShiftB=41,
|
||||
EvLDNEnabled=42,
|
||||
EvLDNRadius=43,
|
||||
EvLDNEdgeTolerance=44,
|
||||
EvCDNEnabled=45,
|
||||
EvCDNRadius=46,
|
||||
EvCDNEdgeTolerance=47,
|
||||
EvCDNEdgeSensitive=48,
|
||||
EvSHEnabled=49,
|
||||
EvSHHighlights=50,
|
||||
EvSHShadows=51,
|
||||
EvSHHLTonalW=52,
|
||||
EvSHSHTonalW=53,
|
||||
EvSHLContrast=54,
|
||||
EvSHRadius=55,
|
||||
EvCTRotate=56,
|
||||
EvCTHFlip=57,
|
||||
EvCTVFlip=58,
|
||||
EvROTDegree=59,
|
||||
EvTransAutoFill=60,
|
||||
EvDISTAmount=61,
|
||||
EvBookmarkSelected=62,
|
||||
EvCrop=63,
|
||||
EvCACorr=64,
|
||||
EvHREnabled=65,
|
||||
EvHRAmount=66,
|
||||
EvHRMethod=67,
|
||||
EvWProfile=68,
|
||||
EvOProfile=69,
|
||||
EvIProfile=70,
|
||||
EvVignetting=71,
|
||||
EvChMixer=72,
|
||||
EvResizeScale=73,
|
||||
EvResizeMethod=74,
|
||||
EvExif=75,
|
||||
EvIPTC=76,
|
||||
EvResizeSpec=77,
|
||||
EvResizeWidth=78,
|
||||
EvResizeHeight=79,
|
||||
EvResizeEnabled=80,
|
||||
EvProfileChangeNotification=81,
|
||||
EvSHHighQuality=82,
|
||||
EvPerspCorr=83,
|
||||
EvEqualizer=84,
|
||||
EvEqlEnabled=85,
|
||||
EvIDNEnabled=86,
|
||||
<<<<<<< local
|
||||
EvIDNThresh=87,
|
||||
EvDPDNEnabled=88,
|
||||
EvDPDNLuma=89,
|
||||
EvDPDNChroma=90
|
||||
=======
|
||||
EvDPDNEnabled=87,
|
||||
EvDPDNLuma=88,
|
||||
EvDPDNChroma=89
|
||||
>>>>>>> other
|
||||
};
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* RawTherapee is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __PROCEVENT__
|
||||
#define __PROCEVENT__
|
||||
|
||||
#include <rtengine.h>
|
||||
|
||||
#define NUMOFEVENTS 91
|
||||
|
||||
|
||||
namespace rtengine {
|
||||
|
||||
enum ProcEvent {
|
||||
EvPhotoLoaded=0,
|
||||
EvProfileLoaded=1,
|
||||
EvProfileChanged=2,
|
||||
EvHistoryBrowsed=3,
|
||||
EvBrightness=4,
|
||||
EvContrast=5,
|
||||
EvBlack=6,
|
||||
EvExpComp=7,
|
||||
EvHLCompr=8,
|
||||
EvSHCompr=9,
|
||||
EvToneCurve=10,
|
||||
EvAutoExp=11,
|
||||
EvClip=12,
|
||||
EvLBrightness=13,
|
||||
EvLContrast=14,
|
||||
EvLBlack=15,
|
||||
EvLHLCompr=16,
|
||||
EvLSHCompr=17,
|
||||
EvLCurve=18,
|
||||
EvShrEnabled=19,
|
||||
EvShrRadius=20,
|
||||
EvShrAmount=21,
|
||||
EvShrThresh=22,
|
||||
EvShrEdgeOnly=23,
|
||||
EvShrEdgeRadius=24,
|
||||
EvShrEdgeTolerance=25,
|
||||
EvShrHaloControl=26,
|
||||
EvShrHaloAmount=27,
|
||||
EvShrMethod=28,
|
||||
EvShrDRadius=29,
|
||||
EvShrDAmount=30,
|
||||
EvShrDDamping=31,
|
||||
EvShrDIterations=32,
|
||||
EvCBAvoidClip=33,
|
||||
EvCBSatLimiter=34,
|
||||
EvCBSatLimit=35,
|
||||
EvCBBoost=36,
|
||||
EvWBMethod=37,
|
||||
EvWBTemp=38,
|
||||
EvWBGreen=39,
|
||||
EvCShiftA=40,
|
||||
EvCShiftB=41,
|
||||
EvLDNEnabled=42,
|
||||
EvLDNRadius=43,
|
||||
EvLDNEdgeTolerance=44,
|
||||
EvCDNEnabled=45,
|
||||
EvCDNRadius=46,
|
||||
EvCDNEdgeTolerance=47,
|
||||
EvCDNEdgeSensitive=48,
|
||||
EvSHEnabled=49,
|
||||
EvSHHighlights=50,
|
||||
EvSHShadows=51,
|
||||
EvSHHLTonalW=52,
|
||||
EvSHSHTonalW=53,
|
||||
EvSHLContrast=54,
|
||||
EvSHRadius=55,
|
||||
EvCTRotate=56,
|
||||
EvCTHFlip=57,
|
||||
EvCTVFlip=58,
|
||||
EvROTDegree=59,
|
||||
EvTransAutoFill=60,
|
||||
EvDISTAmount=61,
|
||||
EvBookmarkSelected=62,
|
||||
EvCrop=63,
|
||||
EvCACorr=64,
|
||||
EvHREnabled=65,
|
||||
EvHRAmount=66,
|
||||
EvHRMethod=67,
|
||||
EvWProfile=68,
|
||||
EvOProfile=69,
|
||||
EvIProfile=70,
|
||||
EvVignetting=71,
|
||||
EvChMixer=72,
|
||||
EvResizeScale=73,
|
||||
EvResizeMethod=74,
|
||||
EvExif=75,
|
||||
EvIPTC=76,
|
||||
EvResizeSpec=77,
|
||||
EvResizeWidth=78,
|
||||
EvResizeHeight=79,
|
||||
EvResizeEnabled=80,
|
||||
EvProfileChangeNotification=81,
|
||||
EvSHHighQuality=82,
|
||||
EvPerspCorr=83,
|
||||
EvEqualizer=84,
|
||||
EvEqlEnabled=85,
|
||||
EvIDNEnabled=86,
|
||||
EvIDNThresh=87,
|
||||
EvDPDNEnabled=88,
|
||||
EvDPDNLuma=89,
|
||||
EvDPDNChroma=90
|
||||
};
|
||||
}
|
||||
#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