def calculateCoordinates(img, line_params):
    '\n        Calculates the coordinates for a road lane\n        '
    (height, width, _) = img.shape
    (m, b) = line_params
    y1 = height
    y2 = int((y1 * (1 / 2)))
    x1 = max((- width), min((2 * width), int(((y1 - b) / m))))
    x2 = max((- width), min((2 * width), int(((y2 - b) / m))))
    return np.array([x1, y1, x2, y2])
Calculates the coordinates for a road lane
def calculateCoordinates(img, line_params):
    '\n        \n        '
    (height, width, _) = img.shape
    (m, b) = line_params
    y1 = height
    y2 = int((y1 * (1 / 2)))
    x1 = max((- width), min((2 * width), int(((y1 - b) / m))))
    x2 = max((- width), min((2 * width), int(((y2 - b) / m))))
    return np.array([x1, y1, x2, y2])