Skip to main content

centroids_from_binary

Function centroids_from_binary 

Source
pub fn centroids_from_binary(
    src: GrayView<'_>,
    thresh: u8,
    frame: u32,
    out: &mut [ParticleCentroid],
) -> Result<usize, CvError>
Expand description

Extract centroids of connected components where pixel ≥ thresh (4-connected).

Writes up to out.len() particles. Returns the count written. When the buffer fills, remaining blobs are skipped (deterministic raster order).