This commit is contained in:
Miha Kralj
2024-11-04 18:08:33 -08:00
parent 5b333bd2ec
commit fc3e9f756d
21 changed files with 82 additions and 134 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ public class Convolution : AbstractBase
}
// Normalize the kernel or set equal weights if the sum is zero
double normalizationFactor = (sum != 0) ? sum : _activeLength;
double normalizationFactor = (sum >= double.Epsilon) ? sum : _activeLength;
double invNormFactor = 1.0 / normalizationFactor;
for (int i = 0; i < _activeLength; i++)