diff --git a/ChangeLog b/ChangeLog index e9ef7c1f..c4949b6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ + +07/09/2023: + - Fix normalization in convolution when kernel sums to zero + + 03/09/2023: Version 1.2 Released diff --git a/src/Transforms.cc b/src/Transforms.cc index 54144a21..c60c3c85 100644 --- a/src/Transforms.cc +++ b/src/Transforms.cc @@ -1197,7 +1197,7 @@ void Transform::convolution( RawTile& in, const vector& kernel ){ } } // Normalize our values - v = v / total; + if( total > 0.0 ) v = v / total; buffer[n++] = v; } }