Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
19ac35e4
Commit
19ac35e4
authored
Sep 09, 2019
by
Jens Kroeger
Browse files
ClusteringSpatial: corrected summing of columns/rows for arithmetic mean
parent
3af35c36
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/modules/ClusteringSpatial/ClusteringSpatial.cpp
View file @
19ac35e4
...
...
@@ -198,8 +198,8 @@ void ClusteringSpatial::calculateClusterCentre(Cluster* cluster) {
// We need both column_sum and column_sum_chargeweighted
// as we don't know a priori if there will be a pixel with
// charge==0 such that we have to fall back to the arithmetic mean.
column_sum
+=
(
pixel
->
column
()
*
pixel
->
charge
())
;
row_sum
+=
(
pixel
->
row
()
*
pixel
->
charge
())
;
column_sum
+=
pixel
->
column
();
row_sum
+=
pixel
->
row
();
column_sum_chargeweighted
+=
(
pixel
->
column
()
*
pixel
->
charge
());
row_sum_chargeweighted
+=
(
pixel
->
row
()
*
pixel
->
charge
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment