opencv教程CV2模块——图片处理,gamma矫正暗部明部亮度调整
import cv2
img = cv2.imread('./imgg/1.jpeg', cv2.IMREAD_COLOR) # 打开文件
# 执行Gamma矫正,小于1的值让暗部细节大量提升,同时亮部细节少量提升
img_corrected = gamma_trans(img, 0.5)
cv2.imwrite('./out/gamma_corrected.jpg', img_corrected)
opencv教程CV2模块——图片处理,gamma矫正暗部明部亮度调整
import cv2
img = cv2.imread('./imgg/1.jpeg', cv2.IMREAD_COLOR) # 打开文件
# 执行Gamma矫正,小于1的值让暗部细节大量提升,同时亮部细节少量提升
img_corrected = gamma_trans(img, 0.5)
cv2.imwrite('./out/gamma_corrected.jpg', img_corrected)