我想将图像的边缘变成链式代码。
代码
edges = cv2.Canny(resized,100,200, L2gradient=True)
contour = str(cv2.findContours(edges, mode = "CV_RETR_LIST", method = "CV_CHAIN_CODE" ))
print(contour)
输出
contour = str(cv2.findContours(edges, mode = "CV_RETR_LIST", method = "CV_CHAIN_CODE" ))
TypeError: an integer is required (got type str)
我尝试用数字替换字符串,但是我不确定哪个数字与方法和模式相对应。