python opencv addWeighted

西北逍遥 / 2023-06-08 / 原文

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)

  

 

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