OpenCV

OpenCV documentation:

HSV color-space (OpenCV):
  • Hue (H) -> [0, 179]
  • Saturation (S) -> [0, 255] 
  • Value (V) -> [0, 255] 
# Convert BGR frame to HSV
hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)

Convert BGR color/pixel to HSV
green_bgr = np.uint8([[[0,255,0 ]]])
green_hsv = cv2.cvtColor(green_bgr,cv2.COLOR_BGR2HSV) 

print green_hsv

# Threshold the HSV image to get only blue colors
mask = cv2.inRange(hsv, lower_blue, upper_blue)