Skip to content

Instantly share code, notes, and snippets.

@trongan93
Created October 15, 2020 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trongan93/cb34f4fcb1a4a91ae67a118df921044d to your computer and use it in GitHub Desktop.
Save trongan93/cb34f4fcb1a4a91ae67a118df921044d to your computer and use it in GitHub Desktop.
bgrInputImage = cv2.imread(img_path)
bgrInputImage = cv2.resize(bgrInputImage,(224,224))
rgb_resized_img = cv2.cvtColor(bgrInputImage,cv2.COLOR_BGR2RGB)
hsvInputImage_Full = cv2.cvtColor(rgb_resized_img.astype(np.float32), cv2.COLOR_RGB2HSV_FULL)
hue_full, sat_full, val_full = cv2.split(hsvInputImage_Full)
hue_16bit = np.array(hue_full,dtype=np.uint16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment