merge with dev
This commit is contained in:
@@ -1270,7 +1270,7 @@ void ImProcFunctions::Aver ( float * RESTRICT DataList, int datalen, float &ave
|
||||
|
||||
//find absolute mean
|
||||
int countP = 0, countN = 0;
|
||||
float averaP = 0.f, averaN = 0.f;
|
||||
double averaP = 0.0, averaN = 0.0; // use double precision for large summations
|
||||
|
||||
float thres = 5.f;//different fom zero to take into account only data large enough
|
||||
max = 0.f;
|
||||
@@ -1331,7 +1331,7 @@ void ImProcFunctions::Aver ( float * RESTRICT DataList, int datalen, float &ave
|
||||
void ImProcFunctions::Sigma ( float * RESTRICT DataList, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg)
|
||||
{
|
||||
int countP = 0, countN = 0;
|
||||
float variP = 0.f, variN = 0.f;
|
||||
double variP = 0.0, variN = 0.0; // use double precision for large summations
|
||||
float thres = 5.f;//different fom zero to take into account only data large enough
|
||||
|
||||
#ifdef _OPENMP
|
||||
@@ -1686,7 +1686,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
|
||||
float contrast = cp.contrast;
|
||||
float multL = (float)contrast * (maxl - 1.f) / 100.f + 1.f;
|
||||
float multH = (float) contrast * (maxh - 1.f) / 100.f + 1.f;
|
||||
double avedbl = 0.f; // use double precision for big summations
|
||||
double avedbl = 0.0; // use double precision for large summations
|
||||
float max0 = 0.f;
|
||||
float min0 = FLT_MAX;
|
||||
|
||||
@@ -1738,11 +1738,6 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
|
||||
|
||||
}
|
||||
|
||||
if(max0 <= 0.0) {
|
||||
// completely black image => nothing to do
|
||||
return;
|
||||
}
|
||||
|
||||
// printf("MAXmax0=%f MINmin0=%f\n",max0,min0);
|
||||
|
||||
//tone mapping
|
||||
@@ -1790,7 +1785,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
|
||||
#pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1)
|
||||
#endif
|
||||
{
|
||||
if (contrast != 0.f && cp.resena) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step
|
||||
if(contrast != 0.f && cp.resena && max0 > 0.0) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step
|
||||
{
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for
|
||||
|
||||
Reference in New Issue
Block a user