opencv点的数据类型转换

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类型的

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632