savgoln, An N-Dimensional Savitsky Golay Filter
Versione 1.0.2 (3,4 KB) da
Vishnu Balaji
This is a Savitsky-Golay filter that can be used to find smoothen any N-D array (N>1) and also find their partial derivatives.
The Savitsky-Golay filter fits polynomials locally and smoothens/finds the derivative of the signal based on the coefficients of the polynomial. In particular, when there are experimental Fluid Mechanics data such as Velocity Fields from Particle Image Velocimetry (PIV), we deal with scalar fields as a function of (x,y,t) and hence with need 3D SG Filters to remove noise. Some Fields may be a function of (x,y,z,t) and hence may need 4D SG Filters. There may be a few 2D Filters, but could not find any N-D Filters and hence the motivation for this. The filter can smoothen any N-D array at a very high speed as it uses convolutions instead of loops which makes the process about 15000% faster than loops. The function can also find all the partial derivatives depending on the order of polynomial chosen. It is recommended to check the order of kernels (to find which kernel corresponds to which partial derivative) according to their definition in the code for clarity. All the readme/instructions about the syntax and their explanations are given in the .m file. This can be run on cpu's and also on gpus. GPU runs (say, for 3D SG Filter) requires the CUDAConvolution3D function available on CUDAConvolution. For N-dimensionality runs on gpu, the code needs N-dimensional convolution and for gpu processing CUDAConvolution3D needs to be replaced with the appropriate ND function.
Cita come
Vishnu Balaji (2025). savgoln, An N-Dimensional Savitsky Golay Filter (https://www.mathworks.com/matlabcentral/fileexchange/181003), MATLAB Central File Exchange. Retrieved May 4, 2025.
Compatibilità della release di MATLAB
Creato con
R2024b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxTag
Riconoscimenti
Ispirato da: sgolayfilt, Convolution in Digital Signal Processing, GPU CUDA convolution 2D 3D
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
