Ask Your Question

Revision history [back]

cvtColor with big mosaic

see the pic in the link

https://photos.app.goo.gl/188EmsTEcFbU5MPT8

I just add all V channel to 255, and the result turn out lots of big mosaic, is there something wrong?

import cv2

img = cv2.imread("sun.jpg", -1)
cv2.imshow("original", img)
hsvCvt = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
h, s, v = cv2.split(hsvCvt)
v[:, :] = 255
newImg = cv2.merge([h, s, v])
bgrCvt = cv2.cvtColor(newImg, cv2.COLOR_HSV2BGR)
cv2.imshow("V_255", bgrCvt)
cv2.waitKey()
cv2.destroyAllWindows()