project_v2.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:SelfDrivingCar 作者: aguijarro 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号