def main():
# reading in an image
#image = (mpimg.imread('test_images/solidWhiteRight.jpg') * 255).astype('uint8')
#image = (mpimg.imread('test_images/solidWhiteCurve.jpg') * 255).astype('uint8')
#image = (mpimg.imread('test_images/solidYellowCurve.jpg') * 255).astype('uint8')
#image = (mpimg.imread('test_images/solidYellowCurve2.jpg') * 255).astype('uint8')
#image = (mpimg.imread('test_images/solidYellowLeft.jpg') * 255).astype('uint8')
image = (mpimg.imread('test_images/whiteCarLaneSwitch.jpg') * 255).astype('uint8')
processImage = process_image(image)
plt.imshow(processImage)
plt.show()
# Make video
white_output = 'white.mp4'
clip1 = VideoFileClip("solidWhiteRight.mp4")
white_clip = clip1.fl_image(process_image) #NOTE: this function expects color images!!
white_clip.write_videofile(white_output, audio=False)
# Make video
yellow_output = 'yellow.mp4'
clip2 = VideoFileClip('solidYellowLeft.mp4')
yellow_clip = clip2.fl_image(process_image)
yellow_clip.write_videofile(yellow_output, audio=False)
评论列表
文章目录