int im_cmulnorm(in1, in2, out)
IMAGE *in1, *in2, *out;
int im_multiply(in1, in2, out)
IMAGE *in1, *in2, *out;
im_multiply(3) applied to two integer images multiplies the two images and writes the output as:
 in1    | uchar   char   ushort  short  uint  int 
 -------+-----------------------------------------
 in2    |
 uchar  | ushort  short  ushort  short  uint  int
 char   | short   short  short   short  int   int
 ushort | ushort  short  ushort  short  uint  int
 short  | short   short  short   short  int   int
 uint   | uint    int    uint    int    uint  int
 int    | int     int    int     int    int   int
If one or more of the images is a floating point type, the output is FMTFLOAT, unless one or more of the inputs is FMTDOUBLE, in which case the output is also FMTDOUBLE.
If one or more of the images is a complex type, the output is FMTCOMPLEX, unless one or more of the inputs is FMTDPCOMPLEX, in which case the output is also FMTDPCOMPLEX.
For complex input pels (x1,y1) and (x2,y2), im_multiply() writes (x1*x2 - y1*y2, x1*y2 + x2*y1).
im_cmulnorm(3) multiplies two complex images. The complex output is normalised to 1 by dividing both the real and the imaginary part of each pel with the norm; for instance if the complex multiplication produces (a,b) then the output written by this function is (a/norm, b/norm), where norm=a*a+b*b. Result is checked for norm=0. The function is useful for phase correlation. Both inputs should be complex.
Result is float complex if both inputs are float complex. In any other case the result is double complex.