title: Scaling performed by gpu::dft with OpenCV in C++
body: <p>I want to use a GPU-accelerated algorithm, to perform a fast and memory saving dft. But, when I perform the <code>gpu::dft</code>, the destination matrix is scaled as it is explained in the <a href="http://opencv.itseez.com/modules/gpu/doc/image_processing.html#gpu-dft" rel="nofollow">documentation</a>. How I can avoid this problem with the scaling of the width to <code>dft_size.width / 2 + 1</code>? Also, why is it scaled like this? My Code for the DFT is this:</p>
  
  <pre><code>cv::gpu::GpuMat d_in, d_out;
  d_in = in;
  d_out.create(d_in.size(), CV_32FC2 );
  cv::gpu::dft( d_in, d_out, d_in.Size );
  </code></pre>
  
  <p>where <code>in</code> is a <code>CV_32FC1</code> matrix, which is 512x512.</p>
  
  <p>The best solution would be a destination matrix which has the size <code>d_in.size</code> and the type <code>CV_32FC2</code>.</p>