box = cv2.minAreaRect(cnt)#轮廓的最小外接矩形
box = cv2.boxPoints(box)#矩形的四个角点
box =np.int0(box)
cv2.line(image, box[1], box[2], (0, 255, 0), 3)#其中两个点画线,出错了,
SystemError: new style getargs format but argument is not a tuple
为什么出错了,怎么转换点的数据类型。
box = cv2.minAreaRect(cnt)#轮廓的最小外接矩形
box = cv2.boxPoints(box)#矩形的四个角点
box =np.int0(box)
cv2.line(image, box[1], box[2], (0, 255, 0), 3)#其中两个点画线,出错了,
SystemError: new style getargs format but argument is not a tuple
为什么出错了,怎么转换点的数据类型。
box =np.int0(box)
line函数里面的点是需要int类型的