【问题标题】:Does histogram equalization change the pixel intensity range? (16-bit)直方图均衡会改变像素强度范围吗? (16 位)
【发布时间】:2022-08-06 03:07:37
【问题描述】:

目前,我正在对 16 位图像进行直方图均衡,处理后范围会从 [0, 65536] 变化吗?

import numpy as np
hist, bins = np.histogram(img.flatten(), 65536, [0, 65536])  # Collect 16 bits histogram (65536 = 2^16)
  • 你所说的“改变”是什么意思?我认为np.histogram 肯定不是这里最适合的功能。考虑看np.digitize(应该更快,保证输出大小)

标签: python numpy histogram histogram-equalization


【解决方案1】:

由于变换图中的权重因子为 65536,像素强度的范围将保持在 [0, 65536]。更多详细信息在下面的链接中。

transform_map = np.floor(65536* chistogram_array).astype(np.uint8)

https://levelup.gitconnected.com/introduction-to-histogram-equalization-for-digital-image-enhancement-420696db9e43

【讨论】:

    猜你喜欢
    • 2022-01-23
    • 1970-01-01
    • 2021-11-26
    • 2013-11-20
    • 2014-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-15
    相关资源
    最近更新 更多