[][src]Function arrayfire::regions

pub fn regions<OutType>(
    input: &Array<bool>,
    conn: Connectivity
) -> Array<OutType> where
    OutType: HasAfEnum + RealNumber

Find blobs in given image.

Given a binary image (with zero representing background pixels), regions computes a floating point image where each connected component is labeled from 1 to N, the total number of components in the image.

A component is defined as one or more nonzero pixels that are connected by the specified connectivity (either Connectivity::FOUR or Connectivity::EIGHT) in two dimensions.


Return Values

Array with labels indicating different regions