lane-detect-pi.py 文件源码

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

项目:lane-detection-raspberry-pi 作者: uvbakutan 项目源码 文件源码
def color_thresh(self, img, thresh=(0, 255)):
        # convert to HSV color space and separate the V channel
        hsv = cv2.cvtColor(img, cv2.COLOR_RGB2HLS).astype(np.float)
        s_channel = hsv[:,:,2]

        # threshold color channel
        s_binary = np.zeros_like(s_channel)
        s_binary[(s_channel >= thresh[0]) & (s_channel <= thresh[1])] = 1
        return s_binary

    # get binary image based on sobel gradient thresholding
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号