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.
This commit is contained in:
Zhiwei Su 2017-06-19 20:30:28 +08:00 committed by GitHub
parent 1f4067112f
commit 8bf3f6bfcb

View File

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