From 8bf3f6bfcb867b73dbf87ddbc955f7bc94540baa Mon Sep 17 00:00:00 2001 From: Zhiwei Su Date: Mon, 19 Jun 2017 20:30:28 +0800 Subject: [PATCH] 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. --- samples/gpu/stereo_match.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/gpu/stereo_match.cpp b/samples/gpu/stereo_match.cpp index 012fda1085..c392cf1c88 100644 --- a/samples/gpu/stereo_match.cpp +++ b/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_)disp); handleKey((char)waitKey(3)); }