Skip to content

Commit d4ae76a

Browse files
mkcorstefanv
andauthored
Apply suggestions from code review
Co-authored-by: Stefan van der Walt <[email protected]>
1 parent f077624 commit d4ae76a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

skimage/restoration/_rolling_ball.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
def 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

Comments
 (0)