PANDORE Version 6 GREYC-IMAGE

pdivval



Divides image bands with constants stored in collection.



Synopsis

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

Description

pdivval builds the new output im_out by dividing each band of the input image im_in with constants stored in the collection col_in. The first bands is divided 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

Divides tangram.pan by its mean value:

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

See also

Arithmetic

C++ prototype

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

Version française

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


Author: Régis Clouard