55
66
77def rolling_ball (image , * , radius = 100 , kernel = None , nansafe = False , num_threads = None ):
8- """Estimate background intensity by translating a kernel over an image .
8+ """Estimate background intensity using the rolling ball algorithm .
99
1010 This function estimates the background intensity of an n-dimensional
1111 image. Typically, it is useful for background subtraction in case of
@@ -17,11 +17,11 @@ def rolling_ball(image, *, radius=100, kernel=None, nansafe=False, num_threads=N
1717 image : ndarray
1818 The image to be filtered.
1919 radius : int, optional
20- Radius of the ball-shaped kernel to be translated over the
21- image. Used only if `kernel` is ``None``.
20+ Radius of the ball-shaped kernel to be rolled under the
21+ image landscape . Used only if `kernel` is ``None``.
2222 kernel : ndarray, optional
23- The kernel to be translated over the image. It must have the
24- same number of axes as `image`.
23+ An alternative way to specify the rolling ball, as an arbitrary
24+ kernel. It must have the same number of axes as `image`.
2525 nansafe: bool, optional
2626 If ``False`` (default), the function assumes that none of the values
2727 in `image` are ``np.nan``, and uses a faster implementation.
@@ -51,7 +51,7 @@ def rolling_ball(image, *, radius=100, kernel=None, nansafe=False, num_threads=N
5151
5252 This implementation assumes that dark pixels correspond to the background. If
5353 you have a bright background, invert the image before passing it to this
54- function, e.g., using :func:`skimage.util.invert`. See the gallery example for details.
54+ function, e.g., using :func:`skimage.util.invert`.
5555
5656 This algorithm is sensitive to noise (in particular salt-and-pepper
5757 noise). If this is a problem in your image, you can apply mild
0 commit comments