- cupyx.scipy.ndimage.generate_binary_structure(rank, connectivity)¶
Generate a binary structure for binary morphological operations.
rank (int) – Number of dimensions of the array to which the structuring element will be applied, as returned by
connectivity (int) –
connectivitydetermines which elements of the output array belong to the structure, i.e., are considered as neighbors of the central element. Elements up to a squared distance of
connectivityfrom the center are considered neighbors.
connectivitymay range from 1 (no diagonal elements are neighbors) to
rank(all elements are neighbors).
- Structuring element which may be used for binary
morphological operations, with
rankdimensions and all dimensions equal to 3.
- Return type