Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider further broadening speed-up by modern image-processing techniques #176

Open
ajjackson opened this issue Mar 8, 2022 · 0 comments

Comments

@ajjackson
Copy link
Collaborator

There are several techniques used in image processing to apply Gaussian filtering more efficiently than direct or FFT convolution. A useful summary of methods is given in this paper: https://ieeexplore.ieee.org/document/6738106

  • iterated box filter (repeated convolution with box kernel is cheap and close to Gaussian; a bit of cleverness/interpolation is needed to deal with non-integer widths).
  • recursive filters (a large convolution kernel is replaced by a small kernel which acts on both input and output values. This method is very effective for audio filtering, but may break down at large widths. The scipy filtfilt and lfilter functions can be used to apply recursive (IIR) filters efficiently.)
  • Kernel decomposition. This may use similar technology to JPEG compression (discrete cosine transform (DCT)) and seems particularly applicable to more complex (e.g. 2D?) kernels. Compared to recursive filters the cost may be higher but the error properties are better.

I propose to test these methods for some instrumental broadening problems and determine whether the properties are satisfactory for our purposes. Some initial tinkering in a Jupyter notebook shows speedups of the order x10 for recursive filters compared to convolution, so if broadening is a bottleneck this could be a significant improvement. If other steps are limiting, perhaps those should be tackled first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants