FFTW execution

M

Marie

Hi,

I´m trying to perform Fourier Transforms on contiuously incoming
images from a camera.

I have sofar been using the Basic Interface for planning and execution
for every image. Later I have tried to only perform the basic planning
once and then using the Guru Interface for execution continuously for
each incoming image.

This results in debug errors for the execution of the c2r part.
Do I have to redo the planning for each image?

The code looks something like this:

//FFTW
if (fftw_plan_flag == false)
{
p_roi = fftw_plan_dft_r2c_2d(padSizeWidth, padSizeHeight,
real_input, complex_output,
FFTW_ESTIMATE);
fftw_plan_flag = true;
}
//Guru Interface, executing a basic plan
fftw_execute_dft_r2c(p_roi, iphinputroiPad, complex_output);

//IFFTW
if ( fftw_plan_flag == false )
{
p_ifft = fftw_plan_dft_c2r_2d(padSizeWidth, padSizeHeight,
complex_input, real_output,
FFTW_ESTIMATE);
fftw_plan_flag = true;
}
//Guru Interface, executing a basic plan
fftw_execute_dft_c2r(p_ifft, complex_input, real_output);


Thanks for any advice on how to perform this task correctly!
Marie
 
K

Karthik Kumar

Marie said:
Hi,

I´m trying to perform Fourier Transforms on contiuously incoming
images from a camera.

I have sofar been using the Basic Interface for planning and execution
for every image. Later I have tried to only perform the basic planning
once and then using the Guru Interface for execution continuously for
each incoming image.

This results in debug errors for the execution of the c2r part.
Do I have to redo the planning for each image?

The code looks something like this:

//FFTW
if (fftw_plan_flag == false)
{
p_roi = fftw_plan_dft_r2c_2d(padSizeWidth, padSizeHeight,
real_input, complex_output,
FFTW_ESTIMATE);
fftw_plan_flag = true;
}
//Guru Interface, executing a basic plan
fftw_execute_dft_r2c(p_roi, iphinputroiPad, complex_output);

//IFFTW
if ( fftw_plan_flag == false )
{
p_ifft = fftw_plan_dft_c2r_2d(padSizeWidth, padSizeHeight,
complex_input, real_output,
FFTW_ESTIMATE);
fftw_plan_flag = true;
}
//Guru Interface, executing a basic plan
fftw_execute_dft_c2r(p_ifft, complex_input, real_output);


Thanks for any advice on how to perform this task correctly!
Marie

May be you want to contact the support forum of the specific
software since this is using third-party libraries. And we discuss
only the C++ language standard here.
 
G

Greg Schmidt

Hi,

I´m trying to perform Fourier Transforms on contiuously incoming
images from a camera.

I have sofar been using the Basic Interface for planning and execution
for every image. Later I have tried to only perform the basic planning
once and then using the Guru Interface for execution continuously for
each incoming image.

This results in debug errors for the execution of the c2r part.
Do I have to redo the planning for each image?

The code looks something like this:

//FFTW
if (fftw_plan_flag == false)
{
p_roi = fftw_plan_dft_r2c_2d(padSizeWidth, padSizeHeight,
real_input, complex_output,
FFTW_ESTIMATE);
fftw_plan_flag = true;
}
//Guru Interface, executing a basic plan
fftw_execute_dft_r2c(p_roi, iphinputroiPad, complex_output);

//IFFTW
if ( fftw_plan_flag == false )
{
p_ifft = fftw_plan_dft_c2r_2d(padSizeWidth, padSizeHeight,
complex_input, real_output,
FFTW_ESTIMATE);
fftw_plan_flag = true;
}
//Guru Interface, executing a basic plan
fftw_execute_dft_c2r(p_ifft, complex_input, real_output);

Thanks for any advice on how to perform this task correctly!
Marie

If the code shown really is what you are using, then p_ifft will never be
set, as fftw_plan_flag will have been set to true within the previous if
block. Try using two different bools or initializing both pointers within
the first if block.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,017
Latest member
GreenAcreCBDGummiesReview

Latest Threads

Top