def draw_line(line): x1, y1, x2, y2 = line[0] cv2.line(img, (x1, y1), (x2, y2), (0, 0, 255), 2)这段代码出现错误,应该怎么改正
时间: 2024-05-08 10:17:08 浏览: 172
There seems to be a missing comma after `y1`. Here's the corrected code:
```
def draw_line(line):
x1, y1, x2, y2 = line[0]
cv2.line(img, (x1, y1), (x2, y2), (0, 0, 255), 2)
```
阅读全文