-
Notifications
You must be signed in to change notification settings - Fork 50
Description
The imfilter
docstring implies that the choice of FFT or FIR algorithm "will be chosen based
on the size of the image and kernel"
ImageFiltering.jl/src/imfilter.jl
Line 507 in 6f0dbc4
(Fourier-based filtering). If no choice is specified, one will be chosen based |
but I've been hunting and cannot find that decision point in the code. Any hints?
Now on to the "plan" question. I need to apply filters of the same size to many images and my filter is big enough (e.g., 27 by 27) that I suspect that it will end up using the FFT algorithm. FFTW supports use of a plan to optimize performance:
https://juliamath.github.io/AbstractFFTs.jl/stable/api/#AbstractFFTs.plan_fft
It might be natural then for imfilter
to have something akin to a "plan" mode where one initially provides the image size and filter size and the decisions about FFT and FIR are made in advance, along with the FFT plan if relevant and desired. Then subsequent imfilter!
calls with that plan are as efficient as possible.
Any thoughts about this?
I might be willing to try it if it sounds useful, but first I need to a pointer to the code that decides FFT vs FIR...