#颜色映射
import cv2
import numpy as np
img = cv2.imread('ruonan.jpg',1)
Info = img.shape
height = Info[0]
width = Info[1]
cv2.imshow('Img',img)
dst = np.zeros((height,width,3),np.uint8)
for i in range(0,height):
for j in range(0,width):
(b,g,r) = img[i,j]
b = 1.8*b
r = 1.2*r
if b>255:
b = 255
if r>255:
r = 255
dst[i,j] = (b,g,r)
cv2.imshow('Dst',dst)
cv2.waitKey(0)