OpenCV - picture HSV artistic effect

PS: Adjusting the component values ​​​​in the HSV color space can generate some interesting renderings. Here, all the V channels are adjusted to 255, which is the maximum brightness.

original image

after change

the code

import cv2

img = cv2.imread("1.jpeg")
hsv = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
h, s, v = cv2.split(hsv)
v[:,:] = 255
newHSV = cv2.merge([h,s,v])
art = cv2.cvtColor(newHSV, cv2.COLOR_HSV2BGR)
art = cv2.resize(art,(200,260))
cv2.imshow('art',art)
cv2.waitKey(0)
cv2.destroyAllWindows()

Guess you like

Origin blog.csdn.net/weixin_54627824/article/details/128299140