提交 8a0281f6 编写于 作者: F feilong

add io and gui+fix2

上级 6e8f60ce
......@@ -8,7 +8,7 @@
这是合影的效果:
<object width="500" height="300" data="./birds_concat.mp4"></object>
基本的实现代码如下:
基本的实现代码如下,合影每10帧采样一次
```python
import numpy as np
......@@ -20,6 +20,7 @@ if __name__ == '__main__':
out = ...
# TODO(You): 请在此正确创建待保存的目标mp4文件`out`
i = 0
while(cap.isOpened()):
ret, bird_frame = cap.read()
......@@ -33,7 +34,9 @@ if __name__ == '__main__':
)
cv2.imshow('bird_concat_frame', bird_concat_frame)
out.write(bird_concat_frame)
if i % 10 == 0:
out.write(bird_concat_frame)
i += 1
if cv2.waitKey(1) & 0xFF == ord('q'):
break
......
......@@ -15,6 +15,7 @@ if __name__ == '__main__':
(width*2, height)
)
i = 0
while(cap.isOpened()):
ret, bird_frame = cap.read()
......@@ -28,7 +29,9 @@ if __name__ == '__main__':
)
cv2.imshow('bird_concat_frame', bird_concat_frame)
out.write(bird_concat_frame)
if i % 10 == 0:
out.write(bird_concat_frame)
i += 1
if cv2.waitKey(1) & 0xFF == ord('q'):
break
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册