Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 415067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:20:40+00:00 2026-05-12T18:20:40+00:00

I have to apply a convolution filter on each row of many images. The

  • 0

I have to apply a convolution filter on each row of many images. The classic is 360 images of 1024×1024 pixels. In my use case it is 720 images 560×600 pixels.

The problem is that my code is much slower than what is advertised in articles.

I have implemented the naive convolution, and it takes 2m 30s. I then switched to FFT using fftw. I used complex 2 complex, filtering two rows in each transform. I’m now around 20s.

The thing is that articles advertise around 10s and even less for the classic condition.
So I’d like to ask the experts here if there could be a faster way to compute the convolution.

Numerical recipes suggest to avoid the sorting done in the dft and adapt the frequency domain filter function accordingly. But there is no code example how this could be done.

Maybe I lose time in copying data. With real 2 real transform I wouldn’t have to copy the data into the complexe values. But I have to pad with 0 anyway.

EDIT: see my own answer below for progress feedback and further information on solving this issue.

Question (precise reformulation):

I’m looking for an algorithm or piece of code to apply a very fast convolution to a discrete non periodic function (512 to 2048 values). Apparently the discrete time Fourier transform is the way to go. Though, I’d like to avoid data copy and conversion to complex, and avoid the butterfly reordering.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:20:40+00:00Added an answer on May 12, 2026 at 6:20 pm

    FFT is the fastest technique known for convolving signals, and FFTW is the fastest free library available for computing the FFT.

    The key for you to get maximum performance (outside of hardware … the GPU is a good suggestion) will be to pad your signals to a power of two. When using FFTW use the ‘patient’ setting when creating your plan to get the best performance. It’s highly unlikely that you will hand-roll a faster implementation than what FFTW provides (forget about N.R.). Also be sure to be using the Real version of the forward 1D FFT and not the Complex version; and only use single (floating point) precision if you can.

    If FFTW is not cutting it for you, then I would look at Intel’s (very affordable) IPP library. The have hand tuned FFT’s for Intel processors that have been optimized for images with various bit depths.

    Paul
    CenterSpace Software

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to apply a spherical filter on a image in android, I have
See here: http://jsfiddle.net/QVhAZ/4/ How can I use * but only have it apply to
Hi I have to apply filter on generic class. The sample class is as
I have to use a preview text input event that I have to apply
In my application I have apply new outgoing call receiver. It is working fine.
I have tried almost all the techniques to apply sticky footer to my site
I have the following z.js method to apply styles dynamically to DOM element like
I have been using the following CSS to apply an effect at the bottom
I have a style rule I want to apply to a tag when it
I have an idea and I want to apply it to my Application (C#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.