2018-12-05--opencv解读waitKey()函数
2018-12-05 本文已影响0人
w123_sz
解读waitKey()函数
OpenCV源码里对这个函数有一段说明:
This function should be followed by cv::waitKey function which displays the image for specified
milliseconds. Otherwise, it won’t display the image. For example, waitKey(0) will display the window
infinitely until any keypress (it is suitable for image display). waitKey(25) will display a frame
for 25 ms , after which display will be automatically closed. (If you put it in a loop to readvideos, it will display the video frame-by-frame)
---------------------
如果没有这个函数就不能显示图片,
waitKey(25)表示25毫秒读取一帧, 读完即关闭窗口。