Re: FFT of an image
On 18 Feb., 17:04, "Carl Daniel [VC++ MVP]"
<cpdaniel_remove_this_and_nos...@mvps.org.nospam> wrote:
Lucress Carol wrote:
hi everyone,
I'm a c++ beginner (I'm using vc++6.0) and my purpose is to store
Use a newer compiler - you'll be happier with the results in many cases.
VC++ 2008 Express Edition is a free download.
an .bmp image in an array
and then calculate the fft of the image with API Win32.
I can already display an .bmp image with the API Win32 .I saw on the
following homepage:
http://www.fftw.org/that there were already libraries for windows.But
strangely I can't
managed to use them.Does someone have experience with that?
Have you installed the FFTW libraries? They're not part of Windows. =
What
exactly have you tried and how exactly did it not work?
-cd
I inserted the file fftw3.h in C:\Programme\Microsoft Visual Studio
\VC98\Include,
linked the file fftw3.lib in VC++ 6.0 under projects\settings\Linker
\Object-Module.
Before starting with reading an .bmg image into an array I tested if
I installed every
thing well and wrote the following programm to give out the value of
fftw_execute(p) like this:
#include <fftw3.h>
#include<iostream.h>
#include <fstream>
#include <math.h>
using namespace std;
int main ()
{
int N=6;
fftw_complex *in, *out;
fftw_plan p;
in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
fftw_execute(p);
//void fftw_fprint_plan(const fftw_plan plan, FILE *output_file);
//void fftw_print_plan(const fftw_plan plan);
cout << "fftw_execute(p)=" << fftw_execute(p) << endl;
fftw_destroy_plan(p);
fftw_free(in); fftw_free(out);
return 0;
}
But i can't managed to give the value of fftw_execute(p).What am I
doing something wrong ?
Thank you
Carol