cv2.findContours轮廓检测 constant007 2021-10-28 342 阅读1分钟 轮廓检测 轮廓检测也是图像处理中经常用到的。OpenCV-Python接口中使用cv2.findContours()函数来查找检测物体的轮廓。 import cv2 img = cv2.imread("./test.jpg") gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) ret, binary = cv2.threshold(gray,127