PANDORE Version 6 GREYC-IMAGE

pmeanvalue



Measures global mean value of grayscale image or graph.



Synopsis

pmeanvalue [im_in|-] [col_out|-]

Description

pmeanvalue measured the mean value of the input object im_in for non null values only. If im_in is a grayscale image, the mean value is calculated from the pixel value. If im_in is a graph, the mean value is calculated from the node values.

The mean value is calculated as follows:

   mean = SUM (im_in(x,y)) / N; if im_in(x,y) != 0.

where N is the number of pixels (or nodes).

The mean values for each band are stored in the collection col_out.

Note : This operator is not maskable.

Inputs

Outputs

Result

Returns the global mean value (for the first band only). This value can be get using operator pstatus.

Examples

Measures the global mean the tangram.pan (Unix version):

   pmeanvalue tangram.pan col.pan
   var=`pstatus`
   echo "Mean = $val"

Measures the global mean of the tangram.pan (MsDos version):

   pmeanvalue tangram.pan col.pan
   call pstatus
   call pset var
   echo Mean = %val%

See also

Image Features Extraction

C++ Prototype

Float PMeanValue( const Img2duc &im_in, Collection & col_out );

Version française

Calcul du niveau de gris moyen d'une image.


Author: Régis Clouard