(img, lines, color=[255, 0, 0], thickness=2)
return img
Draw a collection of lines on an image.
Draw a collection of lines on an image.
Draw a collection of lines on an image .
def draw_lines(img, lines, color=[255, 0, 0], thickness=2):
    """Draw a collection of lines on an image.
    """
    for line in lines:
        for x1, y1, x2, y2 in line:
            cv2.line(img, (x1, y1), (x2, y2), color, thickness)

    return img
def draw_lines ( img , lines , color = [ 255 , 0 , 0 ] , thickness = 2 ) : for line in lines : for x1 , y1 , x2 , y2 in line : cv2 . line ( img , ( x1 , y1 ) , ( x2 , y2 ) , color , thickness ) return img