Expand description
Particle features from binary / labelled masks — centroids for Crocker–Grier linking.
Pure Rust. Connected components on u8 intensity (threshold or pre-labelled).
Centroid list is caller-buffered (&mut [ParticleCentroid]).
Cold path may allocate a visit mask / BFS queue (bounded by image size); public output is fixed-capacity and suitable for the particle linker.
Structs§
- Particle
Centroid - 2D particle feature used by
super::crocker_grier_link().
Constants§
- MAX_
PARTICLES_ PER_ FRAME - Maximum particles reported from a single frame (stack-friendly bound for callers).
Functions§
- centroid_
from_ bbox - Centroid of a bounding box (integer mid-point) — convenience for box→particle bridges.
- centroids_
from_ binary - Extract centroids of connected components where pixel ≥
thresh(4-connected). - centroids_
from_ labels - Extract centroids from a pre-labelled
u8mask (label 0 = background).