I try to split the HSV image into its channels, change them and merge them back, however, as soon as I run the merge function, the channels are interpreted as RBG channels, so for example, for the following example, I get a yellow image,
import cv2 image = cv2.imread('example.jpg') hsv_image = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) h, s, v = cv2.split(hsv_image) s.fill(255) v.fill(255) hsv_image = cv2.merge([h, s, v]) cv2.imshow('example', hsv_image) cv2.waitKey()
What is the correct way to do this in OpenCV 3 using Python?
source share