【发布时间】:2018-04-26 13:58:43
【问题描述】:
我正在做一个图像处理车道检测项目。我在我的代码中收到此错误。我希望有人能帮我弄清楚如何解决这个错误。
函数如下:
def draw_lane_lines(image, lines, color = [255,0,0], thickness=20):
line_image=np.zeros_like(image)
for line in lines:
if line is not None:
cv2.line(*(line_image, [line], color, thickness))
错误的名称是:SystemError: new style getargs format but argument is not a tuple。
错误似乎在代码的最后一行。
【问题讨论】:
-
在做任何其他事情之前修复你的缩进。
-
您为什么使用
cv2.line(*(...))而不仅仅是cv2.line(...)?
标签: python numpy image-processing