def find_contours(self):
im2, contours, hierarchy = cv2.findContours(self.data, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
self.data = cv2.cvtColor(self.data, cv2.COLOR_GRAY2RGB)
cv2.drawContours(self.data, contours, -1, (255, 0, 0), 20)
评论列表
文章目录