BSplineWavelet<T>
Models & Types · AiDotNet.WaveletFunctions
Implements a B-spline wavelet, which is a smooth wavelet constructed from B-spline functions.
Inheritance: WaveletFunctionBase<T> → BSplineWavelet<T>
For Beginners
B-spline wavelets are like smooth, bell-shaped curves that can be used to analyze signals at different levels of detail.
Key features of B-spline wavelets:
- They’re very smooth (no sharp corners or discontinuities)
- They have compact support (affect only a limited region)
- Their smoothness increases with the order
Think of B-splines as building blocks that can be combined to create smooth curves. Higher-order B-splines are smoother but have wider support (affect more neighboring points).
These wavelets are particularly useful for:
- Signal smoothing and denoising
- Feature extraction where smoothness is important
- Applications where derivatives of the signal are analyzed
- Image processing tasks requiring high regularity
The order parameter lets you control the trade-off between smoothness and localization.
How It Works
B-spline wavelets are constructed from B-spline functions, which are piecewise polynomial functions with compact support and maximum smoothness for a given support width. These wavelets offer excellent smoothness properties and are particularly useful for applications requiring high regularity.
Example
using AiDotNet.WaveletFunctions;
var wavelet = new BSplineWavelet<double>();
double value = wavelet.Calculate(0.5);
Console.WriteLine($"BSplineWavelet: psi(0.5) = {value:F4}");
Constructors
| Constructor | Summary |
|---|---|
BSplineWavelet(int order) |
Initializes a new instance of the BSplineWavelet class with the specified order. |
Methods
| Method | Summary |
|---|---|
T Calculate(T x) |
Calculates the value of the B-spline wavelet function at point x. |
ValueTuple<Vector<T>, Vector<T>> Decompose(Vector<T> input) |
Decomposes an input signal into approximation and detail coefficients using the B-spline wavelet. |
Vector<T> GetScalingCoefficients() |
Gets the scaling function coefficients for the B-spline wavelet. |
Vector<T> GetWaveletCoefficients() |
Gets the wavelet function coefficients for the B-spline wavelet. |
Vector<T> Reconstruct(Vector<T> approximation, Vector<T> detail) |
Reconstructs the original signal from approximation and detail coefficients. |