Signal Processing

Bilateral is a noise reduction function.

See also

See the file test_pwc.py for an example.


Bilateral Filtering

pysptools.sigproc.bilateral(y, soft, beta, width, display=1, stoptol=1.0, maxiter=50)[source]

Performs PWC denoising of the input signal using hard or soft kernel bilateral filtering.

Parameters:
  • ynumpy array Original signal to denoise of length N.
  • softint Set this to 1 to use the soft Gaussian kernel, else uses the hard kernel.
  • betaint Kernel parameter. If soft Gaussian kernel, then this is the precision parameter. If hard kernel, this is the kernel support.
  • widthint Spatial kernel width W.
  • displayint [default 1] Set to 0 to turn off progress display, 1 to turn on. If not specifed, defaults to progress display on.
  • stoptolfloat [default 1**-3] Precision of estimate as determined by square magnitude of the change in the solution. If not specified, defaults to 1e-3.
  • maxiterint [default 50] Maximum number of iterations. If not specified, defaults to 50.
Results: numpy array
Denoised output signal.
Reference:

(c) Max Little, 2011. If you use this code for your research, please cite: M.A. Little, Nick S. Jones (2011) “Generalized Methods and Solvers for Noise Removal from Piecewise Constant Signals: Part I and II” Proceedings of the Royal Society A (in press).

See http://www.maxlittle.net/