JuliaImages / JuliaImages/ImageFiltering.jl

imfilter "plan" ?

Open
#219 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
104
Forks
52
PR merge metrics
No merged PRs in 30d

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"
https://github.com/JuliaImages/ImageFiltering.jl/blob/6f0dbc40637a763d6deff071056c8998bdb7a8b5/src/imfilter.jl#L507
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...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the imfilter docstring in src/imfilter.jl around line 507 and trace the FFT-versus-FIR decision point. Review the linked AbstractFFTs plan_fft API and determine the scope of a reusable plan for repeated imfilter! calls. Done would require an agreed design and implementation path for selecting and reusing the appropriate algorithm and FFT plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
computer-vision
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.