Skip to main content

most_frequent_label

Function most_frequent_label 

Source
pub fn most_frequent_label<A>(
    labels: &ArrayRef3<A>,
    nb_features: usize,
) -> Option<(A, usize)>
where A: LabelType,
Expand description

Returns the most frequent label and its index.

Ignores the background label. A blank label image will return None.

  • labels - 3D labels image, returned by the label function.
  • nb_features - Number of unique labels, returned by the label function.