title: OpenCV with CUDA, very clear error message but unable to figure it out why?
body: <p>I'm gonna start with showing the code that I was trying to test</p>
  
  <pre><code>#include&lt;opencv2/opencv.hpp&gt;
  #include&lt;opencv2/gpu/gpu.hpp&gt;
  #include&lt;stdio.h&gt;
  
  using namespace cv;
  using namespace std;
  using namespace gpu;
  
  int main(int argc,char* argv[]){
      if( argc != 2){
          cout &lt;&lt;" Usage: blur_blur_blur.exe Image_File_To_Go" &lt;&lt; endl;
          return -1;
      }
      GpuMat img_gpu,dest_gpu;
      Mat img,dest; 
      img = imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE);
      img_gpu.upload(img);
      cv::gpu::Canny(img_gpu,dest_gpu,50,70); 
      dest_gpu.download(dest);
      imshow("picture",img);
      imshow("canny",dest);
      waitKey(0);
      return 0;
  }
  </code></pre>
  
  <p>As you can see, it's just simple and easy code to practice and test OpenCV with CUDA. The problem is, I failed to run it. To be more specific, it builds but when I tried to run it error message pops up it says,</p>
  
  <blockquote>
    <p>OpenCV Error: Gpu API call (out of memory) in unknown function, file ......\sources\modules\core\src\gpumat.cpp, line 1415</p>
  </blockquote>
  
  <p>the image I tried to processs was 1kb, resoultion of 54x33. It's actually smaller than any other thumbnail I've ever seen. </p>
  
  <p>I have no idea where to look into. any help?</p>
  
  <p>PS. I use OpenCV 2.4.7 with CUDA ToolKit 4.2 
      maybe my CUDA is too old for up to dated OpenCV?</p>