pre_process.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:5_FingerPrint_mosaic 作者: Bodyrelife 项目源码 文件源码
def equalize_hist(image):
    hist, bins = np.histogram(image.flatten(), 256, [0, 256])
    cdf = hist.cumsum()  # ???????
    cdf_m = np.ma.masked_equal(cdf, 0)  # ???????0?
    cdf_m = (cdf_m - cdf_m.min()) * 255 / (cdf_m.max() - cdf_m.min())  # ????????lut[i] = int(255.0 *p[i])??
    cdf = np.ma.filled(cdf_m, 0).astype('uint8')  # ???????????0
    return cv2.LUT(image, cdf)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号