FFW Fastest Filtering in the West

August 10, 2009 by Luigi Rosa 
Filed under: Signal Processing 
2 Comments
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)
VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)

lucky

The FFW package is an FFT-based algorithm for a fast 2D convolution using the overlap-add method. The overlap-add method is based on the fundamental technique in DSP: decompose the signal into simple components, process each of the components in some useful way, and recombine the processed components into the final signal. This is possible since the convolutional operator is linear. The FFW package works similarly to fftfilt function (Matlab Image Processing Toolbox) but in a deeper way: all possible lengths for vectors are considered and not only lengths which are powers of two. This is highly necessary since the FFTW package ( for more details visit http://www.fftw.org ) includes codelets optimized also for other fixed sizes. Codelets are produced automatically by the FFTW codelet generator: you can add your own codelets and re-calculate the execution times for each FFT. The execution times for:

  • FFT of real 1D vectors
  • FFT of complex 1D vectors
  • IFFT of complex 1D vectors

have been calculated with the script provatempo2.m from length N = 3 up to length N = 2048. A finer determination of such times can be done using PAPI for Matlab ( available here or at http://icl.cs.utk.edu/papi ). A 2D FFT (see Matlab command fft2) is decomposed into several 1D FFTs: the FFT operator for an N-dimensional array can in fact be splitted into several 1-dimensional FFTs of monodimensional arrays. The FFW algorithm automatically selects which is the best choice (first dimension, second dimension and best lengths for overlap-add method) and calculates the 2D convolution.

The FFW package can be easily used to improve speed performances of:

  • 2D convolution (Matlab function conv2)
  • 2D filtering (Matlab function filter2)
  • 2D cross-correlation (Matlab function xcorr2)
  • Normalized cross-correlation (Matlab function normxcorr2)

Index Terms: Matlab, source, code, conv, conv2, fft, fft2, convolution, correlation, normalized cross-correlation, filtering, filter, filters, fast fourier transform, kernel.

For more details please visit
http://www.advancedsourcecode.com/ffw.asp

Luigi Rosa
Via Centrale 35
67042 Civita Di Bagno
L’Aquila ITALY
mobile +39 3207214179
web site http://www.advancedsourcecode.com

Download Now

VN:F [1.8.1_1037]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.1_1037]
Rating: 0 (from 0 votes)

Popularity: 17% [?]

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Live
  • PDF
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • email
  • MySpace
  • RSS

Related Posts

Comments

2 Comments on FFW Fastest Filtering in the West

  1. Quid on Tue, 11th Aug 2009 11:58
  2. Luigi:

    MATLAB uses FFTW for its FFT functions.

    Check it out in their online documentation (see Algo section):
    http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/fft.html&http://www.bing.com/search?q=matlab+fft&form=OSDSRC

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

  3. LuigiRosa on Wed, 12th Aug 2009 10:18
  4. Matlab uses FFTW for its FFT function, it is right.
    FFW (my code) uses FFT to compute convolution, using overlapp-add methond in an optimized way.
    Luigi

    UN:F [1.8.1_1037]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.8.1_1037]
    Rating: 0 (from 0 votes)

    [Reply]

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


Include MATLAB code in your comment by doing the following:

<pre lang="MATLAB">

%insert code here

</pre>