Clean code exposure PDE
This commit is contained in:
@@ -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