scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
spline_filter(Iin, lmbda=5.0)

Filter an input data set, :None:None:`Iin`, using a (cubic) smoothing spline of fall-off lmbda .

Parameters

Iin : array_like

input data set

lmbda : float, optional

spline smooghing fall-off value, default is :None:None:`5.0`.

Returns

res : ndarray

filterd input data

Smoothing spline (cubic) filtering of a rank-2 array.

Examples

We can filter an multi dimentional signal (ex: 2D image) using cubic B-spline filter:

>>> from scipy.signal import spline_filter
... import matplotlib.pyplot as plt
... orig_img = np.eye(20) # create an image
... orig_img[10, :] = 1.0
... sp_filter = spline_filter(orig_img, lmbda=0.1)
... f, ax = plt.subplots(1, 2, sharex=True)
... for ind, data in enumerate([[orig_img, "original image"],
...  [sp_filter, "spline filter"]]):
...  ax[ind].imshow(data[0], cmap='gray_r')
...  ax[ind].set_title(data[1])
... plt.tight_layout()
... plt.show()
See :

Back References

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

scipy.signal._bsplines.spline_filter

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/_bsplines.py#16
type: <class 'function'>
Commit: