PANDORE Version 6 GREYC-IMAGE

plog



Computes natural logarithm of image or graph.



Synopsis

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

Description

plog computes the natural logarithm of the input im_in.

If im_in is an image then the new image im_out is built with the logarithm of each pixel. The problem of 0 is solved by using an epsilon. Thus the basis operation is as follows:

if (pixel(im_in) ==0 )
   pixel(im_out)=log(epsilon)
else
   pixel(im_out)=log(pixel(im_in))

The output image im_out is a always Float image.

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

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

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Computes the logarithm of the image tangram.pan :

   plog tangram.pan a.pan

See also

Arithmetic

C++ prototype

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

Version française

Logarithme népérien d'une image or d'un graphe.


Author: Régis Clouard