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

HxCosh

Synopsis

HxImageRep HxCosh (HxImageRep img)

Input

HxImageRep img
The image you want to take the hyperbolic cosine of.

Return value

HxImageRep
The pixelwise hyperbolic cosine of the input image.

Description

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

Remarks

Overflow error
The function HxCosh can result in an overflow error.

Examples

Taking the hyperbolic cosine of an image.

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

HxImageRep HxCoshExample1(HxImageRep img) {
   img = HxImageAsDouble(img);
   img = HxContrastStretch(img, 4.0);
   img = HxAddVal(img, -2.0);
   img = HxCosh(img);
   img = HxContrastStretch(img, 255.0);
   img = HxImageAsByte(img);
   return img;
}

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

    return 0;
}

exampleImage1.gif

Input image for the HxCosh example.

HxCoshResult1.gif

Output image of the HxCosh example.

This example illustrates the result of taken the hyperbolic cosine of an image.

See also

HxCos, HxSinh, HxAcos,

Keywords

Unary, Trigonometric,


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