connected_component_stats#
- rlemasklib.RLEMask.connected_component_stats(connectivity=4, min_size=1)[source][C source]#
Get statistics for all connected components without extracting them.
This is faster than extracting all components when you only need the stats.
- Parameters:
- Returns:
A tuple of (areas, bboxes, centroids) numpy arrays, or None if there are no components. areas is shape (n,), bboxes is shape (n, 4) with columns (x, y, w, h), centroids is shape (n, 2) with columns (x, y).
- Return type: