Skip to content

Commit 8bf3f6b

Browse files
authored
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.
1 parent 1f40671 commit 8bf3f6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/gpu/stereo_match.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void App::run()
212212
// Show results
213213
d_disp.download(disp);
214214
putText(disp, text(), Point(5, 25), FONT_HERSHEY_SIMPLEX, 1.0, Scalar::all(255));
215-
imshow("disparity", disp);
215+
imshow("disparity", (Mat_<uchar>)disp);
216216

217217
handleKey((char)waitKey(3));
218218
}

0 commit comments

Comments
 (0)