python opencv addWeighted

python opencv addWeighted

 

import cv2

# Load the image
img = cv2.imread('20230222100736979.jpg')

# Adjust the brightness
brightness = 50
adjusted = cv2.addWeighted(img, 1, img, 0, brightness)

# Display the original and adjusted images
cv2.imshow('Original', img)
cv2.imshow('Adjusted', adjusted)
cv2.waitKey(0)

  

 

##################

posted @ 2023-06-08 19:47  西北逍遥  阅读(15)  评论(0编辑  收藏  举报