lucasosouza
12/6/2016 - 4:25 PM

process_image.py

def process_image(image):
    # NOTE: The output you return should be a color image (3 channel) for processing video below
    # TODO: put your pipeline here,
    # you should return the final output (image with lines are drawn on lanes)
    
    imshape = image.shape
    initial_img = image
    
    gray = grayscale(image)
    blur = gaussian_blur(gray, 5)
    can = canny(blur, 50, 100)
    
    vertices = np.array([[(0,imshape[0]),(450, 290), (450, 290), (imshape[1],imshape[0])]], dtype=np.int32)
    
    reg = region_of_interest(can, vertices)
    
    theta = np.pi/180
    
    hough = hough_lines(reg, 2, theta, 15, 40, 20)
    # draw = draw_lines(image, lines, color=[255,0,0], thickness=2)
    plt.imshow(hough)
    return hough