Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. def hls_select(img, thresh=(0, 255)):
  2. hls = cv2.cvtColor(img, cv2.COLOR_RGB2HLS)
  3. s_channel = hls[:,:,2]
  4. binary_output = np.zeros_like(s_channel)
  5. binary_output[(s_channel > thresh[0]) & (s_channel <= thresh[1])] = 1
  6. return binary_output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement