PANDORE Version 6 GREYC-IMAGE

pabs



Computes absolute value of image or graph.



Synopsis

pabs [-m mask] [im_in|-] [im_out|-]

Description

pabs computes the absolute value of the input im_in.

If im_in is an image then the new image im_out is built with the absolute value of each pixel:

   if (pixel(im_in) < 0)
   then pixel(im_out) = -pixel(im_in)
   else pixel(im_out) = +pixel(im_in)

For non signed image, im_out is just a copy of im_in.

For color or multispectral image, the absolute value is computed separately on each band.

If im_in is a graph then the new graph im_out is built with the absolute value of each node value.

The output im_in type is the same type as the input im_in type.

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Computes the difference between images a.pan and b.pan and stores the result in image d.pan:

   psub a.pan b.pan c.pan
   pabs c.pan d.pan

See also

Arithmetic

C++ prototype

Errc PAbs( const Img2duc &im_in, Img2duc &im_out );

Version française

Valeur absolue d'une image ou d'un graphe.


Author: Régis Clouard