168
+ | def binary_dilation(
- image: np.ndarray,
- footprint: np.ndarray = None,
- output: np.ndarray = None,
- boxed: bool = False,
- num_threads: int = -1,
- backend: BackendLike = None,
-) -> np.ndarray:
- """
- Fast parallelizable binary morphological dilation of an image
-
- Parameters
- ----------
- image: np.ndarray
- input image
- footprint: np.ndarray
- the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
- output: np.ndarray
- array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
- array is created
- boxed: bool
- if True, dilation is performed on cropped image which may speed up computation depedning on how localized True
- pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
- exotic (has even shape or center pixel is False)
- num_threads: int
- the number of threads to use for computation. Default = the cpu count. If negative value passed
- cpu count + num_threads + 1 threads will be used
- backend: BackendLike
- which backend to use. `cython` and `scipy` are available, `cython` is used by default
-
- Returns
- -------
- dilated: np.ndarray
- the result of morphological dilation
-
- Examples
- --------
- >>> dilated = binary_dilation(x)
- """
- return _binary_dilation(image, footprint, output, boxed, num_threads, backend)
+201
| def binary_dilation(
+ image: np.ndarray,
+ footprint: np.ndarray = None,
+ output: np.ndarray = None,
+ boxed: bool = False,
+ num_threads: int = -1,
+ backend: BackendLike = None,
+) -> np.ndarray:
+ """
+ Fast parallelizable binary morphological dilation of an image
+
+ Parameters
+ ----------
+ image: np.ndarray
+ input image
+ footprint: np.ndarray
+ the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
+ output: np.ndarray
+ array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
+ array is created
+ boxed: bool
+ if True, dilation is performed on cropped image which may speed up computation depedning on how localized True
+ pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
+ exotic (has even shape or center pixel is False)
+ num_threads: int
+ the number of threads to use for computation. Default = the cpu count. If negative value passed
+ cpu count + num_threads + 1 threads will be used
+ backend: BackendLike
+ which backend to use. `cython` and `scipy` are available, `cython` is used by default
+
+ Returns
+ -------
+ dilated: np.ndarray
+ the result of morphological dilation
+
+ Examples
+ --------
+ >>> dilated = binary_dilation(x)
+ """
+ return _binary_dilation(image, footprint, output, boxed, num_threads, backend)
|
@@ -4797,7 +4797,13 @@
Source code in imops/morphology.py
- 220
+ | def binary_erosion(
- image: np.ndarray,
- footprint: np.ndarray = None,
- output: np.ndarray = None,
- boxed: bool = False,
- num_threads: int = -1,
- backend: BackendLike = None,
-) -> np.ndarray:
- """
- Fast parallelizable binary morphological erosion of an image
-
- Parameters
- ----------
- image: np.ndarray
- input image
- footprint: np.ndarray
- the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
- output: np.ndarray
- array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
- array is created
- boxed: bool
- if True, erosion is performed on cropped image which may speed up computation depedning on how localized True
- pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
- exotic (has even shape or center pixel is False)
- num_threads: int
- the number of threads to use for computation. Default = the cpu count. If negative value passed
- cpu count + num_threads + 1 threads will be used
- backend: BackendLike
- which backend to use. `cython` and `scipy` are available, `cython` is used by default
-
- Returns
- -------
- eroded: np.ndarray
- the result of morphological erosion
-
- Examples
- --------
- >>> eroded = binary_erosion(x)
- """
- return _binary_erosion(image, footprint, output, boxed, num_threads, backend)
+253
| def binary_erosion(
+ image: np.ndarray,
+ footprint: np.ndarray = None,
+ output: np.ndarray = None,
+ boxed: bool = False,
+ num_threads: int = -1,
+ backend: BackendLike = None,
+) -> np.ndarray:
+ """
+ Fast parallelizable binary morphological erosion of an image
+
+ Parameters
+ ----------
+ image: np.ndarray
+ input image
+ footprint: np.ndarray
+ the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
+ output: np.ndarray
+ array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
+ array is created
+ boxed: bool
+ if True, erosion is performed on cropped image which may speed up computation depedning on how localized True
+ pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
+ exotic (has even shape or center pixel is False)
+ num_threads: int
+ the number of threads to use for computation. Default = the cpu count. If negative value passed
+ cpu count + num_threads + 1 threads will be used
+ backend: BackendLike
+ which backend to use. `cython` and `scipy` are available, `cython` is used by default
+
+ Returns
+ -------
+ eroded: np.ndarray
+ the result of morphological erosion
+
+ Examples
+ --------
+ >>> eroded = binary_erosion(x)
+ """
+ return _binary_erosion(image, footprint, output, boxed, num_threads, backend)
|
@@ -5028,7 +5028,13 @@
Source code in imops/morphology.py
- 325
+ | def binary_opening(
- image: np.ndarray,
- footprint: np.ndarray = None,
- output: np.ndarray = None,
- boxed: bool = False,
- num_threads: int = -1,
- backend: BackendLike = None,
-) -> np.ndarray:
- """
- Fast parallelizable binary morphological opening of an image
-
- Parameters
- ----------
- image: np.ndarray
- input image
- footprint: np.ndarray
- the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
- output: np.ndarray
- array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
- array is created
- boxed: bool
- if True, opening is performed on cropped image which may speed up computation depedning on how localized True
- pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
- exotic (has even shape or center pixel is False)
- num_threads: int
- the number of threads to use for computation. Default = the cpu count. If negative value passed
- cpu count + num_threads + 1 threads will be used
- backend: BackendLike
- which backend to use. `cython` and `scipy` are available, `cython` is used by default
-
- Returns
- -------
- opened: np.ndarray
- the result of morphological opening
-
- Examples
- --------
- >>> opened = binary_opening(x)
- """
-
- return _binary_opening(image, footprint, output, boxed, num_threads, backend)
+359
| def binary_opening(
+ image: np.ndarray,
+ footprint: np.ndarray = None,
+ output: np.ndarray = None,
+ boxed: bool = False,
+ num_threads: int = -1,
+ backend: BackendLike = None,
+) -> np.ndarray:
+ """
+ Fast parallelizable binary morphological opening of an image
+
+ Parameters
+ ----------
+ image: np.ndarray
+ input image
+ footprint: np.ndarray
+ the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
+ output: np.ndarray
+ array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
+ array is created
+ boxed: bool
+ if True, opening is performed on cropped image which may speed up computation depedning on how localized True
+ pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
+ exotic (has even shape or center pixel is False)
+ num_threads: int
+ the number of threads to use for computation. Default = the cpu count. If negative value passed
+ cpu count + num_threads + 1 threads will be used
+ backend: BackendLike
+ which backend to use. `cython` and `scipy` are available, `cython` is used by default
+
+ Returns
+ -------
+ opened: np.ndarray
+ the result of morphological opening
+
+ Examples
+ --------
+ >>> opened = binary_opening(x)
+ """
+
+ return _binary_opening(image, footprint, output, boxed, num_threads, backend)
|
@@ -5261,7 +5261,13 @@
Source code in imops/morphology.py
- 272
+ | def binary_closing(
- image: np.ndarray,
- footprint: np.ndarray = None,
- output: np.ndarray = None,
- boxed: bool = False,
- num_threads: int = -1,
- backend: BackendLike = None,
-) -> np.ndarray:
- """
- Fast parallelizable binary morphological closing of an image
-
- Parameters
- ----------
- image: np.ndarray
- input image
- footprint: np.ndarray
- the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
- output: np.ndarray
- array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
- array is created
- boxed: bool
- if True, closing is performed on cropped image which may speed up computation depedning on how localized True
- pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
- exotic (has even shape or center pixel is False)
- num_threads: int
- the number of threads to use for computation. Default = the cpu count. If negative value passed
- cpu count + num_threads + 1 threads will be used
- backend: BackendLike
- which backend to use. `cython` and `scipy` are available, `cython` is used by default
-
- Returns
- -------
- closed: np.ndarray
- the result of morphological closing
-
- Examples
- --------
- >>> closed = binary_closing(x)
- """
-
- return _binary_closing(image, footprint, output, boxed, num_threads, backend)
+306
| def binary_closing(
+ image: np.ndarray,
+ footprint: np.ndarray = None,
+ output: np.ndarray = None,
+ boxed: bool = False,
+ num_threads: int = -1,
+ backend: BackendLike = None,
+) -> np.ndarray:
+ """
+ Fast parallelizable binary morphological closing of an image
+
+ Parameters
+ ----------
+ image: np.ndarray
+ input image
+ footprint: np.ndarray
+ the neighborhood expressed as a n-D array of 1's and 0's. If None, use a cross-shaped footprint (connectivity=1)
+ output: np.ndarray
+ array of the same shape as input, into which the output is placed (must be C-contiguous). By default, a new
+ array is created
+ boxed: bool
+ if True, closing is performed on cropped image which may speed up computation depedning on how localized True
+ pixels are. This may induce differences with Scikit-Image implementation at border pixels if footprint is
+ exotic (has even shape or center pixel is False)
+ num_threads: int
+ the number of threads to use for computation. Default = the cpu count. If negative value passed
+ cpu count + num_threads + 1 threads will be used
+ backend: BackendLike
+ which backend to use. `cython` and `scipy` are available, `cython` is used by default
+
+ Returns
+ -------
+ closed: np.ndarray
+ the result of morphological closing
+
+ Examples
+ --------
+ >>> closed = binary_closing(x)
+ """
+
+ return _binary_closing(image, footprint, output, boxed, num_threads, backend)
|
@@ -5560,7 +5560,13 @@ |
|
|
|