业精于勤,荒于嬉,行成于思。毁于随

2017年3月

March 20, 2017

运动检测实现交互

import cv2 import numpy as np img_pre = None def Init(cap): global img_pre while(1): ret, frame = cap.read() if (img_pre == None): img_pre = frame.copy() ...
March 16, 2017

opencv python读取视频

import cv2 import numpy as np cap = cv2.VideoCapture(0) while(1): # get a frame ret, frame = cap.read() gray = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY) gray = cv2.GaussianBlur(...