scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
wiener(im, mysize=None, noise=None)

Apply a Wiener filter to the N-dimensional array :None:None:`im`.

Notes

This implementation is similar to wiener2 in Matlab/Octave. For more details see

Parameters

im : ndarray

An N-dimensional array.

mysize : int or array_like, optional

A scalar or an N-length list giving the size of the Wiener filter window in each dimension. Elements of mysize should be odd. If mysize is a scalar, then this scalar is used as the size in each dimension.

noise : float, optional

The noise-power to use. If None, then noise is estimated as the average of the local variance of the input.

Returns

out : ndarray

Wiener filtered result with the same shape as :None:None:`im`.

Perform a Wiener filter on an N-dimensional array.

Examples

>>> from scipy.misc import face
... from scipy.signal import wiener
... import matplotlib.pyplot as plt
... import numpy as np
... rng = np.random.default_rng()
... img = rng.random((40, 40)) #Create a random image
... filtered_img = wiener(img, (5, 5)) #Filter the image
... f, (plot1, plot2) = plt.subplots(1, 2)
... plot1.imshow(img)
... plot2.imshow(filtered_img)
... plt.show()
See :

Back References

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

scipy.signal._signaltools.wiener

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