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

HxAcos

Synopsis

HxImageRep HxAcos (HxImageRep img)

Input

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

Return value

HxImageRep
The arccosine of the input image.

Description

This function takes the arccosine (or inverse cosine) of every pixel value of the input image. For vector images, the arccosine of every element of the vector is taken.

Remarks

Valid input images
The pixel values of the input image should be larger or equal to -1 and smaller or equal to 1.

Examples

Taking the arccosine of an image.

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

HxImageRep HxAcosExample1(HxImageRep img) {
   img = HxImageAsDouble(img);
   img = HxContrastStretch(img, 2.0);
   img = HxAddVal(img, -1.0);
   img = HxAcos(img);
   img = HxContrastStretch(img, 255.0);
   img = HxImageAsByte(img);
   return img;
}

int main(int argc, char* argv[])
{
    // HxImageRep im1 = HxMakeFromFile("../Images/exampleImage1.tif");
    HxImageRep im1 = HxMakeFromFile(argv[1]);
    im1 = HxAcosExample1(im1);
    // HxWriteFile(im1, "HxAcosResult1.tif");
    HxWriteFile(im1, argv[2]);

    return 0;
}

exampleImage1.gif

Input image for the HxAcos example.

HxAcosResult1.gif

Output image of the HxAcos example.

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

See also

HxCos, HxTan, HxAsin, HxCosh,

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