Ask Your Question

Revision history [back]

HSV values of a pixel in OpenCV

I am having trouble in interpreting HSV values processed in OprnCV. I have an image that I convert to HSV :
img = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)

I have a pixel that Gimp says it is [345 95 72] but when I print the value of same pixel it is [160 5 150] . I had the impression that Gimp and Open CV have a relationship like: OpenCV HSV = GIMP[H/2, (S255)/100, (V255)/100]

Is my understanding correct ? Does after conversion (cv2.cvtColor), the value of matrix points are HSV ?

Thanks, Alok