bundles / scipy 1.17.1 / scipy / ndimage / _measurements / watershed_ift
function
scipy.ndimage._measurements:watershed_ift
Signature
def watershed_ift ( input , markers , structure = None , output = None ) Summary
Apply watershed from markers using image foresting transform algorithm.
Parameters
input: array_likeInput.
markers: array_likeMarkers are points within each watershed that form the beginning of the process. Negative markers are considered background markers which are processed after the other markers.
structure: structure element, optionalA structuring element defining the connectivity of the object can be provided. If None, an element is generated with a squared connectivity equal to one.
output: ndarray, optionalAn output array can optionally be provided. The same shape as input.
Returns
watershed_ift: ndarrayOutput. Same shape as
input.
Notes
Array API Standard Support
watershed_ift has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ✅ PyTorch ✅ ⛔ JAX ⚠️ no JIT ⛔ Dask ⚠️ computes graph n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
Aliases
-
scipy.ndimage.watershed_ift