Get the HSV value of a pixel

0

I am using Python and OpenCV and my intention is to take the HSV value of a pixel:

Original image:

HSV Image ( hsv ):

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.

    
asked by Jota 11.04.2017 в 16:52
source

1 answer

1

The matrix that returns is fine, are HSV values, 98 is the tone, as in OpenCV the tone scale is from 0 to 179 the angle is approximately 197 ° a blue, close to cyan, with saturation values and high brightness, the scale for these two are from 0 to 255, so the values [98 245 202] are fine. Greetings

    
answered by 23.10.2017 в 18:30