Skip to main content
`Ctrl`+`K`

# scipy.signal.gauss_spline

scipy.signal.gauss_spline(x, n)

  Gaussian approximation to B-spline basis function of order n.

  Parameters:
    x array_like

      a knot vector

    n int

      The order of the spline. Must be non-negative, i.e., n >= 0

  Returns:
    res ndarray

      B-spline basis function values approximated by a zero-mean Gaussian function.

  Notes

  The B-spline basis function can be approximated well by a zero-mean Gaussian function with standard-deviation equal to \(\sigma=(n+1)/12\) for large n :

  \[\frac{1}{\sqrt {2\pi\sigma^2}}exp(-\frac{x^2}{2\sigma})\]

  References

  [1]

  Bouma H., Vilanova A., Bescos J.O., ter Haar Romeny B.M., Gerritsen F.A. (2007) Fast and Accurate Gaussian Derivatives Based on B-Splines. In: Sgallari F., Murli A., Paragios N. (eds) Scale Space and Variational Methods in Computer Vision. SSVM 2007. Lecture Notes in Computer Science, vol 4485. Springer, Berlin, Heidelberg

  [2]

  http://folk.uio.no/inf3330/scripting/doc/python/SciPy/tutorial/old/node24.html

  Examples

  We can calculate B-Spline basis functions approximated by a gaussian distribution:

      >>> import numpy as np
      >>> from scipy.signal import gauss_spline
      >>> knots = np.array([-1.0, 0.0, -1.0])
      >>> gauss_spline(knots, 3)
      array([0.15418033, 0.6909883, 0.15418033])  # may vary