FFTW execution

Discussion in 'C++' started by Marie, Oct 13, 2004.

  1. Marie

    Marie Guest

    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
     
    Marie, Oct 13, 2004
    #1
    1. Advertising

  2. 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.'
     
    Karthik Kumar, Oct 13, 2004
    #2
    1. Advertising

  3. Marie

    Greg Schmidt Guest

    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/
     
    Greg Schmidt, Oct 19, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stanley

    custom FFTW lib

    Stanley, Jun 29, 2004, in forum: C++
    Replies:
    6
    Views:
    1,975
    Stanley
    Jun 30, 2004
  2. JoePyeWuz
    Replies:
    1
    Views:
    3,328
    Jonathan Turkanis
    Jul 30, 2004
  3. Erica
    Replies:
    4
    Views:
    1,482
    Old Wolf
    Sep 16, 2004
  4. Fabio Garufi

    fftw-3.0.1-fma + Lynxos+PPC G4 fails tests.

    Fabio Garufi, Oct 26, 2004, in forum: C Programming
    Replies:
    3
    Views:
    429
    -berlin.de
    Oct 26, 2004
  5. Replies:
    5
    Views:
    501
Loading...

Share This Page