Fixed the formula to compute the well-exposedness weight map.

This commit is contained in:
Cédric Rousseau 2015-12-15 10:30:06 +01:00
parent e0395a79ec
commit d19189e80f

View File

@ -194,10 +194,11 @@ public:
wellexp = Mat::ones(size, CV_32F); wellexp = Mat::ones(size, CV_32F);
for(int c = 0; c < channels; c++) { for(int c = 0; c < channels; c++) {
Mat exp = splitted[c] - 0.5f; Mat expo = splitted[c] - 0.5f;
pow(exp, 2.0f, exp); pow(expo, 2.0f, expo);
exp = -exp / 0.08f; expo = -expo / 0.08f;
wellexp = wellexp.mul(exp); exp(expo, expo);
wellexp = wellexp.mul(expo);
} }
pow(contrast, wcon, contrast); pow(contrast, wcon, contrast);