PANDORE Version 6 GREYC-IMAGE

pmultval



Multiplies image bands with constants stored in collection.



Synopsis

pmultval [-m mask] [col_in|-] [im_in|-] [im_out|-]

Description

pmultval builds the new output im_out by multipling each band of the input image im_in with constants stored in the collection col_in. The first bands is multiplied with the first constant in the collection, the second bdans with the second constant, etc.

The values are clipped if they are greater than the maximum allowed value or lower than the minimum:

   val = pixel(im_in) * col_in;
   if (val > MAX) pixel(im_out) = MAX;
   else if (val < MIN) pixel(im_out) = MIN;
   else pixel(im_out) = val;

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

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Multiplies tangram.pan by its mean value:

   pmeanvalue tangram.pan col.pan
   pmultval col.pan tangram.pan a.pan
More examples

See also

Arithmetic

C++ prototype

Errc PMultVal( const Collection &col_in, const Img2duc &im_in, Img2duc &im_out );

Version française

Multiplication d'une image par des constantes stockées dans une collection.


Author: Régis Clouard