Match globally · Hungarian
One-to-one, observation identity preserved.
Every anchor’s ROI surfaces 2–4 candidate observations, and with a 5.5× ring-width radius, ROIs overlap heavily — multiple anchors often see the same physical hole. Observations across all ROIs are clustered (complete-linkage, so adjacent pellets can’t merge through a bridge observation), and a Hungarian solver finds the globally minimum-cost anchor↔cluster assignment. Edge cost is the distance from the anchor to its own observation in that cluster — so the returned centroid is always one the anchor actually saw, never a neighbour’s. The heatmap below is the solver’s cost matrix: darker means cheaper, the ringed cells are the assignment Hungarian picked.
ProducesA one-to-one assignment — no greedy collisions, no phantom centroids.
cost matrix · darker = cheaper · distance in px
| c0 | c1 | c2 | c3 | c4 | c5 | |
|---|
| a0 | 361 | 452 | 272 | 92 | · | · | 4.8r4 |
|---|
| a1 | · | 156 | 34 | 365 | · | · | 10.0r10 |
|---|
| a2 | · | 90 | 239 | · | 349 | · | 8.8r8 |
|---|
| a3 | · | 224 | 332 | · | 74 | 342 | 2.5r2 |
|---|
| a4 | 265 | · | · | · | 309 | 60 | 4.8r4 |
|---|
| a5 | · | 478 | · | · | 273 | · | 5.7r5 |
|---|
one figure, two views · 6 clusters, 6 anchors · crosshairs mark the final positions · the dashed line is the path Hungarian considered and passed over