title: Strange results using opencv CUDA & BM
body: <p>I hope you can help me to find out why CUDA BM is giving me strange results. I simply want to generate a disparity map of two rectified images. But here is the result:</p>
  
  <p><img src="https://www7.pic-upload.de/23.02.14/6hawm31omz3o.jpg" alt=""></p>
  
  <p>And here is the piece of code:    </p>
  
  <pre><code>Mat img1, img2;
  img1 = imread("img1.jpg", IMREAD_GRAYSCALE);
  img2 = imread("img2.jpg", IMREAD_GRAYSCALE);
  cuda::GpuMat d_left, d_right;
  Ptr&lt;cuda::StereoBM&gt; bm;
  bm = cuda::createStereoBM(64, 5);
  Mat disp(img1.size(), CV_8U);
  cuda::GpuMat d_disp(img1.size(), CV_8U);
  d_left.upload(img1);
  d_right.upload(img2);
  bm-&gt;compute(d_right, d_left, d_disp);
  cuda::drawColorDisp(d_disp, d_disp, 64);
  d_disp.download(disp);
  resize(disp, disp, Size(0,0), 0.3, 0.3, 1);
  imshow("disparity", disp);
  waitKey(0);
  </code></pre>