CUFFT and image treatment

Hi everyone,
I’m trying to process an image, fisrt, applying a FFT on it, i have the image in the memory, but i do not know how to introduce it in the CUFFT, because it needs complex values, and i have a matrix of real numbers… if somebody knows how to do this, or knows something about this topic, please give an idea.

The source code that i’m writting is:

// First load the image, so we know what the size of the image (imageW and imageH)
printf("Allocating host and CUDA memory and loading image file...\n");
    const char *image_path = cutFindFilePath("portrait_noise.bmp", argv[0]);
    LoadBMPFile(&h_Src, &imageW, &imageH, image_path);
printf("Data init done.\n");

so, i have the matrix of numbers…
then, in the .cu file, i’m doing this:

cufftHandle plan;
cufftComplex *odata;

cudaMalloc((void**)&h_Src, sizeof(cufftComplex)imageWimageH);
cudaMalloc((void**)&odata, sizeof(cufftComplex)imageWimageH);

/* Create a 2D FFT plan. /
cufftPlan2d(&plan, imageW, imageH, CUFFT_C2C);
Use the CUFFT plan to transform the signal out of place. */
cufftExecC2C(plan, h_Src, odata, CUFFT_FORWARD);

/* Destroy the CUFFT plan. */

You can use this function:
cufftPlan2d(&plan, imageW, imageH, CUFFT_R2C);
cufftExecR2C(plan, h_Src, odata, CUFFT_FORWARD);

May be this can slove your problem.