From d498e5f5c5a3be8de1ff13b8bb2badba2bb75995 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 4 Dec 2016 23:59:42 +0100 Subject: [PATCH] pixelshift: partly fixed wrong colouring of red/blue cross check motion mask. Not good, but better than last one --- rtengine/pixelshift.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/pixelshift.cc b/rtengine/pixelshift.cc index c5ead46c3..2d808bb2e 100644 --- a/rtengine/pixelshift.cc +++ b/rtengine/pixelshift.cc @@ -110,7 +110,7 @@ float nonGreenDiffCross(float a, float b, float c, float d, float centre, float if(!showMotion) { return result; } else if(result > 0.f) { // for the motion mask - return std::fabs(a - b) / (std::max(a, b) + 0.01f); + return std::sqrt((result / (stddev + result + 0.01f))); //1.f; //std::fabs(a - b) / (std::max(a, b) + 0.01f); } else { return 0.f; }