scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
medfilt2d(input, kernel_size=3)

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

Notes

This is faster than medfilt when the input dtype is uint8 , float32 , or float64 ; for other types, this falls back to medfilt ; you should use scipy.ndimage.median_filter instead as it is much faster. In some situations, scipy.ndimage.median_filter may be faster than this function.

Parameters

input : array_like

A 2-dimensional input array.

kernel_size : array_like, optional

A scalar or a list of length 2, 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 is a kernel of size (3, 3).

Returns

out : ndarray

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

Median filter a 2-dimensional array.

See Also

scipy.ndimage.median_filter

Examples

See :

Back References

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

scipy.signal._signaltools.medfilt

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#1808
type: <class 'function'>
Commit: