The region_of_interest() function says it takes vertices which it passes to cv2.fillPoly(), but it seems like what that function is supposed to take is an Array of shapes.
I think that function should be updated like so:
-cv2.fillPoly(mask, vertices, ignore_mask_color)
+# We need to pass in an array of shapes (each shape is an array of vertices)
+cv2.fillPoly(mask, [vertices], ignore_mask_color)
Causes error: error: /home/travis/miniconda/conda-bld/conda_1486587071158/work/opencv-3.1.0/modules/imgproc/src/drawing.cpp:2276: error: (-215) p.checkVector(2, CV_32S) >= 0 in function fillPoly
Posted a github issue to https://github.com/udacity/CarND-LaneLines-P1/issues/35
The region_of_interest() function says it takes vertices which it passes to cv2.fillPoly(), but it seems like what that function is supposed to take is an Array of shapes.
I think that function should be updated like so:
-cv2.fillPoly(mask, vertices, ignore_mask_color) +# We need to pass in an array of shapes (each shape is an array of vertices) +cv2.fillPoly(mask, [vertices], ignore_mask_color) Causes error: error: /home/travis/miniconda/conda-bld/conda_1486587071158/work/opencv-3.1.0/modules/imgproc/src/drawing.cpp:2276: error: (-215) p.checkVector(2, CV_32S) >= 0 in function fillPoly
See related error http://stackoverflow.com/questions/17241830/opencv-polylines-function-in-python-throws-exception/18817152#18817152