Option Fftwsigma (true) to have substantially the same results FFTW Gaussianblur
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
extern const Settings* settings;
|
||||
|
||||
LocallabParams locallab; ///< Local lab parameters
|
||||
|
||||
void ImProcFunctions::localContrast(LabImage *lab, float **destination, const LocalContrastParams &localContrastParams, bool fftwlc, double scale)
|
||||
@@ -59,11 +61,15 @@ void ImProcFunctions::localContrast(LabImage *lab, float **destination, const Lo
|
||||
//emprical adjustement between FFTW radius and Gaussainblur
|
||||
//under 50 ==> 10.f
|
||||
//above 400 ==> 1.f
|
||||
float ak = -9.f / 350.f;
|
||||
float bk = 10.f - 50.f * ak;
|
||||
kr = ak * sigma + bk;
|
||||
if(sigma < 50.f) kr = 10.f;
|
||||
if(sigma > 400.f) kr = 1.f;
|
||||
if(settings->fftwsigma == false) {//empirical formula
|
||||
float ak = -9.f / 350.f;
|
||||
float bk = 10.f - 50.f * ak;
|
||||
kr = ak * sigma + bk;
|
||||
if(sigma < 50.f) kr = 10.f;
|
||||
if(sigma > 400.f) kr = 1.f;
|
||||
} else {//sigma *= sigma
|
||||
kr = sigma;
|
||||
}
|
||||
// printf("kr=%f \n", kr);
|
||||
ImProcFunctions::fftw_convol_blur2(lab->L, buf, width, height, kr * sigma, 0, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user