from PIL import Image, ImageStat
import math
import os
import matplotlib.pyplot as plt
import numpy as np
import cv2
def brightness(im_file):
im = Image.open(im_file)
stat = ImageStat.Stat(im)
r, g, b = stat.mean
return math.sqrt(0.241 * (r ** 2) + 0.691 * (g ** 2) + 0.068 * (b ** 2))
def illumination_averge(directory_name):
illumination_averge = []
for filename in os.listdir
Python脚本021:两个直方图叠加在一起
最新推荐文章于 2023-10-24 23:02:48 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)