imageMean

Calculate the mean pixel value for an image.

Return semantics match mir.math.stat.mean.

imageMean
(
T
)
(
Slice!(T, 3) image
)

Examples

// dfmt off
ubyte[] rgb = [
    255, 0, 0,
    0, 255, 0,
    0, 0, 255,
    120, 120, 120
];
//dfmt on

assert(rgb.sliced(4, 1, 3).imageMean == [93.75, 93.75, 93.75]);

Meta