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
lane-detect-pi.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录