ImProcFunctions::moyeqt, simplified calculation

This commit is contained in:
heckflosse
2016-08-23 21:32:30 +02:00
parent 7a4cf9aba8
commit 281e3979d5

View File

@@ -2867,7 +2867,8 @@ void ImProcFunctions::moyeqt (Imagefloat* working, float &moyS, float &eqty)
int tWw = working->width;
double moy = 0.0;
double sqrs = 0.0;
#ifndef _DEBUG
#ifdef _OPENMP
#pragma omp parallel for reduction(+:moy,sqrs) schedule(dynamic,16)
#endif
@@ -2879,10 +2880,10 @@ void ImProcFunctions::moyeqt (Imagefloat* working, float &moyS, float &eqty)
}
}
double mo = moy / (tHh * tWw);
moyS = mo;
double eqt = (sqrs - 2.0 * mo * moy + tHh * tWw * SQR(mo)) / (tHh * tWw);
eqty = sqrt(eqt);
moy /= (tHh * tWw);
sqrs /= (tHh * tWw);
eqty = sqrt(sqrs - SQR(moy));
moyS = moy;
}
static inline void