现在的位置: 首页 > 综合 > 正文

OpenCV imshow()之后没有waitKey()无法显示图像

2014年03月21日 ⁄ 综合 ⁄ 共 293字 ⁄ 字号 评论关闭

今天突然遇到了这么个奇怪的问题,之前一直没有注意到。

imshow()之后要加waitKey()才能正确显示图像。

官方说明如下:

A common mistake for opencv newcomers is to call cv::imshow() in a loop through video frames, without following up each draw with cv::waitKey(30). In this case, nothing appears on screen, because highgui is never given time to process the draw requests from
cv::imshow(). 

抱歉!评论已关闭.