cv2.COLOR_RGB2HSV is not giving correct HSV values
Hi, I ran a very simple code as below to convert RGB to HSV, but opencv is giving me incorrect answers. I want to convert yellow from RGB [255,255,0] to HSV, which should give me a value of [60,100,100] or [60,255,255]. However, it is giving me [30,255,255]. Later I tried to use cv2.COLOR_BRG2HSV, it is giving me [90,255,255]. None of these is the correct answer, why?? I'm using macOS Mojave (10.14), Anaconda 1.9.2, python 3.6.4, opencv 3.4.1.
Code:
import numpy as np
import cv2
a = [255,255,0]
HSV_convert = cv2.cvtColor(np.uint8([[a]]), cv2.COLOR_BGR2HSV)
print(HSV_convert)
i removed your (useless here) screenshots.
see https://docs.opencv.org/master/de/d25...
very helpful, thank you