1. def contrast_img(img1, c, b):
    2. #https://blog.csdn.net/wsp_1138886114/article/details/82624534
    3. # 亮度就是每个像素所有通道都加上b
    4. rows, cols, channels = img1.shape
    5. # 新建全零(黑色)图片数组:np.zeros(img1.shape, dtype=uint8)
    6. blank = np.zeros([rows, cols, channels], img1.dtype)
    7. dst = cv2.addWeighted(img1, c, blank, 1-c, b)
    8. return dst
    9. frame2=contrast_img( frame, Config['Lighten_R'], Config['Lighten_B'])

    More: https://blog.csdn.net/weixin_38342946/article/details/100071255


    瓦雀