【1】灰度转换 + 均值滤波 + 二值化,得到参考背景 代码语言:javascript 复制 img=cv2.imread('src.jpg')cv2.imshow("src",img)gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)cv2.imshow("gray",gray)blur=cv2.medianBlur(gray,7)cv2.imshow("blur",blur)_,thres=cv2.threshold(gray,199,255,cv2.THRESH_BIN...