Man Linux: Main Page and Category List

im_exp10tra, im_exptra, im_expntra, im_expntra_vec, im_log10tra, im_logtra, im_powtra, im_powtra_vec - logarithmic, exponential and power transform of an image

#include<vips/vips.h>intim_expntra(in,out,base)IMAGE*in,*out;doublebase;intim_expntra_vec(in,out,n,vec)IMAGE*in,*out;intn;double*vec;intim_exp10tra(in,out)IMAGE*in,*out;intim_exptra(in,out)IMAGE*in,*out;intim_log10tra(in,out)IMAGE*in,*out;intim_logtra(in,out)IMAGE*in,*out;intim_powtra(in,out,exponent)IMAGE*in,*out;doubleexponent;intim_powtra_vec(in,out,n,vec)IMAGE*in,*out;intn;double*vec;

Each of the above functions maps in through a log or anti-log function of some sort and writes the result to out. The size and number of bands are unchanged, the output type is float, unless the input is double, in which case the output is double. Non-complex images only!im_expntra(3)transforms element x of input, to pow(base, x) in output. It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently!im_expntra_vec(3)works as im_expntra(), but lets you specify a constant per band.im_exp10tra(3)transforms element x of input, to pow(10,0, x) in output. Internally, it is defined in terms of im_expntra().im_exptra(3)transforms element x of input, to pow(e, x) in output, where e is the mathematical constant. Internally, it is defined in terms of im_expntra().im_log10tra(3)transforms element x of input, to log10tra(x) in output.im_logtra(3)transforms element x of input, to logtra(x) in output.im_powtra(3)transforms element x of input, to pow(x, exponent) in output. It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently!im_powtra_vec(3)works as im_powtra(3), but lets you specify a constant per band.

None of the functions checks for under/overflow. Overflow is very common for many of these functions!

Each function returns 0 on success and -1 on error.

im_add(3), im_multiply(3), im_subtract(3), im_lintra(3), im_absim(3), im_mean(3), im_max(3).

N. Dessipris - 24/04/1991 J. Cupitt (rewrite) - 21/7/93 24 April 1991 IM_EXPTRA(3)