PANDORE Version 6 GREYC-IMAGE

paddcst



Adds constant to image, graph or region map.



Synopsis

paddcst cst [-m mask] [im_in|-] [im_out|-]

Description

paddcst builds the new output im_out by adding the specified constant to each value of im_in.

If im_in is an image then paddcst adds the specified value to each pixel. The values are clipped if they are greater than the maximum allowed value or lower than the minimum:

   val = pixel(im_in) + valeur;
   if (val > MAX) pixel(im_out) = MAX;
   else if (val < MIN) pixel(im_out) = MIN;
   else pixel(im_out) = val;

For color or multispectral image, padddcst is computed separately on each band.

For region map, paddcst adds the specified value to each label.

For graph, paddcst adds the specified value to each node value.

The output file is of the same type as the input file.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

For region map, returns the new higher label value.

Examples

Adds 10 to each tangram.pan pixel values:

   paddcst 10 tangram.pan a.pan

See also

Arithmetic

C++ prototype

Errc PAddCst( const Img2duc &im_in, Img2duc &im_out, Uchar cst );

Version française

Addition d'une constante aux valeurs d'une image, d'un graphe ou d'une carte de région.


Author: Régis Clouard