2 bugs in colour toning, fixes #5403

This commit is contained in:
Ingo Weyrich 2019-08-08 11:43:47 +02:00
parent 2accd75bd0
commit d765c06cf4

View File

@ -2255,7 +2255,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
bool hasColorToningLabGrid = params->colorToning.enabled && params->colorToning.method == "LabGrid";
// float satLimit = float(params->colorToning.satProtectionThreshold)/100.f*0.7f+0.3f;
// float satLimitOpacity = 1.f-(float(params->colorToning.saturatedOpacity)/100.f);
float strProtect = (float (params->colorToning.strength) / 100.f);
float strProtect = pow_F((float (params->colorToning.strength) / 100.f), 0.4f);
/*
// Debug output - Color LUTf points
@ -2793,7 +2793,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
const float krh = rh / (rh + gh + bh);
const float kgh = gh / (rh + gh + bh);
const float kbh = bh / (rh + gh + bh);
strProtect = pow_F(strProtect, 0.4f);
constexpr int mode = 0;
for (int i = istart, ti = 0; i < tH; i++, ti++) {
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
@ -2806,7 +2805,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
else if (params->colorToning.method == "Splitco") {
constexpr float reducac = 0.3f;
constexpr int mode = 0;
strProtect = pow_F(strProtect, 0.4f);
for (int i = istart, ti = 0; i < tH; i++, ti++) {
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
const float r = rtemp[ti * TS + tj];
@ -3483,7 +3481,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
const float krh = rh / (rh + gh + bh);
const float kgh = gh / (rh + gh + bh);
const float kbh = bh / (rh + gh + bh);
strProtect = pow_F(strProtect, 0.4f);
constexpr int mode = 1;
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic, 5)