realsense opencv example 运行时无显示退出

与waitKey返回值有关。

 

将  while (waitKey(1) < 0 && getWindowProperty(window_name, WND_PROP_AUTOSIZE) >= 0) 

改为  while (getWindowProperty(window_name, WND_PROP_AUTOSIZE) >= 0) 

将 waitKey(25) ; 语句加入到while循环中,可解决。

 

(好像waitKey返回值为255?)

 

posted @ 2021-01-05 17:11  imoon22  阅读(131)  评论(0编辑  收藏  举报