Clean code exposure PDE
This commit is contained in:
@@ -2086,7 +2086,7 @@ TP_LOCALLAB_LIGHTRETI;Lightness
|
||||
TP_LOCALLAB_THRESRETI;Threshold
|
||||
TP_LOCALLAB_DENOIS;Denoise
|
||||
TP_LOCALLAB_DEHAZ;Dehaze
|
||||
TP_LOCALLAB_EXPMETHOD_TOOLTIP;Standard : use an algorithm similar as main Exposure but in L*a*b* and taking account of deltaE.\n\nLaplacian & PDE : use another algorithm also with deltaE and with Poisson equation to solve Laplacian in Fourier space.\nPDE lead to very different results and needs differents settings that Standard\nMay be usefull for low exposure.\nPDE reduce artifacts and noise.
|
||||
TP_LOCALLAB_EXPMETHOD_TOOLTIP;Standard : use an algorithm similar as main Exposure but in L*a*b* and taking account of deltaE.\n\nLaplacian & PDE : use another algorithm also with deltaE and with Poisson equation to solve Laplacian in Fourier space.\nPDE lead to very different results and needs differents settings that Standard (negative black, gamma < 1,...)\nMay be usefull for low exposure.\nPDE reduce artifacts and noise.
|
||||
TP_LOCALLAB_FFTW;Use Fast Fourier Transform
|
||||
TP_LOCALLAB_GRIDONE;Color Toning
|
||||
TP_LOCALLAB_GRIDTWO;Direct
|
||||
|
@@ -9089,8 +9089,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
float *datain = new float[bfwr * bfhr];
|
||||
float *dataout = new float[bfwr * bfhr];
|
||||
float *dataor = new float[bfwr * bfhr];
|
||||
Imagefloat *tmpImage = nullptr;
|
||||
tmpImage = new Imagefloat(bfwr, bfhr);
|
||||
float gam = params->locallab.spots.at(sp).gamm;
|
||||
float igam = 1.f / gam;
|
||||
#ifdef _OPENMP
|
||||
@@ -9099,19 +9097,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
|
||||
for (int y = 0; y < bfhr; y++) {
|
||||
for (int x = 0; x < bfwr; x++) {
|
||||
float LogL = 1.f;
|
||||
float X, Y, Z;
|
||||
float L = bufexpfin->L[y][x] / 32768.f;
|
||||
/* float a = bufexpfin->a[y][x];
|
||||
float b = bufexpfin->b[y][x];
|
||||
Color::Lab2XYZ(L, a, b, X, Y, Z);
|
||||
tmpImage->r(y, x) = X;
|
||||
tmpImage->g(y, x) = Y;
|
||||
tmpImage->b(y, x) = Z;
|
||||
*/
|
||||
float L = LIM01(bufexpfin->L[y][x] / 32768.f);//chnage gamma for Laplacian
|
||||
L = pow(L, gam);
|
||||
L *= 32768.f;
|
||||
|
||||
datain[y * bfwr + x] = L;
|
||||
dataor[y * bfwr + x] = L;
|
||||
}
|
||||
@@ -9125,17 +9113,12 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
|
||||
for (int y = 0; y < bfhr; y++) {
|
||||
for (int x = 0; x < bfwr; x++) {
|
||||
// float X = tmpImage->r(y, x);
|
||||
float Y = dataout[y * bfwr + x] / 32768.f;
|
||||
// float Z = tmpImage->b(y, x);
|
||||
// float L, a , b;
|
||||
// Color::XYZ2Lab(X, Y, Z, L, a, b);
|
||||
float Y = dataout[y * bfwr + x] / 32768.f;//inverse Laplacian gamma
|
||||
Y = pow(Y, igam);
|
||||
Y *= 32768.f;
|
||||
bufexpfin->L[y][x] = Y; //dataout[y * bfwr + x] ;
|
||||
bufexpfin->L[y][x] = Y;
|
||||
}
|
||||
}
|
||||
delete tmpImage;
|
||||
|
||||
delete [] datain;
|
||||
delete [] dataout;
|
||||
|
Reference in New Issue
Block a user