Skip to content

Commit

Permalink
Fix normalization in convolution when kernel sums to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
ruven committed Sep 7, 2023
1 parent be7e090 commit b9caf9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

07/09/2023:
- Fix normalization in convolution when kernel sums to zero


03/09/2023: Version 1.2 Released


Expand Down
2 changes: 1 addition & 1 deletion src/Transforms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ void Transform::convolution( RawTile& in, const vector<float>& kernel ){
}
}
// Normalize our values
v = v / total;
if( total > 0.0 ) v = v / total;
buffer[n++] = v;
}
}
Expand Down

0 comments on commit b9caf9c

Please sign in to comment.