python+opencv实时跟踪红色物体并画出轨迹实战
from collections import dequeimport numpy as np#import imutilsimport cv2import time#设定红色阈值,HSV空间redLower = np.array([170, 100, 100])redUpper = np.array([179, 255, 255])#初始化追踪点的列表mybuffer = 64pts = deque(maxlen=mybuffer)#打开摄像头camera = cv2.Vide.
原创
2022-05-04 01:16:46 ·
2403 阅读 ·
2 评论