Created
September 3, 2022 01:33
-
-
Save victormurcia/90cfdafe49a355c9dfe9c2bb54686db8 to your computer and use it in GitHub Desktop.
Color space conversion with Open CV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Need function that reads pixel hue value | |
hsv = cv2.cvtColor(ori_img, cv2.COLOR_BGR2HSV) | |
#Plot the image | |
fig, axs = plt.subplots(1, 3, figsize = (15,15)) | |
names = ['BGR','RGB','HSV'] | |
imgs = [ori_img, img, hsv] | |
i = 0 | |
for elem in imgs: | |
axs[i].title.set_text(names[i]) | |
axs[i].imshow(elem) | |
axs[i].grid(False) | |
i += 1 | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment