Skip to content

Savitzky-Golay kernel for data smoothing #1155

@tvercaut

Description

@tvercaut

Is your feature request related to a problem? Please describe.
Savitzky-Golay filtering is widely used in fields such as ultrasound imaging and spectral imaging. It is often a prefered option in comparison to Gaussian filtering in such applications.

Describe the solution you'd like
The Savitzky-Golay filter is a simple discrete convolution filter and should thus be straightforward to integrate in a PyTorch environment such as MONAI. The computation of the kernel wigths only depends on the order of the polynomial and the window size chosen for the underpinning (implicit) least-squares fit.

Describe alternatives you've considered
Exisiting options include computing the filter weights using an external routine, e.g. scipy.signal.savgol_coeffs, and then pass these weigths to PyTorch/MONAI.

Additional context
A solution bypassing the dependency on scipy would be nice. The kernel computation only involves fairly basic linear algebra, all available in PyTorch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions