[mmBlob] [Up] [mmLabelflat] Measurements

mmGrain
Gray-scale statistics for each labeled region.

Synopsis

Image mmGrain ( const Image& fr , const Image& f , const String& measurement , const String& option = "image" );

Input

fr Image [ Gray-scale (uint8 or uint16) image ]

Labeled image, to define the regions. Label 0 is the background region.

f Image [ Gray-scale (uint8 or uint16) image ]

To extract the measuremens.

measurement String

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

option String

Output format: 'image': results as a gray-scale mosaic image (uint16); 'data': results a column vector of measurements (double).

Default: "image"

Output

y Image [ Gray-scale (uint8 or uint16) image ]

Or a column vector (double) with gray-scale statistics per region.

Description

Computes gray-scale statistics of each grain in the image. The grains regions are specified by the labeled image fr and the gray-scale information is specified by the image f. The statistics to compute is specified by the parameter measurement, which has the same options as in function mmStats . The parameter option defines: ('image') if the output is an uint16 image where each label value is changed to the measurement value, or ('data') a double column vector. In this case, the first element (index 1) is the measurement of region 1. The region with label zero is not measure as it is normally the background.

See also

mmLabel Label a binary image.
mmBlob Blob measurements from a labeled image.
mmLabelflat Label the flat zones of gray-scale images.
mmStats Find global image statistics.
[mmBlob] [Up] [mmLabelflat]