[−][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.
Parameters
input
is the input imageconn
can take one of the values of Connectivity
Return Values
Array with labels indicating different regions