#颜色风格
import cv2
import numpy as np
img = cv2.imread("E:/code/conputer_visual/data/0.jpg", 1)
imginfo = img.shape
height = imginfo[0]
width = imginfo[1]
cv2.imshow("src", img)
# b = b * 1.5 ,g = g * 1.3 增强蓝色和绿色
dst = np.zeros((height, width, 3), np.uint8)
for i in range(height):
for j in range(width):
(b,g,r) = img[i,j]
b = b * 1.5
g = g * 1.3
if b > 255:
b = 255
if g > 255:
g = 255
dst[i,j] = (b,g,r)
cv2.imshow("dst", dst)
cv2.waitKey()
Color style of opencv image effects
Guess you like
Origin blog.csdn.net/cyj5201314/article/details/114655161
Ranking