median(image, selem=None, out=None, mode='nearest', cval=0.0, behavior='ndimage')
Input image.
If behavior=='rank'
, selem
is a 2-D array of 1's and 0's. If behavior=='ndimage'
, selem
is a N-D array of 1's and 0's with the same number of dimension than image
. If None, selem
will be a N-D array with 3 elements for each dimension (e.g., vector, square, cube, etc.)
If None, a new array is allocated.
The mode parameter determines how the array borders are handled, where cval
is the value when mode is equal to 'constant'. Default is 'nearest'.
mode
is used when behavior='ndimage'
.
Value to fill past edges of input if mode is 'constant'. Default is 0.0
cval
was added in 0.15 is used when behavior='ndimage'
.
Either to use the old behavior (i.e., < 0.15) or the new behavior. The old behavior will call the skimage.filters.rank.median
. The new behavior will call the scipy.ndimage.median_filter
. Default is 'ndimage'.
behavior
is introduced in 0.15
Default behavior
has been changed from 'rank' to 'ndimage'
Output image.
Return local median of an image.
skimage.filters.rank.median
Rank-based implementation of the median filtering offering more flexibility with additional parameters but dedicated for unsigned integer images.
>>> from skimage import dataSee :
... from skimage.morphology import disk
... from skimage.filters import median
... img = data.camera()
... med = median(img, disk(5))
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.filters._median.median
skimage.filters.rank.generic.median
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them