ImageStat Module
The ImageStat
module calculates global statistics for an image, orfor a region of an image.
- class
PIL.ImageStat.
Stat
(image_or_list, mask=None) - Calculate statistics for the given image. If a mask is included,only the regions covered by that mask are included in thestatistics. You can also pass in a previously calculated histogram.
参数:
- image – A PIL image, or a precalculated histogram.
- mask – An optional mask.
extrema
Min/max values for each band in the image.
Total number of pixels for each band in the image.
Sum of all pixels for each band in the image.
Squared sum of all pixels for each band in the image.
Average (arithmetic mean) pixel level for each band in the image.
Median pixel level for each band in the image.
RMS (root-mean-square) for each band in the image.
Variance for each band in the image.
- Standard deviation for each band in the image.
当前内容版权归 pillow-zh-cn 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 pillow-zh-cn .