回答編集履歴

1

追記

2018/02/13 05:53

投稿

LouiS0616
LouiS0616

スコア35660

test CHANGED
@@ -11,3 +11,29 @@
11
11
 
12
12
 
13
13
  それなら逆にimshowが必要です。
14
+
15
+
16
+
17
+ コメントを受けて
18
+
19
+ ---
20
+
21
+ > waitkeyの仕様がまだよくわかっていないのですが、どういった時に使うと考えればよろしいのでしょうか?
22
+
23
+
24
+
25
+ 引用元: [OpenCV 3.4.0 - cv::imshow](https://docs.opencv.org/3.4.0/d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563) (**太字**は引用者)
26
+
27
+ > **Note**
28
+
29
+ **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 read videos, it will display the video frame-by-frame**)
30
+
31
+
32
+
33
+ ---
34
+
35
+ 引用元: [OpenCV 3.4.0 - cv::waitKey](https://docs.opencv.org/3.4.0/d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7) (**太字**は引用者)
36
+
37
+ > **Note**
38
+
39
+ **The function only works if there is at least one HighGUI window created** and the window is active. If there are several HighGUI windows, any of them can be active.