I am using Python and OpenCV and my intention is to take the HSV value of a pixel:
hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
print(hsv[47,115])
>> [ 98 245 202]
The value that returns me, [ 98 245 202]
, is in BGR (RGB inverted), because if I paint it as RGB it paints me the yellow color since it belongs to a yellow circle, therefore it does not return the HSV value.
Does anyone know why it returns the value in BGR instead of HSV? It is assumed that the variable hsv
must contain an array with HSV values and not BGR.