project3.py 文件源码

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

项目:Self-Driving-Car-ND-Predict-Steering-Angle-with-CV 作者: sjamthe 项目源码 文件源码
def yellowgrayscale(image):
    #enhance yellow then find grayscale

    #image = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
    # define range of yellow color in HSV
    #lower = np.array([40,40,40])
    #upper = np.array([150,255,255])

    #RGB limits
    lower = np.array([80,80,40])
    upper = np.array([255,255,80])

    # Threshold the HSV image to get only yellow colors
    mask = cv2.inRange(image, lower, upper)
    #show_image('mask',mask)

    # Bitwise-AND mask and original image
    res = cv2.bitwise_and(image,image, mask= mask)
    res = cv2.addWeighted(res, 1.0, image, 1.0, 0)
    res = grayscale(res)

    return res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号