From 4a2b108fa9b062e9bf8948ff283bd43f5755873c Mon Sep 17 00:00:00 2001 From: Desmis Date: Wed, 22 May 2019 06:41:59 +0200 Subject: [PATCH] Small change to strength retinex --- rtengine/ipretinex.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index a356a0287..745f1fdda 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -953,14 +953,16 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b } if(scale == 1) {//equalize last scale with darkness and lightness + if (dar != 1.f || lig != 1.f) { + float value = pow(strength, 0.4f); #ifdef _OPENMP #pragma omp parallel #endif for (int y = 0; y < H_L; ++y) { for (int x = 0; x < W_L; ++x) { - float buf = (src[y][x] - out[y][x]) * strength; + float buf = (src[y][x] - out[y][x]) * value; buf *= (buf > 0.f) ? lig : dar; out[y][x] = LIM(out[y][x] + buf, 0.f, 100000.f); }