[mmlabelflat] [Up] [mmfractal] Measurements

mmstats
Find global image statistics.

Synopsis

function 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]);
mmstats(f,'min')
ans =
     0
mmstats(f,'max')
ans =
     6
mmstats(f,'sum')
ans =
    21
mmstats(f,'median')
ans =
     3
mmstats(f,'mean')
ans =
     3
mmstats(f,'std')
ans =
       2.1602
mmstats(f,'std1')
ans =
     2

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] [mmfractal]