udacity / sdc-issue-reports

29 stars 6 forks source link

P1 hough_lines() helper function creates grayscale image, but should create RBG image #50

Closed georgesung closed 7 years ago

georgesung commented 7 years ago

In project 1 (https://github.com/udacity/CarND-LaneLines-P1/blob/master/P1.ipynb), the helper function "hough_lines()" creates a single-channel image via the following line of code:

line_img = np.zeros(img.shape, dtype=np.uint8)

However, when passing line_img into draw_lines(), I assume draw_lines() expects an RGB image, because it's trying to draw a red line. Thus I propose the following code to replace the above line of code:

line_img = np.zeros((*img.shape, 3), dtype=np.uint8)

ryan-keenan commented 7 years ago

I agree! nice catch, I've made the change to the notebook. Thanks