OpenCV: imshow后不加waitkey无法显示视频
2014-03-18 16:14
381 查看
OpenCV显示视频帧时出现一个问题,就是imshow之后若是不加waitkey则无法显示,找了很久也没找到原因。
只是发现也有人发现这个问题:
It waits for x milliseconds for a key press. If a key was pressed during that time, it returns the key's ASCII code. Otherwise, it returns
It handles any windowing events, such as creating windows with
A common mistake for opencv newcomers is to call
所以imshow之后还是加上waitkey语句吧,为节约时间就设置为最小值1好了。
cv::waitkey(1);
只是发现也有人发现这个问题:
cvWaitKey(x) / cv::waitKey(x)does two things:
It waits for x milliseconds for a key press. If a key was pressed during that time, it returns the key's ASCII code. Otherwise, it returns
-1.
It handles any windowing events, such as creating windows with
cv::namedWindow(), or showing images with
cv::imshow().
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().
所以imshow之后还是加上waitkey语句吧,为节约时间就设置为最小值1好了。
cv::waitkey(1);
相关文章推荐
- OpenCV的imshow无法正常显示图片
- OpenCV imshow()之后没有waitKey()无法显示图像
- OpenCV | imshow()弹出窗口图片未响应;无法显示图片
- OpenCV的imshow无法正常显示图片
- OpenCV的imshow无法正常显示图片
- OpenCV的imshow无法正常显示图片
- 基于Python OpenCV加载视频文件,显示,并绘制自定义文字
- Opencv imshow显示不出来图片
- ffmpeg和opencv 播放视频文件并显示
- Win7 x64 OpenCV无法显示图片
- python opencv 读取视频文件并显示
- opencv videocapture无法读取视频
- OpenCV中文网站上有讲怎么使用OpenCV读入和显示图像和视频
- 【学习opencv】 视频载入与显示
- 关于怎么解决opencv无法显示图片的解决办法
- 使用Opencv调用摄像头并在MFC中进行视频显示
- 海康网络摄像机视频数据的获取及使用opencv显示
- OpenCV+MFC显示图像/视频
- 基于OpenCV之视频读取,处理和显示框架的搭建(一)
- OPenCV学习之视频读取,与帧的提取、显示与保存