PANDORE Version 6 GREYC-IMAGE

pentropyvalue



Measures global entropy of grayscale image or graph.



Synopsis

pentropyvalue [im_in|-] [col_out|-]

Description

pentropyvalue measures the global entropy of the input grayscale image or graph im_in. The entropy in the sense of Shannon is the quantity of information held by the input image. The more seldom a pixel value is, the more it holds information and the greater is the entropy.

The entropy is calculated as follows:

   entropy= - SUM { Pi * log2(Pi) }

where Pi is the probability of pixel i. (Pi is computed from the normalized histogram.)

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

For image, the entropy is measured from the pixel values.

For graph, the entropy is measured from the node values.

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

Inputs

Outputs

Result

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

Examples

Measures the global entropy of the tangram.pan (Unix version):

   pentropyvalue tangram.pan col.pan
   var=`pstatus`
   echo "Entropy = $val"

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

   pentropyvalue tangram.pan col.pan
   call pstatus
   call pset var
   echo Entropy = %val%

See also

Image Features Extraction

C++ Prototype

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

Version française

Calcul de l'entropie d'une image ou d'un graphe.


Author: Régis Clouard