class Statistics – Statistics Object¶
The statistics object is an attrtuple
returned by histogram.get_statistics() (and its aliases
histogram.get_stats() / histogram.statistics()) or directly by
Image.get_statistics(). It summarises the bin distribution of the
underlying Histogram with eight reductions per channel:
mean, median, mode, standard deviation, min, max, lower quartile, and upper
quartile.
For grayscale data, only the un-prefixed fields (mean, median,
mode, stdev, min, max, lq, uq) carry useful values
and they are reused as the LAB L channel reductions for RGB565 data –
the l_* fields therefore mirror the un-prefixed fields and are provided
for symmetry. a_* and b_* only carry useful values for RGB565
histograms.
Fields are accessible by attribute name (statistics.mean) or by index
(statistics[0]). The object has no public constructor.
- class image.statistics¶
Please call
histogram.get_statistics()orImage.get_statistics()to create this object.Grayscale / LAB L (also exposed as
l_*below)¶- mean¶
Grayscale mean of the histogram. Integer 0 – 255. Index
[0].
- median¶
Grayscale median of the histogram. Integer 0 – 255. Index
[1].
- mode¶
Grayscale mode of the histogram. Integer 0 – 255. Index
[2].
- stdev¶
Grayscale standard deviation of the histogram. Integer 0 – 255. Index
[3].
- min¶
Grayscale minimum of the histogram. Integer 0 – 255. Index
[4].
- max¶
Grayscale maximum of the histogram. Integer 0 – 255. Index
[5].
- lq¶
Grayscale lower quartile (25th percentile) of the histogram. Integer 0 – 255. Index
[6].
- uq¶
Grayscale upper quartile (75th percentile) of the histogram. Integer 0 – 255. Index
[7].
LAB L channel (RGB565)¶
- l_mean¶
LAB
Lchannel mean. Integer 0 – 100. Index[8].
- l_median¶
LAB
Lchannel median. Integer 0 – 100. Index[9].
- l_mode¶
LAB
Lchannel mode. Integer 0 – 100. Index[10].
- l_stdev¶
LAB
Lchannel standard deviation. Integer 0 – 100. Index[11].
- l_min¶
LAB
Lchannel minimum. Integer 0 – 100. Index[12].
- l_max¶
LAB
Lchannel maximum. Integer 0 – 100. Index[13].
- l_lq¶
LAB
Lchannel lower quartile. Integer 0 – 100. Index[14].
- l_uq¶
LAB
Lchannel upper quartile. Integer 0 – 100. Index[15].
LAB A channel (RGB565)¶
- a_mean¶
LAB
Achannel mean. Integer -128 – 127. Index[16].
- a_median¶
LAB
Achannel median. Integer -128 – 127. Index[17].
- a_mode¶
LAB
Achannel mode. Integer -128 – 127. Index[18].
- a_stdev¶
LAB
Achannel standard deviation. Integer -128 – 127. Index[19].
- a_min¶
LAB
Achannel minimum. Integer -128 – 127. Index[20].
- a_max¶
LAB
Achannel maximum. Integer -128 – 127. Index[21].
- a_lq¶
LAB
Achannel lower quartile. Integer -128 – 127. Index[22].
- a_uq¶
LAB
Achannel upper quartile. Integer -128 – 127. Index[23].
LAB B channel (RGB565)¶
- b_mean¶
LAB
Bchannel mean. Integer -128 – 127. Index[24].
- b_median¶
LAB
Bchannel median. Integer -128 – 127. Index[25].
- b_mode¶
LAB
Bchannel mode. Integer -128 – 127. Index[26].
- b_stdev¶
LAB
Bchannel standard deviation. Integer -128 – 127. Index[27].
- b_min¶
LAB
Bchannel minimum. Integer -128 – 127. Index[28].
- b_max¶
LAB
Bchannel maximum. Integer -128 – 127. Index[29].
- b_lq¶
LAB
Bchannel lower quartile. Integer -128 – 127. Index[30].
- b_uq¶
LAB
Bchannel upper quartile. Integer -128 – 127. Index[31].