=实验时间=
校历第六~第七周(10月23日-11月19日)11月26日)
=学生安排=
==支撑技术==
[https://opencv.org/ OpenCV ] [http://www.tensorflow.org TensorFlow] https://tensorflow.google.cn/ Python+TensorFlow [[Python_TensorFlow_Basics]]
[https://github.com/tensorflow/models/tree/master/research/object_detection TensorFlow_Object_Detection]
=OpenCV图像获取=
以下为Windows 10平台为例。
==安装opencv==
安装Anaconda
在https://mirrors.tuna.tsinghua.edu.cn
下载安装 opencv
conda install -c conda-forge opencv
==python opencv==
使用摄像头捕获视频并显示
import cv2
import numpy
import matplotlib.pyplot as plot
imcap = cv2.VideoCapture(0)
while(1):
# get a frame
ret, frame = imcap.read()
# show a frame
cv2.imshow("capture", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
imcap.release()
cv2.destroyAllWindows()
==硬件平台==
建议使用速度为fast的模型。
=图像获取=
以下为Windows 10平台为例。
==安装opencv==
安装Anaconda
在https://mirrors.tuna.tsinghua.edu.cn
下载安装 opencv
conda install -c conda-forge opencv
==python opencv==
使用摄像头捕获视频并显示
import cv2
import numpy
import matplotlib.pyplot as plot
imcap = cv2.VideoCapture(0)
while(1):
# get a frame
ret, frame = imcap.read()
# show a frame
cv2.imshow("capture", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
imcap.release()
cv2.destroyAllWindows()
=参考=