Skip to content

imfilter "plan" ? #219

Description

@JeffFessler

The imfilter docstring implies that the choice of FFT or FIR algorithm "will be chosen based
on the size of the image and kernel"

(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...

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions