I am using OpenCV for colour space conversions. I was wondering if RGB to HSV conversion and BGR to HSV conversions will give me the same output?
cv2.cvtColor(np.float32(img),cv2.COLOR_BGR2HSV) # BGR to HSV
Because according to my assumption the only difference between RGB and BGR is a shift in channels, then by converting an RGB to HSV isn't it same as converting BGR to HSV?
they will not be the same. BGR is not RGB. the order of channels is reversed.
the wrong conversion type will give nonsensical Hue values. the right conversion type will give identical Hue values.
Saturation and Value will be the same by virtue of the HSV model not respecting the differing brightness of the primary colors.