import cv2 # 仅用于读取图像矩阵
import matplotlib.pyplot as plt
import numpy as np
gray_level = 256 # 灰度级
def pixel_probability(img):
"""
计算像素值出现概率
:param img:
:return:
"""
assert isinstance(img, np.ndarray)
prob = np.zeros(shape=(256))
for rv in img:
直方图均衡化的python实现
最新推荐文章于 2024-05-21 18:16:41 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)