Traceback (most recent call last):
File "C:\Users\Inspiron\PycharmProjects\car\main.py", line 13, in <module>
cv2.line(img,(coord[0][0],coord[0][1],coord[1][0],coord[1][1]),(0,0,255),2)
cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'line'
> Overload resolution failed:
> - Can't parse 'pt1'. Expected sequence length 2, got 4
> - Can't parse 'pt1'. Expected sequence length 2, got 4
1条答案
按热度按时间gzjq41n41#
line函数需要两个坐标(x0,y0)和(x1,y1)。尝试将调用改为:
请参见下面的link示例。