[mmlabelflat] [Up] [mmpatspec] Measurements

mmstats
Find global image statistics.

Synopsis

y = mmstats ( f , measurement )

Input

f Image Unsigned gray-scale (uint8 or uint16), signed (int32) or binary image

measurement String

Choose the measure to compute: 'max', 'min', 'median', 'mean', 'sum', 'std', 'std1'.

Output

y Double

Description

Compute global image statistics: 'max' - maximum gray-scale value in image; 'min' - minimum gray-scale value in image; 'sum' - sum of all pixel values; 'median' - median value of all pixels in image; 'mean' - mean value of all pixels in image; 'std' - standard deviation of all pixels (normalized by N-1); 'std1' - idem, normalized by N.

Examples

f=uint8([0,1,2,3,4,5,6])
print mmstats(f,'min')
0.0
print mmstats(f,'max')
6.0
print mmstats(f,'sum')
21.0
print mmstats(f,'median')
3.0
print mmstats(f,'mean')
3.0
print mmstats(f,'std')
2.16024689947
print mmstats(f,'std1')
2.0

Equation

See also

mmhistogram Find the histogram of the image f.
mmblob Blob measurements from a labeled image.
mmgrain Gray-scale statistics for each labeled region.
[mmlabelflat] [Up] [mmpatspec]