PANDORE Version 6 GREYC-IMAGE

pcontrast1value



Measures the global contrast value of grayscale image or graph.



Synopsis

pcontrast1value [im_in|-] [col_out|-]

Description

pcontrastvalue measures the global contrast of the input image im_in or the input graph im_in.

The contrast is measured as follows:

C= SUM( MAX (C(s,t), C in V(s))) / N
and C(s,t) = |im_in[s] - im_in[t]| / (K-1)

where K is the number of gray levels, and N is the number of pixels.

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

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

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

Inputs

Outputs

Result

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

Examples

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

   pcontrast1value tangram.pan col.pan
   var=`pstatus`
   echo "Contrast = $val"

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

   pcontrast1value tangram.pan col.pan
   call pstatus
   call pset var
   echo Contrast = %val%

See also

Image Features Extraction

C++ prototype

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

Version française

Calcul du contraste global d'une image ou d'un graphe.


Author: Régis Clouard