1.ret, frame = cap.read() read函数返回值
第一个参数ret 为True 或者False,代表有没有读取到图片
第二个参数frame表示截取到一帧的图片
2.python中with…as的用法
https://blog.csdn.net/qiqicos/article/details/79200089
https://www.jb51.net/article/135285.htm
- python 读写、创建 文件的方法(必看)
https://blog.csdn.net/lzc4869/article/details/76577761