FFTW with OpenCV

Nov 4, 2008 | Tags: OpenCV | del.icio.us del.icio.us | digg Digg

In Image Processing, we will using FFT operation many times. Unfortunately, OpenCV only came with DFT function. So we need to use a third party FFT library in order to perform FFT operation. FFTW is a good choice. It's very fast and freely available at http://www.fftw.org.

I've made an example on how to perform FFT operation using FFTW in OpenCV. It simply loads an image, compute FFT & IFFT, then display the final result. The resulted image has no difference with the original, as it should.

I've tested it using MinGW compiler on Windows platform but it should compiled in other platforms with slight modification. If you encounter any problem, let me know it.

Related Articles

The Downloads

10 Comments

Benoit on Oct 14, 2008:

Thank you very much.
(works fine under linux,too)

cassel on Oct 31, 2008:

I can't download MinGW.

Nash on Nov 3, 2008:

Here's how to install MinGW:

http://mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite

blindspot on Nov 6, 2008:

Why do you use the 1D FFT interface instead of the 2D? I find your example really misleading. It's not that you can do meaningful things with the transformed image. Can you?

Nash on Nov 8, 2008:

I used the 1D FFT only for example. You can see one of my FFT applications here:

http://www.nashruddin.com/phase-correlation-function-in-opencv.html

Amir Shaker on Dec 14, 2008:

Can you tell me how to include the fftw library in an mfc project with visual studio 2005. thanks in advance.

Nash on Dec 14, 2008:

check this:
http://answers.yahoo.com/question/index?qid=20081122070058AAj9aLA

aparna on Jan 20, 2009:

can any one tell me how to store the database images in an array in opencv

rizn on Sep 13, 2009:

I want to use fft in Visual c++6.0. what are the steps to configure the VC++6.0. I want same result as is of fft2() in matlab.

Nash on Sep 13, 2009:

Sorry I don't have VC++. But I recommend you to use MinGW instead.

Leave a comment

Name (required)
Email (will not be published) (required)
Website

Characters left = 1000

Tags

Recent Posts

  1. OpenCV Utility: Reading Image Pixels Value
  2. OpenCV Circular ROI
  3. OpenCV 2.0 Installation on Windows XP and Visual Studio 2008
  4. Runtime ROI Selection using Mouse
  5. Real Time Eye Tracking and Blink Detection
View Archives

About the Author

avatar Cool PHP programmer writing cool PHP scripts. Feel free to contact
Tel. +62 31 8662872
+62 856 338 6017
ICQ 489571630
Skype dede_bl4ckheart
Yahoo dede_bl4ckheart
Google nashruddin.amin

Recommended Sites:

Hacker's HTTP Client
HTML and CSS Tutorials
Stop Dreaming Start Action
Online Quran and Translation