class Percentile -- Percentile 对象

percentile 对象是由 histogram.get_percentile() 返回的 attrtuple。它针对底层 Histogram 的每个通道,报告用户指定的 CDF 位置(例如 0.05 为第 5 百分位,0.5 为中位数,0.95 为第 95 百分位)处的 bin 值。

对于灰度直方图,请使用 value(其余三个字段为 0)。对于 RGB565 直方图,l_value / a_value / b_value 分别给出 LAB 的 LAB 通道的百分位值。

字段可通过属性名(percentile.value)或索引(percentile[0])访问。该对象没有公开的构造函数。

class image.percentile

请调用 histogram.get_percentile() 来创建该对象。

value

所请求百分位处的灰度 bin 值。整数 0 -- 255。索引 [0]

l_value

所请求百分位处的 LAB L 通道 bin 值。整数 0 -- 100。索引 [1]

a_value

所请求百分位处的 LAB A 通道 bin 值。整数 -128 -- 127。索引 [2]

b_value

所请求百分位处的 LAB B 通道 bin 值。整数 -128 -- 127。索引 [3]