python process_image.py

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 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

以上是关于python process_image.py的主要内容,如果未能解决你的问题,请参考以下文章

001--python全栈--基础知识--python安装

Python代写,Python作业代写,代写Python,代做Python

Python开发

Python,python,python

Python 介绍

Python学习之认识python