Skip to main content

connected_components_u8

Function connected_components_u8 

Source
pub fn connected_components_u8(
    width: usize,
    height: usize,
    pixels: &[u8],
    connectivity: Connectivity,
) -> VisionResult<ConnectedComponents>
Expand description

Labels connected non-zero pixels from packed u8 mask storage.

This borrowed-input variant avoids constructing an owned BinaryMask when the caller already has packed mask storage. Like OpenCV, every non-zero byte is foreground. Positive labels follow the first foreground run of each component in row-major order.