scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsWarnsBackRef
medfilt(volume, kernel_size=None)

Apply a median filter to the input array using a local window-size given by :None:None:`kernel_size`. The array will automatically be zero-padded.

Notes

The more general function scipy.ndimage.median_filter has a more efficient implementation of a median filter and therefore runs much faster.

For 2-dimensional images with uint8 , float32 or float64 dtypes, the specialised function scipy.signal.medfilt2d may be faster.

Parameters

volume : array_like

An N-dimensional input array.

kernel_size : array_like, optional

A scalar or an N-length list giving the size of the median filter window in each dimension. Elements of :None:None:`kernel_size` should be odd. If :None:None:`kernel_size` is a scalar, then this scalar is used as the size in each dimension. Default size is 3 for each dimension.

Returns

out : ndarray

An array the same size as input containing the median filtered result.

Perform a median filter on an N-dimensional array.

Warns

UserWarning

If array size is smaller than kernel size along any dimension

See Also

scipy.ndimage.median_filter
scipy.signal.medfilt2d

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.signal._signaltools.medfilt2d

Local connectivity graph

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


GitHub : /scipy/signal/_signaltools.py#1478
type: <class 'function'>
Commit: