part-7-self-driving-example.py 文件源码

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

项目:pygta5 作者: Sentdex 项目源码 文件源码
def roi(img, vertices):

    #blank mask:
    mask = np.zeros_like(img)   

    #filling pixels inside the polygon defined by "vertices" with the fill color    
    cv2.fillPoly(mask, vertices, 255)

    #returning the image only where mask pixels are nonzero
    masked = cv2.bitwise_and(img, mask)
    return masked
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号