Horus Doc || Global Function Guide || General documentation   | Function documentation  

HxAtan

Synopsis

HxImageRep HxAtan (HxImageRep img)

Input

HxImageRep img
The image you want to take the arctangent of.

Return value

HxImageRep
The pixelwise arctangent of the input image.

Description

This function takes the arctangent of every pixel value of the input image. For vector images, the arctangent of every element of the vector is taken.

Remarks

No possible errors
This function can not result in any errors.

Examples

Taking the arctangent of an image.

#include "HxImageRepGlobalFuncs.h"
#include "HxImageRep.h"

HxImageRep HxAtanExample1(HxImageRep img) {
   img = HxImageAsDouble(img);
   img = HxContrastStretch(img, 10.0);
   img = HxAddVal(img, -5.0);
   img = HxAtan(img);
   img = HxContrastStretch(img, 255.0);
   img = HxImageAsByte(img);
   return img;
}

int main(int argc, char* argv[])
{
    HxImageRep im1 = HxMakeFromFile(argv[1]);
    im1 = HxAtanExample1(im1);
    HxWriteFile(im1, argv[2]);

    return 0;
}

exampleImage1.gif

Input image for the HxAtan example.

HxAtanResult1.gif

Output image for the HxAtan example.

This example illustrates the result of taking the arctangent of an image.

See also

HxTan, HxAsin, HxTanh,

Keywords

Unary, Trigonometric,


Generated on Mon Jan 27 15:44:58 2003 for GlobalFunctionGuide by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001