Commit 8bf3f6bf authored by Zhiwei Su's avatar Zhiwei Su Committed by GitHub

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.
parent 1f406711
...@@ -212,7 +212,7 @@ void App::run() ...@@ -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));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment