Fixed gray window for gpu stereo BP and CSBP

compute() for BP and CSBP output 32-bit floating-point mat, and in cv::imshow() 32-bit floating-point is recognized as [0,1] and maped to [0,255], that causes gray window for BP and CSBP.
pull/8942/head
Zhiwei Su 8 years ago committed by GitHub
parent 1f4067112f
commit 8bf3f6bfcb
  1. 2
      samples/gpu/stereo_match.cpp

@ -212,7 +212,7 @@ void App::run()
// Show results
d_disp.download(disp);
putText(disp, text(), Point(5, 25), FONT_HERSHEY_SIMPLEX, 1.0, Scalar::all(255));
imshow("disparity", disp);
imshow("disparity", (Mat_<uchar>)disp);
handleKey((char)waitKey(3));
}

Loading…
Cancel
Save