title: Using gpu::GpuMat in OpenCV C++
body: <p>I would like to know how can I modify a <code>gpu::GpuMat</code>. In fact I would like to know if it is possible to use a <code>gpu::GpuMat</code> like a <code>cv::Mat</code>.</p>
  
  <p>I would like to do something like that:</p>
  
  <pre><code>    cv::namedWindow("Result");
      cv::Mat src_host = cv::imread("lena.jpg", CV_LOAD_IMAGE_GRAYSCALE);
      cv::gpu::GpuMat dst, src;
      src.upload(src_host);
  
  
      for (unsigned int y = 0; y &lt; src.rows; y++){
          for (unsigned int x = 0; x &lt; src.cols; x++){
              src.at&lt;uchar&gt;(y,x) = 0;
          }
      }
  
      cv::Mat result_host;
      dst.download(result_host);
      cv::imshow("Result", result_host);
      cv::waitKey();
  }
  catch(const cv::Exception&amp; ex)
  {
      std::cout &lt;&lt; "Error: " &lt;&lt; ex.what() &lt;&lt; std::endl;
  }
  return 0;
  </code></pre>
  
  <p>It seems to be not possible. Does someone know an alternative ?
  Do I have to download my <code>gpu::GpuMat</code> to a <code>cv::Mat</code> each time I want to make something ?
  Thanks in advance</p>
  
  <p>Edit: I could probably use <code>gpu::PtrStepSz</code> (have to test...)</p>