Python OpenCV-物体轮廓检测
1.cv2.findContours() 函数检测轮廓import cv2img = cv2.imread('C:/Users/Administrator/Desktop/New_Study/IMAGE/Pictures/1.jpg') gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) ret, binary = cv2.threshold(gray,127,255,cv2.THRESH_BINARY) contours, hierarchy =
原创
2021-04-27 11:07:15 ·
1146 阅读 ·
0 评论