| Topic: |
DEVELOP > c-Plus-Plus |
| User: |
"Marie" |
| Date: |
13 Oct 2004 03:45:36 AM |
| Object: |
FFTW execution |
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
.
|
|
| User: "Karthik Kumar" |
|
| Title: Re: FFTW execution |
13 Oct 2004 04:24:54 AM |
|
|
Marie wrote:
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.
--
Karthik. http://akktech.blogspot.com .
'Remove _nospamplz from my email to mail me.'
.
|
|
|
|
| User: "Greg Schmidt" |
|
| Title: Re: FFTW execution |
19 Oct 2004 02:18:41 AM |
|
|
On 13 Oct 2004 01:45:36 -0700, Marie wrote:
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.
--
Greg Schmidt
Trawna Publications http://www.trawna.com/
.
|
|
|
|

|
Related Articles |
|
|